How to Port Themes

jcole20

Well-known member
Jan 3, 2012
428
56
0
Visit site
I've been working on themeing these phones for awhile now. I've never themed anything myself until these phones, so I've learned how to do so simply by using these phones and trial and error. I figured I'd give some insight on how to port themes to these phones. Once you get that aspect of it down, you could probably work to create your own.

Tools needed:
-Paint.NET (I have gimp and photoshop I still use Paint.NET for this because it works better shockingly enough)
-7-ZIP or WinRar

Ok now on to the steps...

Heres a quick definition of a couple of terms that you need to know when going into this.

MDPI = Resolution of 320x480 (The Optimus Slider and Optimus Q)
HDPI = Resolution of 480x800
HEX Code = the color code of a given color... eg 33b5e5 = the android ICS blue

Now, your first step needs to be downloading the two apps above (Paint.NET and 7-zip or Winrar). Once you have those two apps downloaded you're ready to begin themeing your phone. I'm going to explain to you how I do it. Generally the two files on your phone you're going to be themeing are the Framework-res.apk and SystemUI.apk. So you want to copy those two files to your computer. (It's a good idea to have a version of both saved prior to making any changes in case you want to go back to the way you were without restoring from a backup).

Now that you have your two .apk's (I'll walk you through porting a cyanogenmod theme to your phone) you need to download a cyanogenmod theme you want to port over. It's essential here you make sure the theme supports MDPI devices (if you're porting to an MDPI resolution phone). Once you get your theme downloaded you should open the .apk and try to find the folder drawable-mdpi inside of the res folder of the apk. Take that drawable-mdpi folder and drag it somewhere. Inside of this folder are your icons you're attempting to port to your theme. (A small tip, you can theme almost the entire android os using the other folders inside that .apk. The dialer is contained in the drawable-finger-mdpi folder. ) You also need to take the drawable-res folder from your current framework/systemui and drag it somewhere.

Cyanogenmod themes call on the apk they're themeing by prefixing the file names with the selected .apk. A quick example is (other than on our phones) the signal bar is labeled stat_sys_signal_0-6(Depending on signal strength)_fully (when connected to google). In cyanogenmod themes these file names are something like com_android_systemui_stat_sys_signal_0-6_fully. The prefix systemui tells you what .apk you need to put the icon in. So what I do is go through the theme im trying to port and rename the file to stat_sys_signal_0_fully. The zero represents no signal whereas the fully means you're synced to google. On our phones a prefix of sprint_ goes at the beginning and fully becomes green. Take the finished renamed file and drag it into your SystemUI.apk res/drawable-mdpi folder. You want to copy and replace said file in your current framework or systemui drawable-mdpi folder. Once you've finished themeing/renaming all the icons drag your edited drawable-mdpi (the one that came out of the framework/systemui.apk you took off your phone) back into the .apk (you need to have it opened in Winrar or 7-zip.) What I'll usually do, is if im editing say framework-res.apk I'll delete the drawable-mdpi folder (after I copy it somewhere on my computer) from the .apk. Once I'm done editing it I'll drag it back into the .apk.

After you complete your themeing you can take your framework-res.apk and SystemUI.apk over to the universal online theme kitchen. UOT Kitchen . What I'll usually do here is just add window animations. Upload your newly themed framework-res.apk and SystemUI.apk and get your flashable UOT file. Take that file and flash it to your phone. Go through your work and look for any changes you'd like to make. Say you have an ICS themed signal icons, etc... but you want the Status Bar text to be themed the same color as your signal bar icons. Open a signal bar icon in Paint.NET and get the hex color code for your current theme. With this case we'll say we have ICS blue (Hex code #33b5e5). Go back to UOT and edit the status bar to make the text color #33b5e5. Reupload your (just flashed) framework-res.apk and SystemUI.apk and get a new flashable .zip. You can repeat this process (just remember to use your framework and systemui apk's you themed in UOT previously so as to not lose any changes) as much as you like until you get it perfect.

There you go, you've just ported a theme from one device to another. This may sound like a lot to take in, and it really is. It's also extremely time consuming, but once you get it down, you can port just about any theme. You can even begin to mix and match themes. Enjoy and let me know if you need any more clarification about these steps. Have fun themeing your phones!
 

Paul627g

AC Moderator All-Star
Moderator
Nov 25, 2010
15,963
2,752
0
Visit site
Great starter thread. Note, the above method is basically explaining how to do simple png (image) ports/changes. Most themes also have extensive modified XML coding (the language in which android is coded) done to the framework's and system apk's. So by using the above suggestions you may get the icons or image changes but there are other things that might not be so easy to achieve even using the UOT kitchen.

Also, you will see files when your modifying things with the extension ".9.png" those are draw9patch files. These are specially coded to stretch on command by the coding that is put into place when they are created. If you modify these improperly when flashed it can cause some real headaches. There are various guides and how to's on how to work with these 9 files and trust me there are a lot of them used throughout the android OS to achieve buttons, backgrounds, boxes, borders, etc..

Otherwise great starter guide to get interested parties involved and on their way to theming your own device.
 

jcole20

Well-known member
Jan 3, 2012
428
56
0
Visit site
Eh... the .9s I've had no problem simply porting over. (Replacing the current .9s). If its an mdpi theme you should have no trouble simply replacing the .9s. The .xmls you shouldn't need to touch. The themes that are phone specific or include animations are the only thing where .xmls will be touched. If you follow the walkthrough above you should have no trouble. As far as editing .xmls I can create a thread for that but there's really no reason you should need to with spare parts plus (app) and uot (website) readily available. Now afa themeing the color of say text in the drawer yes you'll need to edit .xmls but I don't really see the need.

Sent from my LGL55C using Tapatalk
 
Last edited:

Paul627g

AC Moderator All-Star
Moderator
Nov 25, 2010
15,963
2,752
0
Visit site
Eh... the .9s I've had no problem simply porting over. (Replacing the current .9s). If its an mdpi theme you should have no trouble simply replacing the .9s. The .xmls you shouldn't need to touch. The themes that are phone specific or include animations are the only thing where .xmls will be touched. If you follow the walkthrough above you should have no trouble. As far as editing .xmls I can create a thread for that but there's really no reason you should need to with spare parts plus (app) and uot (website) readily available. Now afa themeing the color of say text in the drawer yes you'll need to edit .xmls but I don't really see the need.

Sent from my LGL55C using Tapatalk

Your right. I was just pointing out a brief history behind the 9's. People love to play with those as I did when I first started doing themes. Then they flash them after modifying them in Gimp or other editors and can't figure out why the images are distorted or even in some situations cause an application to FC because it breaks the set boundaries of the png.

Good thread, just adding in a little advice....

Another good thread to help people looking into doing more advanced editing... I have learned from this as a base and many others..

[Guide] Learning To Theme: Putting the tools to use pt. 1
 

jcole20

Well-known member
Jan 3, 2012
428
56
0
Visit site
Cool cool... I'm trying to find a decent cyanogen theme to port outside of cyanbreadx. Can't really find anything I like.

Sent from my LGL55C using Tapatalk
 

Forum statistics

Threads
943,622
Messages
6,919,511
Members
3,159,126
Latest member
emii