[Q] How to do 1% battery icon mod - Nexus S Q&A, Help & Troubleshooting

I have done it before, but it has been a long time and I dont remember what all needs edited. I know there are two xml's in the drawable folder, but I think there is also a smali file or something that needs edited. Anyway, if somebody could tell me how to add the 1% battery icon mod to my current framework I would appreciate it.
Thanks!!

Related

[Q] Super Circle Battery

Hello to everyone...
I was wondering if this mod is possible on our Milestone...
Does anyone have tryed this???
It woull be awesome, but it would need some work on milestone frameworks too.Already a user tried it on milestone but the icon place was blank.
Mine too.
I changed the icons and the xml files that come with the .zip file (stat_sys_battery.xml, stat_sys_battery_charge.xml) and then i had no icon in status bar....
Would be easy by simply edit the framework-res.apk. But the problem is the Milestone display the battery stat only 10% by 10% ...
Yes what's why you must change and some .xml files...
But i don't know how....
So if anyone manage to import this wonderful mod to milestone it will be perfect....
The rom I am currently running (Telus light and fast V3, available here in this same forum) displays the battery percentage in the status bar. It is nice to see percentage (by tens except last few steps - by fives), but battery icon needs some more work design wise (IMO). Maybe it is just a matter of replacing the graphics?
If you read the link in my first post you will see that in that link the battery circle is every 1%.
All the roms now have every 10%...
But i am asking if it's possible to have circle battery every 1% to our Milestones...
So you don't have to change ONLY the graphics.... but also some .xml files in framework-res.apk.
But i don't know which and how....
kalagas said:
If you read the link in my first post you will see that in that link the battery circle is every 1%.
All the roms now have every 10%...
But i am asking if it's possible to have circle battery every 1% to our Milestones...
So you don't have to change ONLY the graphics.... but also some .xml files in framework-res.apk.
But i don't know which and how....
Click to expand...
Click to collapse
I thought you want circle battery icon that shows percentage. I don't think it is as simple as framework and XML change to have 1% increments. You need new battery driver. And for this you need new kernel. And, you guessed, for this you need cracked boot loader Good luck!

[Q] MORPH: getting bootloops with cyrcle battery (selfmaid theme)

Hi,
I'm working on a theme for the nigtlies for myself (is going to be released later).
It is based on a GalaS theme with lots of elements of nextheme, some sense stuff, basically a mix of what i like from every theme i once applied for different roms...
My problem:
I'm getting bootloops after i changed the battery png's to cyrcle battery even though same number of pictures....
Does anybody know what i need to do to add the cyrcle battery style to my morph? Do i need another xml file which basically tells the ui that now it is a cycle battery?
Any help is appreciated..
i'm kind of lost here...
You should make sure you are saving them with the exact name of the stock icon files. They need to be a png 32 file with a transparent bg. Also make sure the name of the theme zip file is the same as your xml file.
As long as its the same number of files with the same name you should be good. Search in the morph sticky at the top of the forum and tear a couple of battery morphs apart and compare.
Well i tried that, no luck so far. Gonna compare some battery morphs later on.
tr.slate said:
You should make sure you are saving them with the exact name of the stock icon files. They need to be a png 32 file with a transparent bg. Also make sure the name of the theme zip file is the same as your xml file.
As long as its the same number of files with the same name you should be good. Search in the morph sticky at the top of the forum and tear a couple of battery morphs apart and compare.
Click to expand...
Click to collapse
Sent from my Nexus One using XDA App

how to mod your battery for percentage?

im running steelh and i have the blue epic style battery. how can i get the battery percentage into that without using different icons? i tired the online kitchen but my phone is stuck in a bootloop.
anybody? the kitchen just gives me errors.
ive used the online kitchen before with no issues, but id like to know how to this manually.
Sent from my panty-dropper.
ericwgarza1 said:
ive used the online kitchen before with no issues, but id like to know how to this manually.
Sent from my panty-dropper.
Click to expand...
Click to collapse
i cannot get it to work no matter what i do. can any dev help out here? i want the blue epic style battery with percentage. aside from the png's what files do you need to get this working on a sense rom? all of this hassle is making me want to go back to cm6, at least on that we can use the settings to accomplish alot of things we cannot on sense roms.
can you add the battery percentage mod into a rom that doesn't by default come with it? i heard about needing a modded services.jar file? or do i have to go with a different rom here for what i need? the online kitchen will simply not work for me.
The battery mods are accomplished by editing xmls and pngs in framework-res.apk
SteelH said:
The battery mods are accomplished by editing xmls and pngs in framework-res.apk
Click to expand...
Click to collapse
i have the png's but i have no clue how to mod xml files. im pretty good at Frankensteining themes together but for the life of me i cannot get this to work.
A couple of things: are you using a deodexed or odexed rom? Are you trying to add the circle battery to your existing theme or are you just trying to add the battery period?
I made a "dummy" flash file a while back that "prepped" odex roms before flashing the battery percentage mods.
You can also decompile the framework you want and transfer over the pngs and xmls for the battery mod into your existing framework.
Decompiling would be the best route as you would have to recompile it with the new xmls added to the resource list.
I would/could help but I won't flash anything on my evo right now since I currently have it hooked up to debug an app. Just send me the framework file from your phone and the battery mod you want and I can take a look at them and hopefully recompile it for you.
lovethyEVO said:
A couple of things: are you using a deodexed or odexed rom? Are you trying to add the circle battery to your existing theme or are you just trying to add the battery period?
I made a "dummy" flash file a while back that "prepped" odex roms before flashing the battery percentage mods.
You can also decompile the framework you want and transfer over the pngs and xmls for the battery mod into your existing framework.
Decompiling would be the best route as you would have to recompile it with the new xmls added to the resource list.
I would/could help but I won't flash anything on my evo right now since I currently have it hooked up to debug an app. Just send me the framework file from your phone and the battery mod you want and I can take a look at them and hopefully recompile it for you.
Click to expand...
Click to collapse
its the steelh deodexed rom. i have alot of themes going on and i do not want to loose them. i just want the battery with the percentage in it. ive attached what you may need, thank you.
I'll take a look at them now.
Give me some time.
lovethyEVO said:
I'll take a look at them now.
Give me some time.
Click to expand...
Click to collapse
thanks for taking the time!
Found a clue about the problem.
The online kitchen I believe has a disclaimer about .9pngs in the framework.
Basically if some .9s are not edited correctly it can cause an error in the decompile/compile process.
The framework you gave me throws an error when trying to compile. I have seen this error many times before and it always results in the changed files (xml and pngs) not being inserted into the newly compiled framework.
I decompiled/compiled three times, same error and the changed files were not inserted into the compiled apk.
Your problem lies in the framework and the tools ability to properly process the .9s.
Also, the epic zip you gave me does not have any xml files to tell the framework what png to display and it has 80 more pngs for the battery charge animation.
This is not something I want to spend more time on right now but the info I'm giving will hopefully get you in the right direction.
I think the two .xmls that needs to be edited are:
stat_sys_battery.xml
stat_sys_battery_charge.xml
Decompile a framework-res that already has the mod included and you should get an idea of what to do.
Someoneplease let me know if I'm wrong. Thanks!
ericwgarza1 said:
I think the two .xmls that needs to be edited are:
stat_sys_battery.xml
stat_sys_battery_charge.xml
Decompile a framework-res that already has the mod included and you should get an idea of what to do.
Someoneplease let me know if I'm wrong. Thanks!
Click to expand...
Click to collapse
There are actually 3 xmls needed for the battery mod.
The op stated he has a theme going and he doesn't want to lose it. The only way to incorporate the battery mod and keep his theme is to add the battery to his existing framework.
As I explained above, .9s are special pngs and if they are not edited correctly will cause the decompile/compile tool to throw an error. Themers will edit .9s and although they will show properly on the phone the tool used to decompile/compile the apks will notice if the .9s are incorrect.
What the online kitchen does and what I did manually are the same thing and more than likely with the same tools. The epic pngs the op supplied did not have any xmls and so im surprised the online kitchen was able to produce an apk.
If I spent more time on it I could probably figure it out but I am already occupied with another time consuming task.
What is the other .xml named?
I'd like to personally (for learning purposes) add the battery percentage to a stock framework-res.apk manually. Thanks!
Try this. I give no guarantees at all since I manually inserted the xmls and pngs. Also since there are 80 more pngs for the charge animation there's no way of telling how it will look.
lovethyEVO said:
There are actually 3 xmls needed for the battery mod.
The op stated he has a theme going and he doesn't want to lose it. The only way to incorporate the battery mod and keep his theme is to add the battery to his existing framework.
As I explained above, .9s are special pngs and if they are not edited correctly will cause the decompile/compile tool to throw an error. Themers will edit .9s and although they will show properly on the phone the tool used to decompile/compile the apks will notice if the .9s are incorrect.
What the online kitchen does and what I did manually are the same thing and more than likely with the same tools. The epic pngs the op supplied did not have any xmls and so im surprised the online kitchen was able to produce an apk.
If I spent more time on it I could probably figure it out but I am already occupied with another time consuming task.
Click to expand...
Click to collapse
Good explanation thank you. I think I have the similar problem I unzipped my framework and changed my battery and it worked. The only problem is I can only use the six charging animations. A little research last night and I realized I needed to edit the xml. Decompiling my framework would not work and I think your explanation helps me understand why.
ericwgarza1 said:
What is the other .xml named?
I'd like to personally (for learning purposes) add the battery percentage to a stock framework-res.apk manually. Thanks!
Click to expand...
Click to collapse
maybe public.xml

Custom Icons for Themeing?

SO I just spent the past hour installing SDK and decompiling the SystemUI.apk, now I'm at the part where I can do some major modifying but I have never done this before and I'm not quite sure how to make a custom .png for a battery icon, seems that's the first mod I will be working on, any help with this would be GREATLY appreciated
Well I wouldn't start with that image because there's over 200 png's you have to make for that mod... I'd start with signals or something where there's only one or a few images to create...

Cool skull battery mod

I found a thread here on XDA that has a collection of literally every battery mod/icon out there. The link is here: http://forum.xda-developers.com/showthread.php?t=2280597
I found a really sweet red skull that I liked a lot, screenshot below. It includes 1% battery increments as well as 1% charging increments. The only problem I ran into is that these icons were made primarily for samsung galaxy roms. The image directories/names are a little different and just have to be renamed in order for use. Really, all you have to do is remove the "tw_" right before the "stat_sys_batt" for every image. It's a pretty cool place to find some really unique battery icons. If anyone has a request for an icon they would like, I can gladly mod a systemUI.apk for your ROM as long as the icon pack exists. I use apkmulti-tool to decompile and recompile all of the apk files if anyone would me to explain how to use it since it took me forever to learn on my own.

Categories

Resources