[HOWTO] Theming your Sense framefork for newbies

Dr.Romca

Senior Member
Dec 12, 2008
768
207
0
Prague
It's not much, but I thought everyone should be able to theme their Legend :)

Requirements: WinZip(or any other zipping program), Android SDK, testsign, some graphics editor...

So what you need to start with is your framework files:
framework-res.apk, com.htc.resources.apk ... both are located in SYSTEM:framework/

These files are just renamed zip files, so rename them back to .zip and extract them (you can also edit them inside WINRAR or something, but it is more comfortable if you extract them)
In these, images are usually saved in res/drawable-mdpi or such, but you have to think here, allways modify all files from one resource ;)

Now locate the images you want to edit but I only know how to edit .png files (.9.png files are for a different howto, probably not by me as I've never really mastered it)
Pick those you want to edit, and edit them (I'm not gonna tell you how here, I usually use photoshop to do that ;) )

Once you have edited those images, it is recomended to optimize those png's (Firstly to make them smaller, but more importantly, most of the times the png's from Windows graphics editor didn't work for me...)

To optimize png's you can use:
OptiPNG: DOWNLOAD This one is drag'n'drop batch conversion capable...
Pngcrush: DOWNLOAD Command line utility, but it has more settings
...or something else, but I find these two the best

Once you have these optimized, copy and re-write them to folders you took them from to edit...

Now you need to zip these back, for framework files I was told it is usual to zip them as "store", but correct me someone if I'm wrong.

After you have zipped those, they will have to be re-signed. To do this, use testsign from code.google.com

Then run this in cmd line (or create a .bat file as I did, it's much easier):
Code:
java -classpath testsign.jar testsign [COLOR="DarkRed"]file.zip[/COLOR] [COLOR="DarkRed"]file-signed.zip[/COLOR]
Now that you have signed it, it is recomended to zipalign it:
(zipalign.exe is located in /tools in your SDK)

Run this in cmd line:
Code:
zipalign 4 [COLOR="DarkRed"]infile.zip[/COLOR] [COLOR="DarkRed"]outfile.zip[/COLOR]
(4 is alignment in bytes)

Now that you have aligned the .zip, rename it to the original name and then you just need to push it back to your phone:

Code:
adb shell mount /system
adb push [COLOR="DarkRed"]com.htc.resources.apk[/COLOR] /system/framework/[COLOR="DarkRed"]com.htc.resources.apk[/COLOR]

or

adb push [COLOR="DarkRed"]framework-res.apk[/COLOR] /system/framework/[COLOR="DarkRed"]framework-res.apk[/COLOR]
And you're done :)
I hope this helps someone! Enjoy!

note: This way you should be able to modify any apk I think :)
 
Last edited:

Dr.Romca

Senior Member
Dec 12, 2008
768
207
0
Prague
Amongst other things...but this works on any ROM as long as you follow the guide ;) I've succesfully ported my BattMod and Cryshop's navbar/lockscreen to B0.8 while doing these exact steps ;)
 

Dr.Romca

Senior Member
Dec 12, 2008
768
207
0
Prague
Right on :) I think it's simple enough...besides, I had to figure this all out myself...
It's nice when people use that round head sitting on their neck :p
 

stegg

Senior Member
Aug 29, 2008
496
54
48
Milan
Why? He gave you quite simple instructions on how to construct it yourself, so he wouldn't need to do that for every single release for any of you.


Sent from my HTC Legend
you have some personality disorder, you'd better see someone specialised in mental health care
 

BlaY0

Retired Recognized Developer
Sep 15, 2007
1,553
566
0
Medvode
you have some personality disorder, you'd better see someone specialised in mental health care
I will do that as soon as you contribute at least one theme for three different roms and then supply new updates for every new release of those roms...


Sent from my HTC Legend
 

Dr.Romca

Senior Member
Dec 12, 2008
768
207
0
Prague
you have some personality disorder, you'd better see someone specialised in mental health care
Oh come on stegg, that was uncalled for :( I just think it's a better idea to share how I did it rather then do all the work for you. Hell it would be a full time job - making themes for everyone :rolleyes:

...too bad there isn't a "what the hell?" button ...
 
  • Like
Reactions: whitetigerdk

madcat340

Senior Member
Nov 15, 2010
81
6
0
Question ; are there any limitations to what you can port like different functioning slide bar / nav bar?

Sent from my HTC Legend using XDA Premium App
 

Dr.Romca

Senior Member
Dec 12, 2008
768
207
0
Prague
This howto only tells you how to replace png's inside those framework .apk packages. And you can change navbar as well, but you'd have to make it in the same shape as long as you don't want to decompile the apk...
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone