Hi XDA
Im trying to make a battery mod for my HTC Sensation, but i need some help.
I have the framework-res.apk for my rom (Android Revolution HD) and 100 pngs.
I need help with compiling the stat_sys_battery.xml so it uses all the 100 pngs instead of htcs 7
I also need to know if its okay to just replace the files in the framework-res.apk using 7-zip, and replace that with the framework-res.apk in a working battery mod i downloaded, since i dont know how to make the update script
Thank you for you help
frederikh said:
Hi XDA
Im trying to make a battery mod for my HTC Sensation, but i need some help.
I have the framework-res.apk for my rom (Android Revolution HD) and 100 pngs.
I need help with compiling the stat_sys_battery.xml so it uses all the 100 pngs instead of htcs 7
I also need to know if its okay to just replace the files in the framework-res.apk using 7-zip, and replace that with the framework-res.apk in a working battery mod i downloaded, since i dont know how to make the update script
Thank you for you help
Click to expand...
Click to collapse
Sorry, but it's a bit more complicated than just opening the .apk in 7-zip or winrar. You need to decompile the .apk... the easiest way is to use a program called apk manager. Search on XDA, and you will find it.
Then, in the decompiled folder, you will have a /drawable/ folder. You need to re-code the stat_sys_battery.xml to include all the pngs, as well as the zzz_stat_sys_battery_1.xml.
In addition to the 100 pngs you already have, you will also need some charging animation icons and a stat_sys_battery_unknown.png icon that all match your battery icon theme.
After redoing the 3 xmls in the drawable folder, and replacing all the necessary pngs, you then need to recompile and sign your apk with the new files.
I've attached a sample of the 3 xmls for you to use as a reference.
If you are looking to get a battery mod the quick and easy way, then I have a bunch in a thread HERE. If you are looking to learn how to do it yourself (Which I highly recommend for the learning experience it will provide), then search around and look for some guides on compiling and decompiling to help you on your way. You can also download any of the battery mods from the thread I linked to, and decompile them for examples of a working framework-apk that has been modded.
Keep in mind, when experimenting with this, you ABOSLUTELY WILL cause your phone to not be able to boot up. Make sure you have a nandroid backup ready.
Good luck.
Thank you!
Wow, this is gonna take a bit longer than i though B)
Btw, i was using one of your mods, but i found that it wasnt smooth enough + the icon didnt have enough detail
frederikh said:
Hi XDA
Im trying to make a battery mod for my HTC Sensation, but i need some help.
I have the framework-res.apk for my rom (Android Revolution HD) and 100 pngs.
I need help with compiling the stat_sys_battery.xml so it uses all the 100 pngs instead of htcs 7
I also need to know if its okay to just replace the files in the framework-res.apk using 7-zip, and replace that with the framework-res.apk in a working battery mod i downloaded, since i dont know how to make the update script
Thank you for you help
Click to expand...
Click to collapse
go to first link on my sign download a batt mod open framework and use it...
lalitsehgal21 said:
go to first link on my sign download a batt mod open framework and use it...
Click to expand...
Click to collapse
Thanks, but no thanks B)
I think will try to learn how to do it my self
Related
Hope posting this here is OK- I never get answers in Q&A...
I have made & modified themes for the SE stock 'rom' and as you know the framework-res and system apks do not need to be recompiled or signed when just exchanging images.
Is it the same for CM 6 'roms'?
I am looking into theming Wolfbreak's rom and noticed the framework-res that I'm using as a base says "signed by SignApk" when I open it in winrar.
Do I need to recompile & sign or not?
Thanks in advance!
AyDee said:
Hope posting this here is OK- I never get answers in Q&A...
I have made & modified themes for the SE stock 'rom' and as you know the framework-res and system apks do not need to be recompiled or signed when just exchanging images.
Is it the same for CM 6 'roms'?
I am looking into theming Wolfbreak's rom and noticed the framework-res that I'm using as a base says "signed by SignApk" when I open it in winrar.
Do I need to recompile & sign or not?
Thanks in advance!
Click to expand...
Click to collapse
Hi,
You dont need to sign regardless of OS if you are only swapping images for system files. But remember to use optimized pngs and zipalign as final step to minimize resources consumption.
If you are modding any resources.arsc you need to decompile to do that and recompile and sing accordingly.
Ok, thanks- just making sure... the winrar message threw me off...
AyDee said:
Ok, thanks- just making sure... the winrar message threw me off...
Click to expand...
Click to collapse
try 7-zip.....hope seeing themes from u soon....
K, so i'm running RCmix3D Runny 4.0 ROM (Sweet ROM btw) and i've found an icon pack that i want to use, not in an APK format, just have it in a folder as of now, both installed on my desktop and in my media folder on my phone. i really don't want to use Launcher Pro or anything like that to keep the icon pack installed, so i was wondering if anyone knew a way to install the icon pack with a program that doesn't need to be consistently ran to keep the icon pack installed.
i'm not completely retarded when it comes to ROMs, but i am new, so please, be gentle. lol
You would have to use a theme pack made for your Rom if you want to just flash it. If you know how to extract framework apks you could swap out the PNG images yourself.
Sent from my Inspire 4G using xda premium
Thanks for the insight um can u provide a link to a tutorial on the subject
bigslimoid said:
Thanks for the insight um can u provide a link to a tutorial on the subject
Click to expand...
Click to collapse
There is no tutorial that I know of. Learning how to do most of this stuff requires time searching and reading on the internet. I use linux with dsixdas kitchen to have a working folder of Rom. You could just pull out framework-res.apk and systemui.apk from Rom to work with as well. Decompile apk, trade out PNG's retaining original file name, recompile and change extension back to .apk. now you have the apk with different icons. Either build Rom with these or push them to phone and reboot. There are many other places where PNG images are stored as well. Com.HTC.resources.apk is another one for example.
Hello everybody, i got sick of my battery icon and wanted a change, but i am with UBKPD (2.3.6. for Argentina and some other countries of Latinamerica) and couldn't use any other theme or part of it.
Thanks to the thread of umarian and other threads all over XDA and HTC ManĂa (this in spanish) i figure out how to change my battery icon.
I attach diferent .rar files. In there you will find a folder with icons AND the file: framework-res.apk of UBKPD according to the respective icon.
Of course, you can change icons of your Firmware whatever it is (using this icons or those you want) following the steps of this thread: http://forum.xda-developers.com/showthread.php?t=1431048
The icons i've used are those provided by umarian in that thread, some others that i picked up from other threads with mods for other firmwares. None are creations of mine. SO, IF YOU LIKE THIS, THANKS HIM FOR CIRCLE BATTERY ICONS.
If you have UBKPD firmware or you want to trie if it's usefull in yours, follow this steps (you would need to be root and to have a file manager with root permissions):
a.) make a backup, just in case. We are going to touch system files!!
b.) copy the file framework-res.apk of the folder with icons you want;
c.) copy it to the folder: system in your phone, there, change permissions to rw-, r--, r--;
d) move the file framework-res.apk from system to system/framework
d) reboot and it's done.
Advice: However you got all the icons to go 1% to 1%, i still couldn't make the changes to apply the icon to work from 1% to 1%.
Please, also, if anyone have a claim on the battery icon, let me know.
Since most users are on custom themes, ICS to be precise, replacing framework-res will result in loss of the theme.
So if you can share the png files then it will be great since it only involves drag n drop using 7zip.
Or you can explain in OP to copy the png from any of your attachment and replacing them in the one's current framework-res
Sent from my GT-I9003 using xda premium
exctngdude said:
Since most users are on custom themes, ICS to be precise, replacing framework-res will result in loss of the theme.
So if you can share the png files then it will be great since it only involves drag n drop using 7zip.
Or you can explain in OP to copy the png from any of your attachment and replacing them in the one's current framework-res
Sent from my GT-I9003 using xda premium
Click to expand...
Click to collapse
Thanks. My explanation seems it isn't good. Inside the folder I uploaded are the png files plus the framework file. If someone wants to use the png files there are they, separate from the framework file.
On the other hand, in the link I let is the explanation on how can port the png files (icons) to the firmware they want. However, I don't know if this procedure works with ice cream sandwich. It works 100% in ginger .
Uan_ar said:
Thanks. My explanation seems it isn't good. Inside the folder I uploaded are the png files plus the framework file. If someone wants to use the png files there are they, separate from the framework file.
On the other hand, in the link I let is the explanation on how can port the png files (icons) to the firmware they want. However, I don't know if this procedure works with ice cream sandwich. It works 100% in ginger .
Click to expand...
Click to collapse
OK. Cool. I didn't download the attachments so didn't know you had explained the stuff inside them.
Sent from my GT-I9003 using xda premium
what are the files needed to be edited in order to make a circle battery mod?
angoleiro said:
what are the files needed to be edited in order to make a circle battery mod?
Click to expand...
Click to collapse
Do you want to MAKE one from scratch or just install one? Which ROM are you running?
Id love to know how to do this as well. For me Id like to just modify an existing customized Rom files.
I actually tried this after hours of searching. And most seem to only talk abou modifying the SystemUI.apk by adding the 204 PNGs for the battery mode (for 1% accuracy) and also add the two modified battery XMLs. I recompiled the SystemUI.apk, injected it on the phone, set the right permissions and rebooted. I saw the battery icon change. But then 10mins later it was showing the stock battery icon again, then 10mins later I noticed it was showing the modified one again.
Im wondering why do folks mention only needing to change the SystemUI.apk when if you open the Framework-res.apk you will also see the same Battery PNGs and also see the same battery XMLs (but cannot read those in clear text).
Dont we have to modify both the Framework-res.apk and SystemUI.apk? I think the answer is yes since the UOT Kitchen makes you upload both and sends you back both modified.
Im not too familiar with how to do the framework-res.apk. Btw Im using MHX's Superlite 5.0 ROM which I believe he modified one of those files to remove the carrier text from the status bar.
Dixit
I used UOT Kitchen to change mine. All you do is pick the battery icon you want then upload your systemui.apk and framework-res.apk and wait for it to make it then download it to your sdcard. Then flash it in CWM.
Sent from my SAMSUNG-SGH-I727 using XDA
Flank32 said:
I used UOT Kitchen to change mine. All you do is pick the battery icon you want then upload your systemui.apk and framework-res.apk and wait for it to make it then download it to your sdcard. Then flash it in CWM.
Sent from my SAMSUNG-SGH-I727 using XDA
Click to expand...
Click to collapse
Yea that worked fine when I was on Gingerbread even on NexusMod ROM. Thats what I did before.
Now on ICS (Superlite 5.1 ROM), I did the same thing, took the systemui.apk and framework-res.apk from superlite's rom file, uploaded them to UOT and did the battery mod, everytime it builds it, I get a SHTF error.
So then I tried to upload the stock leaked ICS systemui.apk and framework-res.apk (not modified by any ROM), and still same issue, get a SHTF error.
It dont seem to like the ICS based files Im giving it.
Dixit
I posted one in the superlite dev thread. I'll be making more tonight.
Sent from my SAMSUNG-SGH-I727 using XDA
SimPup said:
I posted one in the superlite dev thread. I'll be making more tonight.
Sent from my SAMSUNG-SGH-I727 using XDA
Click to expand...
Click to collapse
Yeap saw that, Thanks again. Id love to see what you did in this that maybe I didnt do right in my own attempt. I added the 204 PNGs and then added these premade stat battery xml files I saw in the Galaxy S2 forum. I looked at yours (the stat battery xmls) but couldnt see them in clear text, they seem to be compiled so cant truly see whats in it.
Dixit
Flank32 said:
I used UOT Kitchen to change mine. All you do is pick the battery icon you want then upload your systemui.apk and framework-res.apk and wait for it to make it then download it to your sdcard. Then flash it in CWM.
Sent from my SAMSUNG-SGH-I727 using XDA
Click to expand...
Click to collapse
That won't work for ICS
dixit said:
Yeap saw that, Thanks again. Id love to see what you did in this that maybe I didnt do right in my own attempt. I added the 204 PNGs and then added these premade stat battery xml files I saw in the Galaxy S2 forum. I looked at yours (the stat battery xmls) but couldnt see them in clear text, they seem to be compiled so cant truly see whats in it.
Dixit
Click to expand...
Click to collapse
Just get apkmultitool and decompile it. www.apkmultitool.com
Sent from my SAMSUNG-SGH-I727 using XDA
SimPup said:
Just get apkmultitool and decompile it. www.apkmultitool.com
Sent from my SAMSUNG-SGH-I727 using XDA
Click to expand...
Click to collapse
Thanks!!!!
Just decompiled it and now I can see your XML in clear text, be interesting for me to see what I did wrong, like I said I had mine working in and out.
Thanks again. This will help me in seeing where I went wrong on my initial attempt.
Dixit
Took a look finally. My stat_sys_battery.xml and stat_sys_battery_charge.xml are identical to the ones you had in your mod. So that was done right. Any other files you modified (XML wise)?
Im still curious on why I see the same two XMLs in the Framework-res.apk and the same battery icons but modifications are not needed there. Almost seems like both are needed to be done.
Dixit
dixit said:
Took a look finally. My stat_sys_battery.xml and stat_sys_battery_charge.xml are identical to the ones you had in your mod. So that was done right. Any other files you modified (XML wise)?
Im still curious on why I see the same two XMLs in the Framework-res.apk and the same battery icons but modifications are not needed there. Almost seems like both are needed to be done.
Dixit
Click to expand...
Click to collapse
I didn't mod anything besides systemui. Didn't even touch any other file. I only added the icons and edited the 2 xml's.
Sent from my SAMSUNG-SGH-I727 using XDA
Good to know, I wonder if maybe the proper method is to also replicate these same changes in the framework-res.apk since I did a test and noticed UOT Kitchen modifies both and I see the same two XMLs appear identically betweenthe SystemUI.apk and framework-res.apk. As as well as the same icon set in both.
Dixit
From what I understand it doesn't work with the kitchen for ics
Sent from my SAMSUNG-SGH-I727 using XDA
Right I got a feeling it dont work with ICS (the UOT Kitchen). But like I said on GB it modified both framework-res.apk and SystemUI.apk and basically put the same changes in both. So there must be a reason it does that. That might be the reason why for brief moments I saw the standard battery icon and then sometimes the circle mod battery I put in there.
Dixit
As some of you know, I am making a Sense 5 look for Sense 4.x devices. Now, I am working on the skin part. The only problem now is that I need a base for the skin.
This is what I need:
A default HTC skin made for qHD screens
I understand that most resources are in the framework, and this would need a lot of time to compile, considering the need to 9patch too. I do not have the time, so I was wondering if anyone has done this before or has the time to do this and is willing to share so some people can benefit from it
Thanks in advance to whoever can help me.
KaiJun said:
As some of you know, I am making a Sense 5 look for Sense 4.x devices. Now, I am working on the skin part. The only problem now is that I need a base for the skin.
This is what I need:
A default HTC skin made for qHD screens
I understand that most resources are in the framework, and this would need a lot of time to compile, considering the need to 9patch too. I do not have the time, so I was wondering if anyone has done this before or has the time to do this and is willing to share so some people can benefit from it
Thanks in advance to whoever can help me.
Click to expand...
Click to collapse
Hi! I`m not an experimental user, but i learn very quick and i know of handling programs.And i`ve done and modify some parts of themes,roms how i like.I'd be happy to help you.If you want, just tell me what i have to do
buju001 said:
Hi! I`m not an experimental user, but i learn very quick and i know of handling programs.And i`ve done and modify some parts of themes,roms how i like.I'd be happy to help you.If you want, just tell me what i have to do
Click to expand...
Click to collapse
Take out com.htc.resources.apk and framework-res.apk from /system/framework/ (ViperS 1.6.3)
Take out matte.apk from /system/app/
Extract all 3 apks into 3 different folders
in folder drawable-hdpi of both framework apks, try to match their PNGs with the ones in drawable-hdpi of the extracted matte.apk(you may have to rename some of them) (PNGs that do not exist in matte.apk does NOT need to be copied)
After copying all is done, 9 patch all the PNGs appropriately.
When everything has been completed, send me a zip of the PNGs.
Thanks if you can do that. I will put a special thank for you in my thread.
And if anyone has an easier way, please inform me.
KaiJun said:
Take out com.htc.resources.apk and framework-res.apk from /system/framework/ (ViperS 1.6.3)
Take out matte.apk from /system/app/
Extract all 3 apks into 3 different folders
in folder drawable-hdpi of both framework apks, try to match their PNGs with the ones in drawable-hdpi of the extracted matte.apk(you may have to rename some of them) (PNGs that do not exist in matte.apk does NOT need to be copied)
After copying all is done, 9 patch all the PNGs appropriately.
When everything has been completed, send me a zip of the PNGs.
Thanks if you can do that. I will put a special thank for you in my thread.
And if anyone has an easier way, please inform me.
Click to expand...
Click to collapse
Ok,i`ll do that.But wait a little to download Viper Rom cause now i have just Elegancia.
Send you a PM right now with zip sir.