One Click Theme Injector Port your favorite Theme to Any Rom XDA Developers

WoZzY

The GRD Dev Team
Premium Member
Developer
Joined
Jun 5, 2010
Messages
1,067
Reaction score
1
Location
SouthWest,FL
One Click Theme Injector Port your favorite Theme to Any Rom


XDA Developers have created something pretty cool & just recently updated it



  • menu_open.gif
    Rate This Thread
    rating_5.png
    Excellent
    rating_4.png
    Good
    rating_3.png
    Average
    rating_2.png
    Bad
    rating_1.png
    Terrible



user_offline.png
ASimmons

post_old.gif
29th October 2010, 05:24 PM



icon6.gif
One Click Theme Injector (Updated 11/1) Port your favorite Theme to Any Rom
READ THIS FIRST:
This tool will take your favorite theme and inject it into your favorite rom... provided they are compatible with each other (might work if they aren't but thats for later). I did this cause alot of themers and people who like themes always waiting for the nightly theme to get applied well this will do it for you.

Simply grab your favorite theme that you want to apply to say the newest cm6 nightly and then grab the newest nightly, place them in the one click folder and double click my script. It will ask you the name of the theme and then the name of the rom... Then BAM!!! it will inject this theme into the rom. The final output will be "themed-<nameofyourrom>.zip" and this is what you will flash to your system.

The script can only inject what in can find, so if there are apks in the theme that aren't in your rom then it wont get injected.

Once it's done go ahead and flash your new theme. So all you guys who like the Steel My Elegance, Or Mean Green or Black Mod and apply theme to the lastest nightly or Black and Gold .

This should in theory make a theme for say cm6 and inject them into AOSP mod, or even cm5 to cm6 and so on.

INSTRUCTIONS by Norm12:
1. Download and extract.
2. Copy both the theme and rom into the 1 click folder---the extracted one.
3. Open the 1-click folder and you should see your theme, rom, lib folder, and the injector script.
4. Doubleclick on the injector script----if you did everything correct it will open a cmd prompt
5. Enter the names of the rom and theme when asked...I did use the exact names and added ".zip" to the end.
6. Hit enter and wait. When it is really done it will auto-close the cmd prompt. This may take 15 minutes.
7. Your newly themed rom will be in the same folder as the unthemed rom and theme zips. If it worked it should be slightly larger than the original rom. Enjoy

!!!IMPORTANT... BECAUSE 7ZIP SHOWS OUTPUT IGNORE THE "EVERYTHING IS OK" LET THE SCRIPT FINISH WHEN ITS DONE IT WILL CLOSE ITSELF IF YOU DOUBLE CLICKED IT OR IT WILL RETURN TO COMMAND PROMPT!!!

Run time could be up too 20 minutes on a big theme/rom, but faster that waiting!

Update 3:
Removed verbose but added optopng verbose just let it run. It works but you have to let it finish, the cmd window will close it self.

Update 2:
Added verbose output so that you guys will know to close it out before its done...even tho 7zip says everything is ok... just let it do its thing.

Update 1:
Had the optimization stuff commented out... sorry its back on.
Script will clean up now after it finishes.

JAVA CLASSPATH:
Its needed for the signer to work properly goto a command prompt and type in java -version. if you get and error back java is not in your classpath and needs to be.

just right click on my computer, then goto properties, then click on the advanced tab, at the bottom click on the "Environment Variable" button.

Now click on the new button... the one on the bottom for system variable and put in this
variable name: JAVA_HOME
variable value: C:\<path-to-where-java-is>

Now click ok and select the path system variable and then click edit. IMPORTANT only append to the end of the value this... ;%JAVA_HOME%\bin

then click ok and ok out of all those windows and open a new command prompt and type java -version you should get no error if you do your path to java was wrong follow the steps above again and make sure the path is correct.

WHAT THIS WON'T DO:
It won't port a HDPI to MDPI theme... well it might some what but I have included no code to shrink (later).

It won't port over xml or smali edits.

It wont port over what it can't find... so if your theme has a facebook widget or something but the rom does not then it will ignore that.

It will not port over fonts or anything other than the framework-res.apk and all the themes apks in the system/app folder. If this is popular Maybe other stuff can get included.

WHAT THIS WILL DO:
Push over all the themes pngs from the apk with it to the roms matching apk.

Optimize every png in the theme you are porting over.

Zip align all the apks in your newly themed rom.

Sign the newly themed rom.

Give me feed back.
I might make this easier and make the injector steal the apks for injection right from your phone and then inject and make a flashable to put right back on... tell me what you think.


Originally Posted by ehac1680 What does yours do that this one doesn't do?
well it optos, zip aligns annnd it signs all in one step. while I have looked at that one a while back it's alright I just feel mines easier to use.

So while this isn't necessarily a full porter per say. its one step and alot easier to use than that, and it does the extras like zip aligning all the apks, optos and signing. Your finished product is ready to be flashed. No unpacking zip or apks, worrying about signing or zip aligning.

Its your choice!

Edit:
While I do have a technique for doing hdpi to mdpi even the 9ptach, its buggy and reallies on assumptions.

I know for a fact that his does not work (or barely works just read the thread) for hdpi to mdpi and is over all very tricky to use. While mine does not include the hdpi to mdpi I might include that later to my one click suite of tools. But I can tell you 9 ptach porting is likely impossible at best mine will port a 9patch but in about 5-15% of the time is gets bad patch data because of the method I use to port it.... witch I can tell you is the only way you can do it.

Mine will also work across roms and if you guys want I'll put the theme porting code in even the 9patch resizing... so you guys can se my super secret method of porting 9patch pngs.

XDA Developers
 
Last edited by a moderator:
Top