Need help making a theme - Epic 4G Q&A, Help & Troubleshooting

So I'm a bit of a noob. I'm attempting to create a theme and I cannot figure out where to edit the noti bar as well as the lockscreen image. For the lockscreen, I just want to keep the same tw lockscreen, but I want to change the padlock/background. Any help would be amazing as I am truely stumped.
If this needs to be in general, please move me

The file(s) that you are looking for are located in the framework-res.apk package located in a ROM/Theme. Inside of the .apk is a folder called res, and inside it is a folder called drawable-hdpi. This folder contains the majority of images used to make a theme look a certain way. In order to change the status bar, you need to edit the file statusbar_background.png. The lock screen one is in this folder too.

Nice. Thank you sir
Sent from my SPH-D700 using XDA App

I figured since the question has been answered I could just hijack this thread instead of making a new one. I am pretty new on modifying Android ROMs and would like to know where I should start first if I wanted to create my own theme? I would like to do some simple modifications first like icons and colors. Where can I find the necessary materials to get started? Like a fresh Touchwiz 2.5 template from the epic? Or do I just extract them from the stock ROM, if so, how? Thanks.

The files are accessible from the ROM if you open the zip and go to /system/framework then extract framework-res.apk
From there, you can open the apk with a tool like WinRAR and navigate to /res/drawable-hdpi as thomasskull666 mentioned. You can extract the png files from there and then just drag them back in once modified. Then just drag the framework-res.apk back into the ROM zip and flash it and bask in the glory of your handiwork.

Best advice is organize your workspace. You will have so many folders in folders your head is going to spin! What I do is copy the framework-res.apk, twframework-res.apk into a folder on your PC called STOCK DI18 Theme. *Make sure you pull these files from a deodexed rom or you'll have issues! Drawable-hdpi folder inside of both framework-res.apk files is where the brunt of you mods will be. If you are feeling daring, after changing the images in there you can begin to pull the drawable-hdpi from apps as well as long as you drag out the drawable folder, make your edits, then drag the edited folder right back in the zip, you'll be fine. Don't touch .9.png files if you don't know how to program them, I'm guessing you don't. Don't worry, edit everything else first to get that "feel" for what you are getting into. From there then research the .9.png files.
I highly recommend using 7zip for all of this, it is less of a headache. This is the basics of what you'll be doing to everything. Lets say you were going to do all this right off of your desktop. Make a folder on your desktop called STOCK DI18 Theme. Copy your framework-res.apk and twframework-res.apk into that folder from your deodexed rom. ANY TIME YOU NEED TO TAKE THESE FILES TO EDIT FOR YOUR THEME, COPY THEM FROM THIS FOLDER, NEVER SAVE THE CHANGES BACK INTO THIS FOLDER. This is important because you want easy access to all your stock files. Copy your system/framework and system/apps in here.
Now if you want to work on the framework-res.apk first. copy it to the desktop. Right click and choose 7zip-open archive. You can see the file structure of the apk. Click twice on res and you will see all the folders including drawable, drawable-hdpi, etc. Drag and drop drawable-hdpi to your desktop. Edit anything you want in there except a .9.png. Save the files into that same folder. Then drag and drop the folder right back into the archive where you got it in the first place. Then say your all done. Drag framework-res.apk back into the zip your going to flash on your phone in the same method.
Another quick tip, if you don't have an update zip and you have no idea what you are doing, download any working theme from here. Grab one of mine, and copy your framework-res.apk, twframework-res.apk, apps, etc over what in there. Make sure not to leave nothing it will show up in your theme! Any thing you need clearing up on, PM me, this should be plenty to get you started. To theme an app, right click say alarmclock.apk choose 7zip-open archive and do your magic again. As long as you only change the pictures in there you won't alter the signature on them so don't be afraid to mess with it.
Lastly, the Epic's framework is LOADED with files that it doesn't even use so be careful you not spending too much time editing a file you never seen on your phone before!

dreamsforgotten said:
Lastly, the Epic's framework is LOADED with files that it doesn't even use so be careful you not spending too much time editing a file you never seen on your phone before!
Click to expand...
Click to collapse
Excellent tip, this is especially helpful if you are trying to port a theme as not all of the .png's will match up. Make sure you know what you NEED to be replacing as opposed to what is optional. Also I don't know if it was mentioned before but there are some files (especially in twframework-res) that have a .9 before the .png. These are not your run-of-the-mill png files, and they need to be specially edited to preserve their formatting. I recommend avoiding these if at all possible, but there is a way to edit them if you are feeling really adventurous. Here is the link to that post:
http://forum.xda-developers.com/showthread.php?p=5206698
My suggestions for success: If you really want to make sure you are editing only the files that you need to edit in framework-res.apk, download a few custom themes or ROMs and extract the framework-res.apk from them. Then use a program such as UltraCompare to compare the files and folders inside each to find common files. This will help you pinpoint exactly what needs to be edited and what needs to be left alone. Lastly, like dreamsforgotten stated, be sure to have a good work directory from which to edit these .apks, as you will be working with folder after folder after folder. Organization is key, and patience is required

Related

Theme On The fly Think Tank

Just wanted to create a Post so people can bounce ideas off each other as to what would be necessary to change themes on the fly. How does a normal phone change themes?
i just have a folder on my SD card called themes and i update it everyday with everytheme and the latest version of each, the themes folder has all my themes separated into adp1 adp1.1 rc30 and rc33 and i use linda file manager to move them to the root and rename them. i can flash any theme anytime i want. and if a new one comes out while i'm not near a computer i download with steel and try it out.this is the best way as far as i can see, at least with the tools i have access too
anyone seen the iphone emulator? it actually works where it will open a program associated with the icon, could that possibly help get a way to theme similar to how summerboard works?
jdwme said:
anyone seen the iphone emulator? it actually works where it will open a program associated with the icon, could that possibly help get a way to theme similar to how summerboard works?
Click to expand...
Click to collapse
That's not even close to being a theme though.
A proper theme is more than just smoe icons.
IE. iKid has a much nicer looking media player.
i use the exact same method w the themes on sdcard... i take it one step further... i use andftp to upload to my qctx.org server and upload directly tested themes... so i can access and organize however i need
- great for backing up sdcards
This is how I edit my themes on the fly
Walkthrough for creating your own Android theme
First you need to get signing setup properly. This topic is covered in many places and my recommendation is to use the Stericson walkthrough or the Stericson auto-signing setup tool. Once you can click on any zip or apk file and get the option to Resign it you are ready to proceed with making your own theme.
1. Download an archive manager that allows you to open archives inside of archives without creating new windows. My recommendation for this is the application 7-zip. It is tiny, free, easy to use, and on all my computers it has replaced winzip and winrar.
2. Now take a blank theme from Stericson to use as your starting point, this will be the minimum needed to change your theme and will contain all the original artwork.
3. Open the update.zip and inside are typically 3 files, framework, system or app, and META-INF. Leave META-INF alone, you wont be touching that. Inside framework and system/app is where the files are that you can change. In this case we will open update.zip, then double click framework and then double click framework-res.apk (this is where the next archive will open inside the same window, your life just got a little easier).
4. Now you are looking at assets, META-INF, res, and a couple other random files, the resources.arsc can be edited but I will show you that in another tutorial. Now open up the folder res and you will see the treasure we are searching for, folders with the name drawable. All of the folders that start with the name drawable are where we can edit the themes, this includes drawable, drawable-land, drawable-port, and drawable-finger.
5. Now drag and drop the folders drawable and drawable-land onto the desktop. Once they are on the desktop you can edit the .png files in those folders until you are ready to put your theme together.
6. Now in your still open window at \framework\framework-res.apk\res\ you will open the drawable folders one at a time and drag and drop your edited files into the archive, only dragging and dropping the files you edited and not just everything inside the folder.
7. Once you have your new images copied into the archive in the correct place you can just hit the close button or browse up a couple directories and find other files to edit. Any time you edit an apk and browse out of it or close it you will be prompted to update it in the archive by 7-zip (this is my secret shortcut), always press ok.
8. Now you have a freshly created theme ready to install, all you have to do is right click, chose to Resign the file, and once its done you can copy it to your SDcard, make sure its named update.zip, and flash your new theme.
Its literally that easy! And you use this same technique in the system/app folder to edit the apk files for the individual apps on the phone. Explore around in the update.zip and see what you can find, I only told you about the major items but there is plenty more to find and change. You can always copy a folder out of the archive and if you cant edit anything just toss it but if you can find something to edit, do so and throw it back in the archive. You guys now have all the info I had when I started plus all my tricks to making that process 10x easier.
jdwme said:
anyone seen the iphone emulator? it actually works where it will open a program associated with the icon, could that possibly help get a way to theme similar to how summerboard works?
Click to expand...
Click to collapse
The thing with the iPhone is that the applications are just folders with a .app extension at the end. This allows one to easily replace resources inside of them using just simple scripts.
In Android, the applications are zip files with an extension of .apk and must be signed. This makes it harder to replace resources on the fly.
I use the Discover App from the MarketPlace. I have a folder called Themes in my SD Card which I have separate folders labeled with the name of the theme. Inside the folder I have the update.zip. With discover I just move the update zips in and out of the folders to change themes.
Rich

Theme Creating Help

I Downloaded A Theme From The Forum (EnamoRED) But Didn't Like Certain Parts Of It. I Am On A Mac. On My Evo Im Running The Latest Stock Rom W/ Full Root.
I Extracted The Signed Zip File Which Then Revealed Two Folders, "META-INF" & "system".
I The Navigated To "system" and that revealed two files also, "app" & "framework".
I Then Went Into "framework" which revealed two files "com.htc.resources.APK" & "framework-res.APK".
I Extracted Them And Within Those Two Folders Were Plenty In Each Of Them. I Went To "Res" In Each Of The Two Folders (com.htc.resources & framework-res) And Changed A Couple Of PNG's.
Now I Want To "Archive" The Two Folders In "System/Framework" Back To ".APK". Also I Don't Know If I Would Need To Resign Them.
After I Have Everything Ready I Can Zip It Up, But Im Not Sure If Ill Have To Resign The ".Zip"?
Thanks Guys.
WILL DONATE TO SOMEBODY WHO CAN REALLY HELP!!!!!
EDIT:
This Is What I Have. Original On Top, My Edited Files On Bottom. Just Need To Make My Folders ".APK'S" And The Sign The Fianl Zip.
View attachment 362096
Somebody Please Help!!!!! Im Going To Be Away From My Computer Soon And Would Liek To Batch This Up!
I just started getting into theming a bit too. I have a win7 PC so it might be a little different, but the tutorial i was following said to open the zip/apk's with an extractor, drag the drawable folders out, make your changes, drag the modified files back in ( "update" the archive if prompted ) & then sign the original zip file. I forget which thread it was, but they said signing it may not be necessary.
yes, what Veritas06 said. Don't rezip all the files that you extracted, just drag and drop the files you modified into their respective folders in the pre-existing archive. Signing should not be necessary if you do it this way.
With HTC apk's in the /system/app folder, usually you can just remove and reinstall the new apk to change, the ones in /system/framework should work the same way.
Thanks guys, so what im trying to do is re-instate an apk file back to an apk. i extracted it so that i can edit the pngs within. was i supposed to extract it? from what im reading, with 7zip you can change files within an archive without extracting it? is that what im supposed to do to keep my file as an apk? i also have a win 7 pc that i donated to my mom but i still have access to it so may try it.
This Is What I Have. Original On Top, My Edited Files On Bottom. Just Need To Make My Folders ".APK'S" And The Sign The Fianl Zip.
View attachment 362093

[Q] Guides for Theme'ing?

Let me first start off by saying I do not know much. So I am asking if anyone knows of some beginner guides to start creating my own theme's.
1) Is it basically scripting? Or will I have to write completely new code for all my functions... By the way, I fail at programming, so please inform me so I don't waste my time.
2) Would someone like me who does not know much scripting, have a hard time doing this or is it relatively quick to pick up?
3) Is it done on the phone or through the ADB Shell?
Thanks a bunch in advance.
It is done with photoshop and 7zip......all it is is replacinng drawable icons from the res folder
Sent from my ADR6300 using XDA App
jdkoreclipse said:
It is done with photoshop and 7zip......all it is is replacinng drawable icons from the res folder
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Thanks for the quick reply, do you have any possible examples to show me how to do this?
You going to do your editing on the computer. I believe the command is
Code:
adb remount
adb pull framework-res.apk /Desktop/Theme
/Desktop/Theme is a directory you create on your computer. If adb pull doesn't work just download what ever rom your using to your computer and copy and paste framework-res.apk out of /system/framework.
Afterwards you can use 7zip to find the files you wish to edit. Its been a while for me but i believe most files are located in drawable-hdpi. Use Gimp or Photoshop to edit whatever images you want to. Do not edit any images with file extensions .9pngs as they require some additional steps, and can cause issues when you try and put it back on your phone.
Once your done move the files to the tools directory of sdk. cd to that directory and run..
Code:
adb remount
adb push framework-res.apk /system/framework
adb reboot
That should work for personal reasons. If your looking to create an update.zip to release for others i can help you with that too.
tcberg2010 said:
You going to do your editing on the computer. I believe the command is
Code:
adb remount
adb pull framework-res.apk /Desktop/Theme
/Desktop/Theme is a directory you create on your computer. If adb pull doesn't work just download what ever rom your using to your computer and copy and paste framework-res.apk out of /system/framework.
Afterwards you can use 7zip to find the files you wish to edit. Its been a while for me but i believe most files are located in drawable-hdpi. Use Gimp or Photoshop to edit whatever images you want to. Do not edit any images with file extensions .9pngs as they require some additional steps, and can cause issues when you try and put it back on your phone.
Once your done move the files to the tools directory of sdk. cd to that directory and run..
Code:
adb remount
adb push framework-res.apk /system/framework
adb reboot
That should work for personal reasons. If your looking to create an update.zip to release for others i can help you with that too.
Click to expand...
Click to collapse
Excellent, thank you, I will give it a shot!
tcberg2010 said:
You going to do your editing on the computer. I believe the command is
Code:
adb remount
adb pull framework-res.apk /Desktop/Theme
/Desktop/Theme is a directory you create on your computer. If adb pull doesn't work just download what ever rom your using to your computer and copy and paste framework-res.apk out of /system/framework.
Afterwards you can use 7zip to find the files you wish to edit. Its been a while for me but i believe most files are located in drawable-hdpi. Use Gimp or Photoshop to edit whatever images you want to. Do not edit any images with file extensions .9pngs as they require some additional steps, and can cause issues when you try and put it back on your phone.
Once your done move the files to the tools directory of sdk. cd to that directory and run..
Code:
adb remount
adb push framework-res.apk /system/framework
adb reboot
That should work for personal reasons. If your looking to create an update.zip to release for others i can help you with that too.
Click to expand...
Click to collapse
Just noticed you are an expectant father, congratulations. I have a 6 month old, who is a ton of fun!
Ok, so I went through 'astro' found the file framework-res.apk inside of /system/framework as you stated above, the only problem is from adb shell, whenever I run pull, it gives me the following message:
Code:
'remote object 'framework-res.apk' does not exist'
I have debugging turned on, so I should have access, and adb mounted just fine...
If you have any ideas, I would appreciate it.
bboydp said:
Just noticed you are an expectant father, congratulations. I have a 6 month old, who is a ton of fun!
Ok, so I went through 'astro' found the file framework-res.apk inside of /system/framework as you stated above, the only problem is from adb shell, whenever I run pull, it gives me the following message:
Code:
'remote object 'framework-res.apk' does not exist'
I have debugging turned on, so I should have access, and adb mounted just fine...
If you have any ideas, I would appreciate it.
Click to expand...
Click to collapse
try mounting the partitions through Clockword Recovery. I've had issues in the past where a partition wasn't mounted, therefore the computer couldn't find it.
Hope it works, i'm looking to start theming some as well and this looks like it'll help!
Thank you. I don't think u need to be in adb shell. Try using astro to copy and paste that framework-res.apk to ur sdcard. Then just disk drive ur card and remove it.
Sent from my ADR6300 using XDA App
MMBosstones86 said:
try mounting the partitions through Clockword Recovery. I've had issues in the past where a partition wasn't mounted, therefore the computer couldn't find it.
Hope it works, i'm looking to start theming some as well and this looks like it'll help!
Click to expand...
Click to collapse
Thank you, I will keep that in mind.
tcberg2010 said:
Thank you. I don't think u need to be in adb shell. Try using astro to copy and paste that framework-res.apk to ur sdcard. Then just disk drive ur card and remove it.
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Lol, that works easily... thanks!
ok so i've used 7zip to pull the images from the drawable icons folder out of the framework res what's the simplest way to say add transparency to my notification window would I use Photoshop for this?
Also interested in a guide for this.
Sent from my ADR6300 using XDA App
HeyItsLou said:
ok so i've used 7zip to pull the images from the drawable icons folder out of the framework res what's the simplest way to say add transparency to my notification window would I use Photoshop for this?
Click to expand...
Click to collapse
Yes with photoshop you manipulate the image's transparency using a ton of different tools but the easiest being the blend tool by simply double clicking on the image in the layers pallet
EDIT* Hopefully that makes sense lol
jdkoreclipse said:
It is done with photoshop and 7zip......all it is is replacinng drawable icons from the res folder
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
dont forget xml files, for fully rounded theme you will have to modify some of these!
So you want to know how to theme heh. Cool, we need more themers!
Here is a guide to get you started:
The Ultimate Android Themeing Guide
Can't afford Photoshop? No problem, download Gimp, its free and will work great for themeing.
Download for Gimp
Dont know how to do something with your theme? Google to the rescue. For example; say you want to add a transparency to your image. Just google "how to add transparency with Gimp". Google can answer all your questions.
Couple things to keep in mind while themeing.
1: Dont change the size of the default image
2: Some images are 8-bit paletted. You are really limited on what you can do in 8-bit. While in your graphics program change the image to 24bit rgb or 32bit cmyk, do your edits then change the image back to 8-bit when you are done.
Instead of using adb to pull the apk's I want to edit I just extract them from the ROM itself. If you download your ROMS from ROM Manager they can be found on your SD card in the clockworkmod/download folder. For example Skyraider can be found in clockworkmod/download/pcjock.com/skyraider/Roms folder.
Inside the rom zip file you will see a folder structure similar to data/meta-inf/system/tools etc. There are 2 main apk's you are looking for:
framework-res.apk - this is the main "theme" area for droid devices
com.htc.resources.apk - this is the main "theme" area for sense based roms
Both of these can be found in the system/framework folder within the zip of the ROM. Editing these 2 apk's will theme about 80% of your overall look of the phone. The other 20% use their own png's found within the apk of that particular app. These apps can be found in system/app of the ROMS zip file.
What I do when editing a apk is extract the apk to my desktop. After I have the apk I want to edit there I open it up with 7zip and extract the whole res folder to my desktop (keep the apk open in 7zip so you can add the res folder back in after your edits). All the pngs you want to edit will be in the drawable folders (ie drawable, drawable-hdi, etc)
Pay close attention to the png files you edit. If it has a .9 in its name you need to take some extra steps when editing the file. A guide on editing .9 pngs can be found here. After you have made your png edits drag the res folder from your desktop back into the apk in 7zip. After that you need to create a update.zip file with your new theme in it. I use apk sign which can be found here. Thats it, your theme should be ready to go.
I hope this helps some. When in doubt do what I did, research, google, research and google some more.
Good luck!
djkms said:
So you want to know how to theme heh. Cool, we need more themers!
Here is a guide to get you started:
The Ultimate Android Themeing Guide
Can't afford Photoshop? No problem, download Gimp, its free and will work great for themeing.
Download for Gimp
Dont know how to do something with your theme? Google to the rescue. For example; say you want to add a transparency to your image. Just google "how to add transparency with Gimp". Google can answer all your questions.
Couple things to keep in mind while themeing.
1: Dont change the size of the default image
2: Some images are 8-bit paletted. You are really limited on what you can do in 8-bit. While in your graphics program change the image to 24bit rgb or 32bit cmyk, do your edits then change the image back to 8-bit when you are done.
Instead of using adb to pull the apk's I want to edit I just extract them from the ROM itself. If you download your ROMS from ROM Manager they can be found on your SD card in the clockworkmod/download folder. For example Skyraider can be found in clockworkmod/download/pcjock.com/skyraider/Roms folder.
Inside the rom zip file you will see a folder structure similar to data/meta-inf/system/tools etc. There are 2 main apk's you are looking for:
framework-res.apk - this is the main "theme" area for droid devices
com.htc.resources.apk - this is the main "theme" area for sense based roms
Both of these can be found in the system/framework folder within the zip of the ROM. Editing these 2 apk's will theme about 80% of your overall look of the phone. The other 20% use their own png's found within the apk of that particular app. These apps can be found in system/app of the ROMS zip file.
What I do when editing a apk is extract the apk to my desktop. After I have the apk I want to edit there I open it up with 7zip and extract the whole res folder to my desktop (keep the apk open in 7zip so you can add the res folder back in after your edits). All the pngs you want to edit will be in the drawable folders (ie drawable, drawable-hdi, etc)
Pay close attention to the png files you edit. If it has a .9 in its name you need to take some extra steps when editing the file. A guide on editing .9 pngs can be found here. After you have made your png edits drag the res folder from your desktop back into the apk in 7zip. After that you need to create a update.zip file with your new theme in it. I use apk sign which can be found here. Thats it, your theme should be ready to go.
I hope this helps some. When in doubt do what I did, research, google, research and google some more.
Good luck!
Click to expand...
Click to collapse
Thanks a lot for that post, exactly what I was looking for.
1 quick question, I was just trying to make a transparent background for my SmoothCalendar Widget, and I edited it in gimp fine, readded the png to the apk, moved the apk back to my sd card, but when I went to install it it just said "cannot install" from what I was reading, this is a signing issue -- is that where the apk sign program you linked comes into play?
scrdy said:
Thanks a lot for that post, exactly what I was looking for.
1 quick question, I was just trying to make a transparent background for my SmoothCalendar Widget, and I edited it in gimp fine, readded the png to the apk, moved the apk back to my sd card, but when I went to install it it just said "cannot install" from what I was reading, this is a signing issue -- is that where the apk sign program you linked comes into play?
Click to expand...
Click to collapse
That would be my guess. Attached is the program I use to sign single apk's (the one I linked earlier is a bit more involved and I use it for themes only).
With the one attached I would suggest using a public key, no need that I can see in using a private key (its more pain then its worth).
Also, I would suggest uninstalling the app before installing the one you themed, most will error out when installing (in my experience anyways).
There is a tutorial link in the zip file on how to sign your apk's. If you need some clarification let me know.
my problem (which is why I've never finished some of my themes) is that signing apk's never works for me
djkms said:
That would be my guess. Attached is the program I use to sign single apk's (the one I linked earlier is a bit more involved and I use it for themes only).
With the one attached I would suggest using a public key, no need that I can see in using a private key (its more pain then its worth).
Also, I would suggest uninstalling the app before installing the one you themed, most will error out when installing (in my experience anyways).
There is a tutorial link in the zip file on how to sign your apk's. If you need some clarification let me know.
Click to expand...
Click to collapse
I'll give that a go when I get home from work -- thanks for your help.
Excellent thread! I've been poking all around the place trying to find this info...

[Q] question on editing framework-res.apk

hey guys.
i'm having a frustrating issue when editing framework-res.apk to include the rectangle battery mod.
this is a long post...please DO NOT POST GENERIC ANSWERS WITHOUT READING THE POST FIRST!!!
i'm used to editing framework-res.apk and all other .apks on my phone for various purposes. i use a combination of 7zip and apkmanager 4.9 to extract, replace, decompile/recompile, etc. depending on what i'm doing.
at this point here's what i'm trying to do:
DaGunn provided me with a modified framework-res.apk which includes a buttonized power control widget (from JsChiSurf's thread). this is v2.0 (on the 3.29 ota). previously i had v1.0 which I had fully customized to my liking.
the file provided to me by DaGunn has the buttonized look, and some smooth sense elements, as well as the super circle battery meter.
i opened framework-res.apk he provided with 7zip and replaced all the 901 images in res/drawable-hdpi with my own 901 image files from my existing framework. these files all have the same exact name and same exact extensions. (hence when I drag and drop into the new framework-res.apk in 7zip i get a direct replacement rather than having extra files).
this has worked countless times in the past. as a matter of fact, it worked 99% of the way this time. all the framework images went back to my customized images. except the battery disappeared.
i narrowed it down to the battery images. if i leave his 101 circle battery .pngs and replace every other file in framework-res, it works just fine. all my images show and the battery shows up in the circle style. if i then just replace his 101 circle battery .pngs with my 101 matted blues rectangle battery .pngs, which are the same exact names (i checked!) and extension, and after I optimized them almost exactly the same file size as well, everything goes to crap. the battery doesn't show up at all in the title bar.
if i plug in the phone, the rectangle charging animation works, the download animation works, all other smooth sense animations that I have replaced with the mattedblues files from my previous framework work. except for the battery.
now, if his .pngs work, and mine replace his directly with the same exact name and extension, why would the battery display suddenly disappear?!
I'm being told it has to do with resource IDs, but here's the problem. I was provided a "guide" on how to properly modify framework-res by one of the guys involved in MattedBlues (beatblaster). in it I was told that I only need to recompile framework-res after adding NEW .pngs, that if the .pngs were already accounted for in resources.arsc then trying to recompile would throw errors and instead I should replace those .pngs with 7zip. that's what i'm trying to do but as I said, then the battery meter doesn't work.
if i decompile DaGunn's original file, I'm able to recompile it just fine. keep in mind this file already has a lot of modifications on it as it is. but if i decompile his framework, and I replace his .pngs with mine, and try to recompile, I get thousands of lines of error in the log. all having to do with public.xml, which I'm being told goes back to resource IDs.
what am i missing here? i know how to remove the battery display from the title bar so I dont have that empty space, but I do enjoy my percentage battery and I would like to get this to work!
any input will be greatly appreciated...
+5 points for you if you read this far!
I'm not clear if you are recompiling or just dropping the images in, but if you are recompiling try making all your xml changes without adding the new images. Then after its compiled drop your new images in.
Sent from my PC36100 using XDA App
i'm not modifying any xmls. only replacing .pngs. it's specifically clarified in the OP.
the existing framework, with its modified .xmls and .pngs as given to me decompiles and recompiles just fine. if i decompile, then replace the .pngs with my own, and try to recompile, then it gives error. if i just open it in 7zip and replace the .pngs with my own, the battery disappears, but no force closes or error messages.
anyone else?
Are any of the .png files you are replacing have the 9.png extension? I know modifying these is very tedious and requires a more difficult process. Also can u post the errors in the apkmanager log?
Sent from my DROIDX using XDA App
nope. the files are stat_sys_battery_0 through stat_sys_battery_100. all .png not a single one in any other extension.
i can't post the apk manager log because it is literally thousands of lines of errors.
what I can do is give you the framework as I have it, working with his battery .pngs and a separate .zip with my battery .pngs, so you can try to do it yourself and see the problem/compile errors.
it really is weird...or stupidly simple!
Firstly you SHOULD NOT be decompiling just to swap images, even .9 pngs. You only need to decompile if you are editing xml files which by reading your post you aren't. To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
t3project said:
Firstly you SHOULD NOT be decompiling just to swap images, even .9 pngs. You only need to decompile if you are editing xml files which by reading your post you aren't. To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
Click to expand...
Click to collapse
+1
The reason I was confused about what you were trying to accomplish is because you don't need to decompile unless changing xml's.
Thats what I do for non system apps. I'll give it a try in the morning and see if it makes a difference.
Swyped from my HTC Evo 4G on the MetroPCS 1X network!
Ok first if you go to recompile something and you get errors usally the first error is the one causing the problem. Look and see what the first error is and fix it, like has been said what you are trying to do using 7 zip is a good way to do it, not decompiling. You said this is how you prefer way to do it anyway so that's good.
Second I have found at times that 7 zip does not properly replace threw images so weird things happen, only happens sometimes. With that said try using apk manager to unzip the apk replace the images and rezip it do not sign it. See if that works
Third. If all else fails download nijamorph from the market. Put the images you want on your scard where I can find them easy. Open nijamorph and start a new project navigate to your framework-res.apk.from here you can do two things first you can press existing project and find what you are looking for and change one at a time or the easy way. Close the app open your favorite file manager find the pngs you are going to use, copy them, then navigate to android themes/workspace in there you will find the framework-resapk folder, in there is everything just like the apk so paste the files were they go (that last step can all be done on the computer if that is easier for you.) Next open your nijamorph app and press finish project follow the prompts and let it do its thing. If your phone does not reboot reboot it.you should be good to go.
Like always do a backup before doing these steps
Good luck
Sent from my unrEVOked using xda app
Max_Pain said:
Thats what I do for non system apps. I'll give it a try in the morning and see if it makes a difference.
Swyped from my HTC Evo 4G on the MetroPCS 1X network!
Click to expand...
Click to collapse
it works the same way when replacing pngs. compiling and recompiling is only needed if making xml/code changes. i had to learn this the hard way too. just make sure you sign system apps with option 12 instead of option 4 like you would with a non-system app.
t3project said:
To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
Click to expand...
Click to collapse
this worked!
dont know why I would have to extract, replace, compress, as I've NEVER done that with framework-res.apk, only when editing apps that need to be resigned. oh well, it worked
I think you misunderstood what I told you in the guide I gave you which is you only need to decompile/recompile when you are making XML code changes as stated above in a previous post. When I wrote that guide for you I wrote it thinking you wanted to add more features to the original power control widgets (such as smooth mods). If you want to simply replace PNGs, as stated previously, all you need to do is replace the PNGs without decompiling and recompiling.
In this instance, the problem you're running into is that you're trying to compile the framework using already-customized PNGs which will not work (another point that was stated in the guide as well )
So, in conclusion, if all you want to do is change the PNGs all you gotta do is (and you probably already know this but I'm including it to be thorough):
- Open archive (framework) in 7-zip
- Navigate to framework-res/res/drawable-hdpi
- Add your desired PNGs into the 7-zip window
- Close the 7-zip window and answer yes when 7zip asks if you want to update the archive
- Flash framework onto your phone
- All should be well
- When using this method there is no signing necessary!
Again, as stated previously, the only time you need to decompile/recompile is when you're going to edit an XML (or make any other code changes). So, for a final example of this, let's say you wanted to take DaGunn's power widgets framework but you wanted to change the "text highlight" color. What you would do then is this:
- Decompile DaGunn's framework in APK manager (option 9)
- Navigate to /projects/framework-res.apk/values/styles..xml
- Search for for "<item name="textColorHighlight">" and change the color HEX code
- Save the changes to styles.xml
- Compile the framework in APK manager (option 11)
- When asked if this is a system apk answer Y for yes
- When asked if you want to copy additional files to reduce the amount of errors answer Y for yes
- When prompted about the "keep" folder, open a file manager and navigate to /<apk_manager_folder>/keep and DELETE the resources.arsc file
- Go back to the APK manager window and press any button to finish the compile process
- Back in your file manager, go back to /<apk_manager_folder>/place-apk-here-for-modding/ folder, grab the unsignedFramework-res.apk, rename it to framework-res.apk and flash it however you flash it.
- Test your changes (in this example, the text highlight color)
This concludes my post.
thanks for the clarification beat.
but the problem was I was just opening framework-res.apk with 7zip, doing it like you're saying to do in the first part of your post above, and the battery meter would disappear instead of showing the mattedblues battery images instead of the circle ones.
if i left his .pngs in, the battery would show. if i replaced his with mine using 7zip, the battery would disappear.
this confused me because this is exactly the way that I've been integrating mattedblues into every framework i get. i open in 7zip, replace existing files with my own, and bam, everything works. this time it didnt!
this got fixed by extracting, replacing, and compressing again in apk manager 4.9.
i tried decompiling/recompiling simply because I was so out of ideas as to how else to go about it. I don't need to make any .xml changes to DaGunn's file because he had already integrated most of smooth sense with the percentage battery and v2 of the power widgets
anyways, thanks for the clarification.
beatblaster said:
So, in conclusion, if all you want to do is change the PNGs all you gotta do is (and you probably already know this but I'm including it to be thorough):
- Open archive (framework) in 7-zip
- Navigate to framework-res/res/drawable-hdpi
- Add your desired PNGs into the 7-zip window
- Close the 7-zip window and answer yes when 7zip asks if you want to update the archive
- Flash framework onto your phone
- All should be well
- When using this method there is no signing necessary!
Click to expand...
Click to collapse
max, not sure why this wouldnt work for you.
t3project said:
max, not sure why this wouldnt work for you.
Click to expand...
Click to collapse
no. this method is SUPPOSED TO WORK, as I said in the original post. this is how I've done every single change to framework-res.apk in the past. that is why I felt the need to ask for help. because the same thing that has always worked, suddenly wasn't working anymore!
for some reason, using 7zip WAS NOT WORKING to replace the battery .pngs....but ONLY those files. every other file was replaced using 7zip and they all worked. the only files I ended up having to replace through apk manager extract/compress method you gave me were the battery images.
thanks everyone
Max_Pain said:
no. this method is SUPPOSED TO WORK, as I said in the original post. this is how I've done every single change to framework-res.apk in the past. that is why I felt the need to ask for help. because the same thing that has always worked, suddenly wasn't working anymore!
for some reason, using 7zip WAS NOT WORKING to replace the battery .pngs....but ONLY those files. every other file was replaced using 7zip and they all worked. the only files I ended up having to replace through apk manager extract/compress method you gave me were the battery images.
thanks everyone
Click to expand...
Click to collapse
ohh i know. i use the way i told you because i just like to see the images while im playing with them. that way i know for sure whats up.

[Tutorial] Lazy Mans Guide to Themeing

The lazy man’s guide to theming​.
I get requests all the time to make simple changes to my themes that anyone with a computer can do. So I put together this quick guide on how to theme the easy way. This is how I do most of my themes minus any xml edits or battery mods. This guide is for changing images only without having to decompile and recompile the entire apk file with apktool or apk manager. Great for when you just want to make a few changes to your existing setup.
What you will need.
~ 7zip use Google search it’s easy to find
~ image editor Gimp is great and free you can Google it also. I use Fireworks and Photoshop depending on what I am trying to do.
~ Draw9Suite. Created by tommytomatoe/kakomalo Thread found here http://forum.xda-developers.com/showthread.php?t=1272513
Download here: http://www.4shared.com/zip/TaDGMjde/9patchPngSuite.html
Unzip and place contents in folder, I have mine on my desktop.
~ An existing rom or theme to modify.
With just these tools you can do a lot.
Once you have 7zip and 9patchPngSuite on your system you will need to download the rom, or already existing theme for the rom you are on so you can make the changes you want to it.
Download the rom/theme you want to make changes to and use 7zip to unpack the rom/theme you downloaded, do this by right clicking on the zip file and chose open with 7zip. Inside you will find lots of folders, the ones you are looking for will be in system/app (for apps) or system/framework (for framework files). Extract the apk’s by just dragging them out of the 7zip window, to a folder on your desktop.
Inside the folder you extracted the apk’s to create a folder for each apk’s you extracted. Now you will want to extract the folder drawable-hdpi from the res folder of each apk to its associated folder, do this with 7zip also the same way you extracted the apk file. Once the drawable-hdpi folders are extracted you will see the images inside that you can modify.
At this point I create another folder inside each of the specific apk folders and name it .9 images and I copy and paste all the .9 images I want to change into that folder (these are for reference). I then copy all of those images into the compiled folder of 9patchPngSuite. And chose option 1 to decompile them. Now look in the decompiled folder and you can now take those images and change anything inside the black lines and dots you will see on the outside edge. If you feel like it you can also create your own .9 file with your own image by choosing option 2, this will open up draw9patch. Maser&Slave made a great tutorial on this so I won’t go into it. Edit your images, but be careful if the image displays words on it (like with popup_center_dark.9 )and it has a dark background it should remain dark so the word will still be readable, and vice versa if the image has a light background it most likely will have a dark font displayed on it that will be difficult to read if you make the image a dark color. Once all your images are edited use option 3 to recompile them, now in the output folder you will find your recompiled images that you can put back into your drawable-hdpi folder. Edit any other images you want just be careful with the pixel size if an image is 70X70 and you make it 140X140 it could cause some problems, some you can change others you can’t, it’s a lot of trial and error. Once all edits are finished put them all back in the drawable-hdpi folder you extracted from the apk, use 7zip to open the apk again, navigate to the res folder and delete the existing drawable-hdpi folder and drop the one you made the changes to into it, use the back arrow in the 7zip window and it will zip it back up and you can push the apk or flash it to test if your images came out the way you wanted them to. This will work with any image you chose to edit. You can also use this method add images from other themes you like to modify your theme to the way you want it. Just copy and paste the images you want to change into the drawabel-hdpi folder of the theme you are creating.
Brief list of what each apk controls, I am still new to ICS so if anyone knows more info please post.
Framework-res.apk
This will contain most of the images you will want to make changes to. Including check boxes, popup windows, menus, tabs, general status bar images, some lockscreen clocks, and a lot more. You will recognize them as you scroll through them. Some are hard to recognize like activity_tite_bar.9 and dark_header.9 because they are small, it will take some practice and trial and error to get the look you want.
Twframework-res.apk
This contains very little in ICS it still controls the tab backgrounds for a lot of apps but that is all I have found so far.
Systemui.apk
This apk contains most of the files for your dropdown and status bar, like signal bars, 3g 4g icons, wifi strength icons ,dropdown background and more. in ICS it also contains the battery images.
Ik95-res.apk and lidroid-res.apk
These apks contain the toggle images and background In the dropdown i.e. wifi toggle, airplane mode toggle etc. for the 14 ad 15 toggle mods.
Here is a standard flashable zip file you can put your modified apk files in and flash with CWM, open with 7zip and put your apk file in the corresponding folder in the flashable zip if you pulled it from framework put it back in the system/framework folder, if you pulled it from app put it in system/app folder in the flashable zip. Then flash like any other theme.
Flashable zip : http://www.4shared.com/zip/cmn3J1yd/My_flash.html
included below is a word doc of this tutorial.
future additions ....
Thanks for the guide, chief!

Categories

Resources