How can I turn my framework-res.apk into flashable zip? - Android Q&A, Help & Troubleshooting

Hello. I just learned how to create flashable zips, but every tutorial Ive seen only explains how to turn apps into flashable zips. I made a few updates to the framework-res.apk file for a rom and would like to save the changes into a zip file.
My concern is if I save my whole backed up framework-res file, when someone else goes to add this to their system, does it add the changes or does it completely replace their file with mine?
If this happens, how can I make a flashable zip that only adds a few changes to the framework-res.apk file without messing with any other settings?

sparkplug619 said:
Hello. I just learned how to create flashable zips, but every tutorial Ive seen only explains how to turn apps into flashable zips. I made a few updates to the framework-res.apk file for a rom and would like to save the changes into a zip file.
My concern is if I save my whole backed up framework-res file, when someone else goes to add this to their system, does it add the changes or does it completely replace their file with mine?
If this happens, how can I make a flashable zip that only adds a few changes to the framework-res.apk file without messing with any other settings?
Click to expand...
Click to collapse
it would kill the old file. Not sure how to stop that i it is even possible.

sparkplug619 said:
Hello. I just learned how to create flashable zips, but every tutorial Ive seen only explains how to turn apps into flashable zips. I made a few updates to the framework-res.apk file for a rom and would like to save the changes into a zip file.
My concern is if I save my whole backed up framework-res file, when someone else goes to add this to their system, does it add the changes or does it completely replace their file with mine?
If this happens, how can I make a flashable zip that only adds a few changes to the framework-res.apk file without messing with any other settings?
Click to expand...
Click to collapse
Not sure what you mean by "turning apps into flashable zips", but if you edit an apk and want to flash that to a phone through recovery (in a flashable zip package), it will replace the entire apk, not just your edits in the apk. It is not possible to flash only parts of an apk over another - it will always change the entire apk.

Ok thanks for the info.
What I am doing is creating a mod for my phones rom, several have been created and posted on the thread, the mod is just a simple crt animation disable. I had to edit the framework file in order to make this happen.
I've opened a few zip files and I see they have framework-res.apk files attached, so everytime I flash a mod to my phone, it is wiping all previous changes I've made to my framework-res.apk file?

sparkplug619 said:
Ok thanks for the info.
What I am doing is creating a mod for my phones rom, several have been created and posted on the thread, the mod is just a simple crt animation disable. I had to edit the framework file in order to make this happen.
I've opened a few zip files and I see they have framework-res.apk files attached, so everytime I flash a mod to my phone, it is wiping all previous changes I've made to my framework-res.apk file?
Click to expand...
Click to collapse
Yes, the files in the zip will overwrite your existing files. If you like one of those other mods, just decompile the framework-res with the themes that you want and edit the bools.xml line for CRT (config_animateScreenLights, or something like that if I recall), and recompile (deleting the resources.arsc from the keep folder if you use APK Manager). Or make your own themes for your mod...

Thats really strange, ive added plenty of mods to my phone and they all stayed intact, but when I check them out, they are all apks being flashed from zip files. Maybe I am missing something, or maybe I am not asking the question right, its just really hard to understand how it works. Also, I havent slept for over 24 hours so im really sketchy with processing info right now

Related

[Mod][Tool] Gingerscript - Framework mod tool

I dusted off a script I had been working on to allow easy customization on my original EVO.
It all still works on my rooted Evo 3D without many changes!
The script automates the use of adb. Downloads and decompiles the frameworks from your evo/evo 3d. Then you can make any desired changes (examples provided). Recompiles and uploads back to device.
Offering it for people to play with. I also included precompiled framework-res.apk and SystemUI.apk for those that like my choices. Otherwise use the script and create your own.
Enjoy
NEW! 1.1 Beta. Now creates flashable update zips
Beta update posted for new OTA
After recompiling your frameworks select option 5 from the Main Menu. An update.zip will be created in a directory called "flash" Try it out and please give feedback.
1 - Extract GingerScript to a folder on your desktop.
2 - Connect your phone via USB cable to your computer.
3 - Open the GingerScript folder you created and doubleclick on GingerScript.bat.
4 - Select item 1. (Process Framework-res.apk) This will download your framework-res.apk as well as create a back up in the /tools folder. When prompted, select yes to decompile this framework. This will create a folder called extracted-framework.res.
5 - This is where it gets tricky. Inside the extracted-framework.res folder, there is a folder called res. Inside THAT folder are multiple directories. The two you are concerned with are marked drawable and drawable-hdpi. *NOTE* In some builds the "drawable-hdpi" folder is named "drawable-hdpi-v4" Thats why it's best to modify your own framework.
6 - In the GingerScript folder, we will work with the Example.Icon.Framework-res.Circle.Battery folder. In this folder, you will find two directories: drawable and drawable-hdpi. Copy and paste the contents of the two directories from the Example folde into the corresponding folders in the extracted-framework.res/res directory. This may overwrite some of the files in each directory. This is okay!
7 - Go back to the script; it should still be on the gray screen. Select option 3 - recompile framework. This will take a minute or two so go grab a drink while it does its magic. It will seem to be hung; I don't have a progress bar created in the script so just hold tight while it finishes.
8 - Next, select option 4 - Upload new framework to phone. This will prompt you to put the phone in recovery mode; I'm not going to explain that part. Once the phone is in recovery mode Mount the /system partition using the recovery mount feature then press any key in the script window to push the file to your phone.
9 - At this point, clear the Dalvik Cache at a minimum and press a key once finished. the phone will reboot. Now, this provides the battery mod. To modify the other status bar icons, return to the main Menu and select option 3 to modify the systemUI.apk. The process is EXACTLY the same as the framework-res.apk but it uses the contents of the Example.Icons.SystemUI.mod directory. If problems occur, recover the backups from the /tools directory and push them to your phone.
I hope this helps. If you are still running into issues, please post what step you having issues with and remember, black and white goes with everything! *grin*
Do you install the apps or push them with abd, a little more clarity on how to install
Sent from my PG86100 using XDA App
dog44 said:
Do you install the apps or push them with abd, a little more clarity on how to install
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
Extract the Gingerscript.zip on your Windows PC with your phone connected via USB.
Inside the folder double click on Gingerscript.bat. It's fairly easy to figure out from there, It creates a backup of the files before modification as a safety precaution. This just makes all of the framework compiliing/decompiling less of a hassle
Everything needed is in the zip file so you will need nothing except a text editor and a program to manipulate the png images. There are example folders in the zip that contain my modified png images and edited xml files
Note: The script references the use of Clockwork Mod Recovery, but TWRP works just as well. Just clear the Dalvik cache after uploading the framework. Then Reboot. I'll clean up the scripts wording at a later date
I will give it a shot here in a minute, and I will let you know how well it works.
I like your icons. Which APK does what?
The framework-res.apk contains the battery mod and a few minor icons. The rest of the status bar icons are in the SystemUI.apk.
The com-htc.resource.apk wasn't modified in my example, but it does contain images.
I wish there was a easy way to determine what resources are used but there isn't. Some status icons are located in the individual applications resource file as well (My script can't handle those)
I'm going to give this a go in a little bit when I can. Can anyone else confirm their success and any additional steps required (eg - clearing cache and dalvik). Thanks.
Can you please make a clear taskbar...thanxs
Can you make it simple zip file? so I can just flash it.
Thx
one up on this i like your blue battery ya got there, can ya make a zip for us
to flash please?
justwonder said:
Can you make it simple zip file? so I can just flash it.
Thx
Click to expand...
Click to collapse
That didnt work
Can you make a stock % battery?
Send from my Rooted HTC Evo 3D
nabbed said:
That didnt work
Click to expand...
Click to collapse
What part of "That" didn't work?
townsenk said:
What part of "That" didn't work?
Click to expand...
Click to collapse
After pushing the files, wiping dalvik cache, and rebooting, there was no status bar at all.
This is viper rom rc1.1, netarchy test3 kernel.
jayjay7411 said:
one up on this i like your blue battery ya got there, can ya make a zip for us
to flash please?
Click to expand...
Click to collapse
I've never been successfull creating a update.zip. I can never seem to get the syntax correct on the update-script.
If someone more experienced wants to create one, I'd love to take a look at it and see what I'm doing wrong.
nabbed said:
After pushing the files, wiping dalvik cache, and rebooting, there was no status bar at all.
This is viper rom rc1.1, netarchy test3 kernel.
Click to expand...
Click to collapse
Did you modify *Your* framework files or use the ones provided? The ones I used as examples are from a stock rom that is still odexed
I recommend you modify a copy of your own framework files since there may have been changes in the viper rom. It should still work. If you want you can send me a copy of your unaltered framework files and I can take a look.
mexiking713 said:
Can you make a stock % battery?
Send from my Rooted HTC Evo 3D
Click to expand...
Click to collapse
That requires the creation of about 60 new icons.
Easier method. Find me the icons..or even a Original Evo mod package and I can extract the icons from that.
townsenk said:
Did you modify *Your* framework files or use the ones provided? The ones I used as examples are from a stock rom that is still odexed
I recommend you modify a copy of your own framework files since there may have been changes in the viper rom. It should still work. If you want you can send me a copy of your unaltered framework files and I can take a look.
Click to expand...
Click to collapse
Ah! Viper is deodexed, so there's the problem right there.
Ill try to modify...
I have stock rom, if I do Push command and restart it should work right?
adb push new_SystemUI.apk /system/app/SystemUI.apk
adb push new_framework-res.apk /system/framework/framework-res.apk
justwonder said:
I have stock rom, if I do Push command and restart it should work right?
adb push new_SystemUI.apk /system/app/SystemUI.apk
adb push new_framework-res.apk /system/framework/framework-res.apk
Click to expand...
Click to collapse
That is correct - You'll still have to wipe the Dalvik and let it rebuild on boot
Let me know if it works for you

[Q] Noob - How do you modify Framework-res.apk?

I've looked through many posts. I am very new to creating my own Rom's, and I am having a problem after editing framework-res.apk. I started by downloading a popular rom for the Evo 3D, and decompiled it, edited framework-res, and after flashing the rom it wouldn't boot past the startup animation. The screen just remained black, but the capacitive buttons remained lit. Heres my process:
1.) Download the rom I desired.
2.) Extract zip
3.) Locate Framework-res.apk, copy, paste on desktop.
4.)Extract framework-res.apk, edited icons to my liking.
5.) Delete Meta-inf.
6.) Compress framework-res back to .zip, then to .apk.
7.)Sign Framework-res.apk.
8.) Replace framework-res.apk in my desired rom.
9.) Go into Meta-inf, delete Cert.RSA, Cert.SF, Manifest.MF (everything but the com folder)
10.) Re-sign .zip
11.) Flash via CWM, reboot, see Android startup animation, black screen?!!?!?
I am 99% I didn't change any dimensions of any of the images, and I re-signed everything perfectly. I know my mistake(s) are probably very noob, but as of now, I can't figure out what I am doing wrong. Any help would be greatly appreciated!
(Before you say anything, I have searched the forums several times, with no luck. I also tried this process several times, only editing one.png in framework-res, and I still get the same result.)
ellisperkins said:
I've looked through many posts. I am very new to creating my own Rom's, and I am having a problem after editing framework-res.apk. I started by downloading a popular rom for the Evo 3D, and decompiled it, edited framework-res, and after flashing the rom it wouldn't boot past the startup animation. The screen just remained black, but the capacitive buttons remained lit. Heres my process:
1.) Download the rom I desired.
2.) Extract zip
3.) Locate Framework-res.apk, copy, paste on desktop.
4.)Extract framework-res.apk, edited icons to my liking.
5.) Delete Meta-inf.
6.) Compress framework-res back to .zip, then to .apk.
7.)Sign Framework-res.apk.
8.) Replace framework-res.apk in my desired rom.
9.) Go into Meta-inf, delete Cert.RSA, Cert.SF, Manifest.MF (everything but the com folder)
10.) Re-sign .zip
11.) Flash via CWM, reboot, see Android startup animation, black screen?!!?!?
I am 99% I didn't change any dimensions of any of the images, and I re-signed everything perfectly. I know my mistake(s) are probably very noob, but as of now, I can't figure out what I am doing wrong. Any help would be greatly appreciated!
(Before you say anything, I have searched the forums several times, with no luck. I also tried this process several times, only editing one.png in framework-res, and I still get the same result.)
Click to expand...
Click to collapse
Also, I just tried only changing the default_wallpaper, and it did the same thing leading me to believe that it doesn't have something to do with me modifying it, but actually in me signing and repackaging it. If anyone could help/ give me instructions on how to do so, that would be great!
WOW!
you could always try the easy way... http://forum.xda-developers.com/showthread.php?t=695701
Select option 1 to decompress, then when done press option 3 to recompress.
Its what I use for framework. Sometimes I use this: http://forum.xda-developers.com/showthread.php?t=737526
All depends on what I need to do.
scrosler said:
WOW!
you could always try the easy way... http://forum.xda-developers.com/showthread.php?t=695701
Select option 1 to decompress, then when done press option 3 to recompress.
Its what I use for framework. Sometimes I use this: http://forum.xda-developers.com/showthread.php?t=737526
All depends on what I need to do.
Click to expand...
Click to collapse
Thanks a lot! I'm going to try my luck with that, and build a rom shortly. Another question, if I am lazy and I copy/ paste and replace the icons from one framework-res to another, and there are un-used icons, would that effect it?
ellisperkins said:
Thanks a lot! I'm going to try my luck with that, and build a rom shortly. Another question, if I am lazy and I copy/ paste and replace the icons from one framework-res to another, and there are un-used icons, would that effect it?
Click to expand...
Click to collapse
No, it would just bloat your file.
scrosler said:
No, it would just bloat your file.
Click to expand...
Click to collapse
Thanks. Then what I was doing earlier had literally nothing to do with me modding any of the files, but had to do with the way I was either compressing/ or signing. I was using an old tool to sign from PPC geeks, so I kind of assumed that was the issue from the start.
ellisperkins said:
Thanks. Then what I was doing earlier had literally nothing to do with me modding any of the files, but had to do with the way I was either compressing/ or signing. I was using an old tool to sign from PPC geeks, so I kind of assumed that was the issue from the start.
Click to expand...
Click to collapse
Prolly so.

[Q] How to create theme for custom rom ?

After reading from articles , now more or less I got some idea on how to create a theme for a custom rom , but still there's something I don't know .
1) First , I extract files from a rom using 7zip . Then , I extract out the content of framework-res.apk and make some modifies / changes to those .png files . So , after completed those modifies , I just open archieve on the original framework-res.apk , drag and drop the one I modified to replace the original one ? After that , how do I pack it in .zip file that can be updated in open recovery ? .xml file shouldn't be modified right ?
2) What if I do this , I get a theme.zip made for the rom , and then I extract the contents of the theme.zip using 7zip , then again I modify the .png files and after completed , I packed it again by open archieve on the original theme.zip , drag and drop the one I modified to replace the original one ? Does this works ?
3) What if I modify other system apps such as calender.apk ? Using the same method , extract , modify , drag and drop , replace , then again how do I pack it in .zip file that can be updated in open recovery ? Is there any "bond" between those system apps and framework-res.apk ? Can I just modify anyone of both ? Or I have to modify both system apps and framework-res.apk to get it works ?
Thanks
nikctsh said:
After reading from articles , now more or less I got some idea on how to create a theme for a custom rom , but still there's something I don't know .
1) First , I extract files from a rom using 7zip . Then , I extract out the content of framework-res.apk and make some modifies / changes to those .png files . So , after completed those modifies , I just open archieve on the original framework-res.apk , drag and drop the one I modified to replace the original one ? After that , how do I pack it in .zip file that can be updated in open recovery ? .xml file shouldn't be modified right ?
2) What if I do this , I get a theme.zip made for the rom , and then I extract the contents of the theme.zip using 7zip , then again I modify the .png files and after completed , I packed it again by open archieve on the original theme.zip , drag and drop the one I modified to replace the original one ? Does this works ?
3) What if I modify other system apps such as calender.apk ? Using the same method , extract , modify , drag and drop , replace , then again how do I pack it in .zip file that can be updated in open recovery ? Is there any "bond" between those system apps and framework-res.apk ? Can I just modify anyone of both ? Or I have to modify both system apps and framework-res.apk to get it works ?
Thanks
Click to expand...
Click to collapse
Here's what I know so far. I'm still trying to learn as much as I can:
1) If you are making a theme by trying to replace pngs in an existing framework-res.apk file, you can do this: open the apk file within your zip program, and edit the apk there (so you'll have two zip windows open. Once the apk is updated, close the most recent zip window. The first zip window should recognize that you've updated the apk file, and ask you to update the first zip window.
I've been playing around with this: http://forum.xda-developers.com/showthread.php?t=1432152
What it allows you to do is modify the files in Windows Explorer (or whatever file explorer you're using), and then let the script do the rest of the work for you. The actions it can do are: decompile apk, recompile apk, sign apk, created update.zip.
The xml files need to be edited if you want to achieve certain effects. For example, in the Gingerbread theme there are some edits that have to be made to a few xml files in order to achieve white text on black backgrounds on the popup menus. The nice thing about the framework flasher link from above is that it 'compiles' the files (meaning it will check if the .9.pngs are correct, and if your xml files point to correct assets), so you can go about doing xml edits and stuff without fear of bootlooping.
2) Yes, this should work.
3) If the updater script is a generic script (that is, it moves everything from the /system folder to /system, and /data to /data), then you can create directories in the update.zip that refer to whatever apk you want to replace, with the same structure as in Android. The cool thing about Metamorph, from what I gather, is that you can create folder structures with just the assets you want to replace, rather than the entire apk. This means that if you want to replace just a few images in Phone.apk, for example, you create a directory in the Metamorph script under /system/app/Phone/res/drawable-hdpi and add the images you want to replace in there. I think that's the way I want to create my themes from now on, I just need to figure out how to do it correctly
I tried the framework flasher , after located the framework-res.apk and run RunMe , it shows echo is off , the log process shows 'java' is not recognized as an internal or external command,
operable program or batch file.
Do you have Java installed?
Mioze7Ae said:
Do you have Java installed?
Click to expand...
Click to collapse
No , I have no Java installed . Tried to install before but couldn't get the right version .
Java
I've yet to find one all inclusive theming reference. Just a lot of searching & reading & trial & error. This might be a good place to get started.
Edit: You'll also want to get the Android SDK
3rdstring said:
Java
I've yet to find one all inclusive theming reference. Just a lot of searching & reading & trial & error. This might be a good place to get started.
Edit: You'll also want to get the Android SDK
Click to expand...
Click to collapse
BTW , since I'm still too new to theming , I'm thinking of making my first step by changing the colour of a completed theme . This is what I'm currently doing : I extracted the files content of your DarkFroyo.zip and then extracted it's framework-res.apk . ( IT'S YOUR THEME , CAN YOU GIVE ME THE PERMISSION TO DO THIS ? ) I'm changing the original orange colour of all those icon to light pink using photoshop , then replace the original one . The files type are .png . Also , I changed the battery status icon and status bar background . However , I haven't touch those .xml files , I just leave it there . So after I complete , do I just flash it right away in my phone or I need to doing something like "sign" ? As for now , I don't have any idea about "sign" .
nikctsh said:
BTW , since I'm still too new to theming , I'm thinking of making my first step by changing the colour of a completed theme . This is what I'm currently doing : I extracted the files content of your DarkFroyo.zip and then extracted it's framework-res.apk . ( IT'S YOUR THEME , CAN YOU GIVE ME THE PERMISSION TO DO THIS ? ) I'm changing the original orange colour of all those icon to light pink using photoshop , then replace the original one . The files type are .png . Also , I changed the battery status icon and status bar background . However , I haven't touch those .xml files , I just leave it there . So after I complete , do I just flash it right away in my phone or I need to doing something like "sign" ? As for now , I don't have any idea about "sign" .
Click to expand...
Click to collapse
Changing the color in Photoshop is fine for normal ".png"s but ".9.png"s are special, they have a 1 pixel border with guides that define how they are stretched to fill a space (& are only visible is a decompiled state). Just editing a .9.png in Photoshop might break the .9 patch. Since you are trying to modify my theme it might also be wise to grab the "undo.zip" so if (when) something you try bootloops the phone you can flash the undo to get back to stock. I know had numerous bootloops when I was first starting out (still do occasionally).
3rdstring said:
Changing the color in Photoshop is fine for normal ".png"s but ".9.png"s are special, they have a 1 pixel border with guides that define how they are stretched to fill a space (& are only visible is a decompiled state). Just editing a .9.png in Photoshop might break the .9 patch. Since you are trying to modify my theme it might also be wise to grab the "undo.zip" so if (when) something you try bootloops the phone you can flash the undo to get back to stock. I know had numerous bootloops when I was first starting out (still do occasionally).
Click to expand...
Click to collapse
Hey 3rdstring. I noticed you release a new version of your theme for the ODEXED version of CM6. For APKs that have ODEX files (such as Phone), are you deodexing them using apktool, then reodexing them? A brief pointer would be nice!
molohov said:
Hey 3rdstring. I noticed you release a new version of your theme for the ODEXED version of CM6. For APKs that have ODEX files (such as Phone), are you deodexing them using apktool, then reodexing them? A brief pointer would be nice!
Click to expand...
Click to collapse
No the only thing I'm changing in any of the odexed apks are images. I use a Metamorph file with ZipThemer to build the update.zip (& undo) after I've decompiled / recomfiled framework-res for the white menu text & 10% battery increments.
3rdstring said:
No the only thing I'm changing in any of the odexed apks are images. I use a Metamorph file with ZipThemer to build the update.zip (& undo) after I've decompiled / recomfiled framework-res for the white menu text & 10% battery increments.
Click to expand...
Click to collapse
The reason I ask is b/c I tried pushing a modified Phone.apk to CM6, but it didn't pick up any of the changes I added (images only). It made me think that the assets were already prebuilt in the odex file, so changing the apk wouldn't do anything unless the odex file was changed too.
I also tried applying a metamorph script on top of the odex ROM, but it caused a lot of fcs. I think it's b/c of the ODEXing too.
EDIT: My bad. Phone.apk is the calling screen, Contacts.apk is the dialer + contacts. DOH!!!
My edits are pushed correctly

GUIDE Modify apks

Hi. I just wanted to write a guide on modifying apks. You probably have seen my rom in the ported section.
(I'll make the guide look better when I get home)
Well lets get started.
1.
First. An introduction to what an apk is. An apk is (believe it or not) a zip of files.
2.
So how do you go about editing a zip? I suggest using 7z on your computer or root explorer on your phone.
Second: there are a lot of apks you can edit but for this guide I'll be using the systemui.apk that you find in any rom in the system/app folder.
3.
Ok. So assuming you start with the system ui apk your going to need to extract the apk with 7z on your computer. (or root explorer on your phone. Es file should work also)
4.
Now you should have a new folder where you chose to extract your apk. Open that folder. Your going to see a bunch of files. What your probably going to be interested in is the res folder. Go into that folder and find the drawable hdpi folder. Open it.
Your going to see a lot of icons. Here is where you can change things like wifi icons. You can add 4g icons and so much more. Even edit what your contacts look like.
5.
This is an important step. Make sure your using the system ui apk from the rom your currently on or make sure its compatible with yoir rom.
Ok so now we get to the things like icon changes. Download a theme you've been dying for but couldn't get because it was either for another rom or phone. And the only thing you wanted was a few things from the theme.
Now extract that zip. Then extract the systemui.apk again from the zip you want your icons to look like. MAKE SURE YOU RENAME THE THE SYSTEM UI TO SOMETHING DIFFERENT SO YOU DON'T MIX THEM UP.
6.
So now that you got the system ui apk with whatever you want to use all you need to do is go into the drawable hdpi of the one with the icons you want in it. Copy them and bring them to your roms stock system ui and replace them.
7.
Thats about it. Now zip your roms stock system ui back up and change the ending to .apk. Then put it in system/apps and replace it. Reboot. And boom. Your modded apk is ready.
Hit thanks if I helped.
for step three rename the. apk to .zip its easier
This can only be used for replacing regular images in the APK. There are many images that are .9 images which require decompiling.
There are MANY guides across xda that go into detail and show you the proper way to modify APK's..... There is much more then images.
This one is even in this forum: http://forum.xda-developers.com/showthread.php?t=1388459

add 1% battery mod to odexed stock rom?

Can anyone tell me if its possible to add the 1% battery mod to a stock odex ics rom? I have a moto razr maxx. Is there a way i can mod this myself? I tried uot kitchen but it only shows increments of 10% on my phone.
Thanks!
Yes, it can be done. My phone's ROM is the stock odexed ROM and I have 1% battery increments. You need to edit framework-res.apk, you can use apktool or APK Multi Tool or whatever to unpack the APK, and rebuild it afterwards. To get 1% battery, you need to edit/replace some XMLs.
I'll try find a link to show how the XMLs should be and some commonly used icons.
EDIT: Here: http://forum.xda-developers.com/showthread.php?t=724778
Find a style you like, download it and copy the two folders from inside into the "res" folder in your unpacked APK, overwriting any existing files (you may need to rename the drawable-hdpi-v4 folder depending on your phones resolution)
But UOT should work. Make sure in the "battery" section you changed at the top from "Custom battery" to "SCB with %" and then selected the style you want.
SifJar said:
Yes, it can be done. My phone's ROM is the stock odexed ROM and I have 1% battery increments. You need to edit framework-res.apk, you can use apktool or APK Multi Tool or whatever to unpack the APK, and rebuild it afterwards. To get 1% battery, you need to edit/replace some XMLs.
I'll try find a link to show how the XMLs should be and some commonly used icons.
EDIT: Here: http://forum.xda-developers.com/showthread.php?t=724778
Find a style you like, download it and copy the two folders from inside into the "res" folder in your unpacked APK, overwriting any existing files (you may need to rename the drawable-hdpi-v4 folder depending on your phones resolution)
But UOT should work. Make sure in the "battery" section you changed at the top from "Custom battery" to "SCB with %" and then selected the style you want.
Click to expand...
Click to collapse
what phone do you have? i already tried the uot and it will not work. from what im understanding you would need to edit the systemUI.odex file to allow for battery % but i have no clue how to do it.
fix-this! said:
what phone do you have? i already tried the uot and it will not work. from what im understanding you would need to edit the systemUI.odex file to allow for battery % but i have no clue how to do it.
Click to expand...
Click to collapse
I have an HTC Explorer. But I believe the battery icon is stored in framework-res.apk, and not SystemUI.apk, so SystemUI.odex shouldn't be a problem (SystemUI.odex is the odex file of SystemUI.apk - you can't edit odexed apps, you would have to deodex SystemUI.apk first; this means combining the SystemUI.odex and SystemUI.apk files into one, deodexed SystemUI.apk, which can then be edited).
Although UOT may require you to upload a deodexed SystemUI.apk along with framework-res.apk, because some theme mods required SystemUI.apk. So you might need to get a deodexed SystemUI.apk. There's a guide to deodexing here: http://forum.xda-developers.com/showthread.php?t=1208320
It is a slightly complicated process, but it's not impossible to figure out I don't know for sure if this is what you need to do to make it work though. Make sure you have a nandroid backup before you flash the theme
i guess ill wait for a dev to deodex the stock rom then. the uot kitchen states it can work on odex roms but in my case it does not.
fix-this! said:
Can anyone tell me if its possible to add the 1% battery mod to a stock odex ics rom? I have a moto razr maxx. Is there a way i can mod this myself? I tried uot kitchen but it only shows increments of 10% on my phone.
Thanks!
Click to expand...
Click to collapse
Anything's possible... See HERE, HERE, and a mini re-odex tutorial HERE.
And, I believe there were some major framework/system changes in the transition from GB to ICS - so, the battery files may have moved to SystemUI from framework-res..
alteredlikeness said:
Anything's possible... See HERE, HERE, and a mini re-odex tutorial HERE.
And, I believe there were some major framework/system changes in the transition from GB to ICS - so, the battery files may have moved to SystemUI from framework-res..
Click to expand...
Click to collapse
thanks for that but it's a bit too over my head to attempt myself. if i uploaded my systemUI & systemUI.odex do you think you could help me out?
fix-this! said:
thanks for that but it's a bit too over my head to attempt myself. if i uploaded my systemUI & systemUI.odex do you think you could help me out?
Click to expand...
Click to collapse
You'd also need to upload all the .jar and .odex files from /system/framework I think to make it possible to deodex systemUI.apk.
EDIT: If you do that, I should probably be able to deodex it for you. (Assuming that process hasn't changed for ICS, which I don't think it has). Once you have this file deodexed, you should be able to use UOT, it supports ICS battery mods.
EDIT: If you need an easy way to copy those files off the phone, you can try this: http://androidcommander.com/
fix-this! said:
thanks for that but it's a bit too over my head to attempt myself. if i uploaded my systemUI & systemUI.odex do you think you could help me out?
Click to expand...
Click to collapse
Sorry, but I'm not too familiar with ICS yet... eagerly waiting Q3 for my phone.
Plus, I ported the battery from a deodexed set so I don't know all of the smali/xml edits involved if I were to do it from scratch...
You could still upload a whole system dump or cwm backup for me to look at ...if you wanted to. It'll let me get familiar with Moto's ICS..
SifJar said:
You'd also need to upload all the .jar and .odex files from /system/framework I think to make it possible to deodex systemUI.apk.
EDIT: If you do that, I should probably be able to deodex it for you. (Assuming that process hasn't changed for ICS, which I don't think it has). Once you have this file deodexed, you should be able to use UOT, it supports ICS battery mods.
EDIT: If you need an easy way to copy those files off the phone, you can try this: http://androidcommander.com/
Click to expand...
Click to collapse
im uploading now if someone can do this for me, i cannot figure it out. the razr devs do not seem interested in doing this on a ics leak.
http://www.mediafire.com/?m1i08symjcalvy4
uploaded system/framework & app
fix-this! said:
http://www.mediafire.com/?m1i08symjcalvy4
uploaded system/framework & app
Click to expand...
Click to collapse
Downloading now, provided it works I should have it up in 15 - 20 mins
EDIT: Appears it's a bit different, trying another approach now which will take a bit longer, but seems to be working for now at least (doing it this way means deodexing all the files).
EDIT: I'll try and get SystemUI.apk uploaded tonight, the rest will have to wait to tomorrow if you want them.
EDIT: There is a possibility I will need "init.rc" from the root of your device (i.e. not inside any folders like "system" or "data") to properly deodex all the files. A few seem to be giving errors and stuff.
Here's the (hopefully) deodexed SystemUI.apk [well, it IS deodexed, the "hopefully" refers to hopefully it's done right]. Try this with UOT (along with framework-res.apk, which isn't odexed in the first place), and as I said before, be sure to make a nandroid backup before hand.
You may also need to delete the SystemUI.odex file from your phone after applying the theme, I am not completely sure. If after applying the theme it has not worked, try doing so - worst case scenario you should be able to restore your nandroid backup if deleting the .odex file breaks something.
SifJar said:
Downloading now, provided it works I should have it up in 15 - 20 mins
EDIT: Appears it's a bit different, trying another approach now which will take a bit longer, but seems to be working for now at least (doing it this way means deodexing all the files).
EDIT: I'll try and get SystemUI.apk uploaded tonight, the rest will have to wait to tomorrow if you want them.
EDIT: There is a possibility I will need "init.rc" from the root of your device (i.e. not inside any folders like "system" or "data") to properly deodex all the files. A few seem to be giving errors and stuff.
Click to expand...
Click to collapse
heres the file you need to deodex.
fix-this! said:
heres the file you need to deodex.
Click to expand...
Click to collapse
Thanks. I can try deodex all the jars and apks with that tomorrow if you want. For now, SystemUI.apk seems to have deodexed fine without it, so you can grab it above and try UOT with it (that's the only file UOT needs other than framework-res.apk which isn't odexed anyway). Let me know if it works
SifJar said:
Thanks. I can try deodex all the jars and apks with that tomorrow if you want. For now, SystemUI.apk seems to have deodexed fine without it, so you can grab it above and try UOT with it (that's the only file UOT needs other than framework-res.apk which isn't odexed anyway). Let me know if it works
Click to expand...
Click to collapse
ill try it but if you think you could deodex everything that would be great.
used uot with the modded systemUI and it didn't work, still only getting 10% increments. i think the entire system/app & framework needs to be deodexed.
fix-this! said:
used uot with the modded systemUI and it didn't work, still only getting 10% increments. i think the entire system/app & framework needs to be deodexed.
Click to expand...
Click to collapse
Just found this HERE - looks like a good 1% battery tutorial...
But, from the look of your system, you have battery files (images/xmls) in BOTH the SystemUI.apk and framework-res.apk - how's that?
I don't think I'll be able to upload the deodexed files. It'd be a large file, and I don't really want to waste the bandwidth I'm afraid.
It's not a hard process for you to do though. There are two main options. Either buy Titanium Backup Pro for your phone, and then load it up and press menu, then "more" and then "Undo sys Dalvik integration..." which will deodex everything in /system/app (but not /system/framework), or else download this: http://forum.xda-developers.com/attachment.php?attachmentid=972719&d=1333088601 (I'd strongly recommend this second method)
Extract the ZIP, and place everything from /system/app in "_app" and everything from /system/framework in "_framework". Run AutoDEOToolMain.bat. Select option 2, then paste in this as the custom BootClassPath:
Code:
core.jar:core-junit.jar:bouncycastle.jar:ext.jar:framework.jar:framework-ext.jar:android.policy.jar:services.jar:apache-xml.jar:filterfw.jar:com.motorola.android.frameworks.jar:com.motorola.android.widget.jar:com.motorola.frameworks.core.addon.jar
Let it run, and all the deodexed files will be in the deodexed folders. Any files that weren't deodexed will be in the original folders.
This is really quite an easy process, so I'm sure you could achieve it yourself.
EDIT: There still seem to be a couple of errors with the above BootClassPath, the following two JARs seem to be missing: /system/framework/kafdex.jar and /system/framework/com.motorola.orange.simauth.jar (I removed them from the BootClassPath because the JARs were missing, if you can find these two JARs add :kafdex.jar:com.motorola.orange.simauth.jar to the end of the above BootClassPath and put the two JARs in "_framework". Then I think you will be able to deodex every JAR and APK. Without them, most still seem to work though. (A number of the APKs in /system/app do not deodex properly. A little googling has shown me that motorola often neglect to include com.motorola.orange.simauth.jar on their phones [probably to try and stop deodexing] and this is the main problem)
EDIT: Try using this tool to mod your battery: http://forum.xda-developers.com/showthread.php?t=1434061
Use the deodexed SystemUI.apk along with the standard framework-res.apk, and download one of the 1% battery mods from that thread. I really don't think the rest of the system apps being odexed should cause an issue.

Categories

Resources