[HOW TO] Port a theme.

Nick7

Brick Master
Dec 3, 2010
1,038
951
0
Visit site
BEFORE YOU EVEN THINK ABOUT PORTING A THEME, KEEP IN MIND THAT IF YOU WANT TO USE OTHER PEOPLE'S WORK, YOU BETTER ASK THEM FOR PERMISSION AND GIVE PROPER CREDIT !!

Anyways, here is a guide on how to port a theme assuming you are running Windows.

Requirements:
-Android SDK
-JDK

Build your framework-res.apk off of this file if you want it to be compatible with reboot mod.

Instructions:
1. Download this zip file.
2. Unpack the files on your desktop.
3. Download stock deodex theme template
4. Download the theme you want to port.
5. Copy the contents of the theme you want to port into the proper folders of Theme Porter/old
6. Copy the corresponding files from the stock theme template into Theme Porter/new
7. Run Script.bat

Now you have to get down and dirty with LGE-res.apk which contains the image files for signal and airplane mode.

8. Copy LGE-res.apk from v9optimusS_Deodex_Template/system/framework to Theme Porter/new/framework
9. Navigate to LGE-res/res/drawable

In here you will find the files for signal and airplane mode, but wait! They have the extension .pro .. So what you need to do is find the .png files of signal and airplane mode of theme being ported (framework-res/res/drawable-mdpi) and rename them to match the ones in LGE-res.apk along with the proper extension (.pro). Now put them in the LGE-res/res/drawable folder.

Wasn't that fun? Okay now the new theme is ready to be packaged.

10. copy the contents of Theme Porter/new into the corresponding folders of template.zip
11. Move template.zip to Auto-Sign
12. Open cmd
13. ASSUMING THAT YOU ARE DOING THIS ON YOUR DESKTOP. Type cd c:\\users\(your username)\desktop\auto-sign\
14. Now that you are in the Auto-Sign folder type
Code:
java -jar signapk.jar testkey.x509.pem testkey.pk8 template.zip newtheme_signed.zip
15. Now your new theme is in the Auto-Sign folder and its name is "newtheme_signed.zip" W00t!

Credit:
Daneshm90 for his theme porter.
Dave Da illest 1 for his auto-sign tool.
 
Last edited:

KSmithInNY

#winning
Oct 7, 2009
3,538
1,441
0
Visit site
Nick, first thanks for doing this BUT i want to reiterate what Nick said ...

DO NOT go porting peoples work without their expressed permission. Additionally, if the person decides to give you permission, please give them proper credit for their hard work AND post a link back to the persons original thread for the mod that way if they have a donate button the person who spent their hard time making this can receive the financial donation.

Theft of apps/ROMs/MODs/Themes ... theft in general, will not be tolerated. Please brush up on the forum guidelines (specifically the "illegal activites") linked in my signature.
 
Last edited:

rodcpierce

Android FTW. Apple FTL
Aug 5, 2010
96
6
0
Visit site
this doesnt work. I cant open the a.pk file to edit it, and also when I copy the code in CMD, it says that Java is not recognized as an internal or external command, operable program or batch file.
 

simon.ponder

Well-known member
Dec 3, 2010
444
46
0
Visit site
I made sure I had the update script in the same place you have it in the SME theme, and when I flash mine, I get E:/ can not find update script.
 

Nick7

Brick Master
Dec 3, 2010
1,038
951
0
Visit site
I made sure I had the update script in the same place you have it in the SME theme, and when I flash mine, I get E:/ can not find update script.

Tell me the exact directory of your update script.
ex. "theme.zip/META-INF/com/google/android/update-script"
 

simon.ponder

Well-known member
Dec 3, 2010
444
46
0
Visit site
That is exactly what it is, like you have it in the example.

EDIT: After I drop everything in the template folder, I use 7-zip to zip it, before using the Java class to sign it. Is 7-zip an issue or could it possibly be the keys used? IDK
 
Last edited:

shortyjacobs

Well-known member
Dec 2, 2010
443
89
0
Visit site
Nick7, you're a pretty hoopy frood.

I haven't tried this yet, but I'm sure it'll come in handy sooner or later, (after I expressly ask permission from whatever theme builder I decide I want to port :D)
 

Nick7

Brick Master
Dec 3, 2010
1,038
951
0
Visit site
That is exactly what it is, like you have it in the example.

EDIT: After I drop everything in the template folder, I use 7-zip to zip it, before using the Java class to sign it. Is 7-zip an issue or could it possibly be the keys used? IDK

It's 7zip, I had this problem too when I started. instead of choosing the entire folder to zip the file you need to multi-select the internal folders (system and META-INF) to zip them. In reality though, you shouldn't need to zip anything. That is why I provided the template.zip. Just drop your files in template.zip and auto-sign it.
 

ZAvonAJ

Member
Jan 28, 2011
19
4
0
Visit site
I've ported a theme using this (great method, had fun staring at the res folders) but I keep getting the "Android Keyboad" error and it saying force close.
 

ZAvonAJ

Member
Jan 28, 2011
19
4
0
Visit site
Okay thanks, added the lib folder into the zip as well and tried flashing theme again and it worked. Theme succesfully ported (I think).
 

captmeach7

Well-known member
Nov 28, 2010
218
23
0
Visit site
I'm not trying to port a whole them just change the lockscreen background to a different image. So i tried a few things. First i opened framework-res.apk with 7zip and added a modified keyguard_screen_tab_unlock.xml and keyguard_screen_tab_unlock_land.xml to layout. I changed the #70000000 to @drawable/lockscreen and i added a 455x320 PNG to drawable folder named lockscreen. I tried pushing the apk back in recovery (i didnt sign the first try then i tried signing the 2nd) I couldnt get past the ANDROID boot screen it just freezes. I tried running adb -d logcat > log.txt (in tools folder) and waiting but the file is always empty and it never shows that the phone responds i have to ctrl + C. (tried the framework-res.apk from Thunderom and the stock template)

When i decompile with apk manager i dont know which files are dependencies( i tried framework.jar + .apk but it says thats not it. I tried lge-res.apk but it never compiles back.)

If i decompile without dependencies when i try to compile it always throws errors. It still lets me proceed with building after pressing a key though. i am able to sign it also. If i push this to phone in recovery i get bootloop. If i push from adb then i get facebook force closes and after reboot it loops. I feel like i am missing something though. Any help is appreciated.

When i push to phone i am either in recovery with system mounted or by adb by remount then push then remount.
oh and also tried adding the @drawable/lockscreen to
keyguard_screen_password_landscape.xml
keyguard_screen_password_portrait.xml
keyguard_screen_unlock_portrait.xml
keyguard_screen_unlock_landscape.xml

this is my apk manager log http://db.tt/nFhSVT6
 

Nick7

Brick Master
Dec 3, 2010
1,038
951
0
Visit site
I'm not trying to port a whole them just change the lockscreen background to a different image. So i tried a few things. First i opened framework-res.apk with 7zip and added a modified keyguard_screen_tab_unlock.xml and keyguard_screen_tab_unlock_land.xml to layout. I changed the #70000000 to @drawable/lockscreen and i added a 455x320 PNG to drawable folder named lockscreen. I tried pushing the apk back in recovery (i didnt sign the first try then i tried signing the 2nd) I couldnt get past the ANDROID boot screen it just freezes. I tried running adb -d logcat > log.txt (in tools folder) and waiting but the file is always empty and it never shows that the phone responds i have to ctrl + C. (tried the framework-res.apk from Thunderom and the stock template)

When i decompile with apk manager i dont know which files are dependencies( i tried framework.jar + .apk but it says thats not it. I tried lge-res.apk but it never compiles back.)

If i decompile without dependencies when i try to compile it always throws errors. It still lets me proceed with building after pressing a key though. i am able to sign it also. If i push this to phone in recovery i get bootloop. If i push from adb then i get facebook force closes and after reboot it loops. I feel like i am missing something though. Any help is appreciated.

When i push to phone i am either in recovery with system mounted or by adb by remount then push then remount.
oh and also tried adding the @drawable/lockscreen to
keyguard_screen_password_landscape.xml
keyguard_screen_password_portrait.xml
keyguard_screen_unlock_portrait.xml
keyguard_screen_unlock_landscape.xml

this is my apk manager log http://db.tt/nFhSVT6

Try this.
 
  • Like
Reactions: captmeach7

s33ker

Well-known member
Nov 9, 2010
105
9
0
Visit site
Nick, first thanks for doing this BUT i want to reiterate what Nick said ...

DO NOT go porting peoples work without their expressed permission. Additionally, if the person decides to give you permission, please give them proper credit for their hard work AND post a link back to the persons original thread for the mod that way if they have a donate button the person who spent their hard time making this can receive the financial donation.

Theft of apps/ROMs/MODs/Themes ... theft in general, will not be tolerated. Please brush up on the forum guidelines (specifically the "illegal activites") linked in my signature.

What if the OP on xda/wherever "stole" the theme in the first place. Burst GatorBoots is clearly a HTC Sense rip.
 
Last edited:

Trending Posts

Forum statistics

Threads
942,377
Messages
6,913,748
Members
3,158,382
Latest member
gkapidis