root option to add battery percent % symbol over battery icon in STATUS bar?
I know this comes in some ROMs and maybe some themes, anyone seen a stand alone option for people in root to add this ability in the MENU bar, not the task bar?
SOLVED... see below
__________________
TABLET: Asus Transformer Prime - rooted
PHONE: D1 + Pete's FRG01B | JDLFG's 32.25 1.25 | Pete's Baseband C_01.43.01P | My metamorph battery mod | Droid X Bootanimation
Last edited by Lock-N-Load; August 7th, 2010 at 07:11 PM.
Device(s): Moto Droid Bionic
Asus Transformer Prime
OG Droid (retired)
Thanks: 19
Thanked 135 Times in 102 Posts
What do you mean by menu bar?
If you are talking about the actual menu that comes up when you press the menu button (which is completely dependent on the application you are running at the time) then I don't think so.
What menu bar? On the bottom where you launch the app screen?
__________________ SHOT CALLER
RIP 2K1 Caddy STS - Hello 2K11 Chevy Cruze...25mpg vs 8mpg. WOOT
I am a MasterDebator "Eat Me" on Yelp--also make sure to QuagMyTwitr
sorry..... the notification bar is the drop down bar, no? the STATUS bar - what I called the Menu - is the top bar with signal strength, battery meter, time, 3G, etc. my bad
sorry..... the notification bar is the drop down bar, no? the STATUS bar - what I called the Menu - is the top bar with signal strength, battery meter, time, 3G, etc. my bad
I know its a relatively simple hack but its been so long since I needed to do it since Cyanogenmod its a built in option. If I can remember how to do it I will let you know
__________________
I take no responsibility for what you do to your phone. I only offer advice.
Some devs that create ROMs from source are able to add options for the battery %. But if the ROM is not from source or the dev did not add that feature the only way to add the % is to modify the actual image in the framework-res.apk. The easiest way may be to try and find a metamorph of just the battery notification.
would love to then find a "metamorph" theme and then the same stock battery icon BUT with a % on it like I have seen in Pete's BB.
I am a graphic designer, is it easy for me to get a source of that stock battery png file (I assume png) and make my own 0,10,20,30,40,50,60,70,80,100% images and make my own metamorph theme?
would love to then find a "metamorph" theme and then the same stock battery icon BUT with a % on it like I have seen in Pete's BB.
I am a graphic designer, is it easy for me to get a source of that stock battery png file (I assume png) and make my own 0,10,20,30,40,50,60,70,80,100% images and make my own metamorph theme?
If you want to make it you can. But if what you're wanting already exists you can just grab those images from the zip file. You could easily download pete's BB use 7zip or something similar and navigate to system/framework and open up framework-res.apk using same zip program and take the images. The image names are stat_sys_battery_(%), from 0 to 100.
okay.. I grabbed them. they did not have the % over them though??? I know for a fact they did in the BB 0.4 I had loaded. so I wonder if something else in the ROM writes, in small text, the %?
I made this as a demo of what I am doing.. but not sure what to now do with the images to make a theme and load it up?
using another battery only metamorph theme as a guide, I put my images into it and rezipped it back up. I now have what I think is a metamorph theme of my batteries?? I guess only way to know is to use metamorph and try to load it, but i am nervous. what if it fails, can I delete it with no issue? seems only way to go back is to flash back a ROM in recovery it seems?
Last edited by Lock-N-Load; August 6th, 2010 at 12:14 PM.
okay.. I grabbed them. they did not have the % over them though??? I know for a fact they did in the BB 0.4 I had loaded. so I wonder if something else in the ROM writes, in small text, the %?
I made this as a demo of what I am doing.. but not sure what to now do with the images to make a theme and load it up?
using another battery only metamorph theme as a guide, I put my images into it and rezipped it back up. I now have what I think is a metamorph theme of my batteries?? I guess only way to know is to use metamorph and try to load it, but i am nervous. what if it fails, can I delete it with no issue? seems only way to go back is to flash back a ROM in recovery it seems?
Just make sure that the image names are correct and the structure is correct. I've never used Metamorph myself as I prefer to do things manually. If you took the structure from another metamorph most likely you should be OK, just do a backup in recovery before using the metamorph. This way if something goes wrong you can go back to where you were prior to using Metamorph. You may also want to modify stat_sys-battery_charge_anim to match.
I left the stat_sys-battery_charge_anim files as is as they seem cool to me and I do not mind that charging animation/progression. I just like to know the % during battery use more than during charging.
I left the stat_sys-battery_charge_anim files as is as they seem cool to me and I do not mind that charging animation/progression. I just like to know the % during battery use more than during charging.
I just didn't know how much changes you made, so if all you did was add the % then there isn't anything really to change for the charging animation. I haven't used the stock battery in a long time and don't remember how it looks, LOL.
Device(s): Moto Droid Bionic
Asus Transformer Prime
OG Droid (retired)
Thanks: 19
Thanked 135 Times in 102 Posts
Quote:
Originally Posted by Lock-N-Load
sorry..... the notification bar is the drop down bar, no? the STATUS bar - what I called the Menu - is the top bar with signal strength, battery meter, time, 3G, etc. my bad
Generally the bar at the top is called the "notification bar" and the thing you pull down is the "notification blind".
yeah, I kind of like the manual idea as it kind of implies I can go into something on the SD card, grab the files, back them up, drop mine in.. no? that would be easier... but I may have that process wrong.
when I get around to trying to load this, I will report back of course. and IF it works, I will supply the file and directions so anyone can do it.
and heck, I did this quick.. I could "really" take some time and maybe try a better font, maybe some bevel effects on the battery, maybe try a different color than green - like orange - for the 60% as it seems like 40-100 should not all be green.
Last edited by Lock-N-Load; August 6th, 2010 at 08:03 PM.
yeah, I kind of like the manual idea as it kind of implies I can go into something on the SD card, grab the files, back them up, drop mine in.. no? that would be easier... but I may have that process wrong.
Exactly, all you need to do is replace the file with your new picture. The only thing is that you won't be able to replace some files because they'll be in use while the phone is on.
I'm pretty sure you can just create your own update.zip to get around this. If you look in any update.zip you'll see you just need to put the file in the folder you want it to go into. Suppose you want to replace /system/framework/framework-res.apk, you would create a system folder on your computer, go into it, create a framework folder, go into it, and place your new framework-res.apk in that folder. Then you would take the system folder and put it into a .zip and use ClockworkMod to apply it.
__________________
Current phone: Droid Charge @ 1200MHz. ROM jumping, waiting for CM to arrive!
Quote:
Originally Posted by UBRocked
Just put your phone in airplane mode and tell him you loaded an iPhone 4 simulator on your Droid.
would love to then find a "metamorph" theme and then the same stock battery icon BUT with a % on it like I have seen in Pete's BB.
I am a graphic designer, is it easy for me to get a source of that stock battery png file (I assume png) and make my own 0,10,20,30,40,50,60,70,80,100% images and make my own metamorph theme?
Maybe you can take the files out of a ROM that has this feature. It was either Chevy or JRummy's latest that even has 5, 10, 15, 20 - which is nice when you are really low.
Not sure if it's just graphics or another implementation, but I am sure that the percentages simply coincide with the graphic level on the battery png.
Maybe you can take the files out of a ROM that has this feature. It was either Chevy or JRummy's latest that even has 5, 10, 15, 20 - which is nice when you are really low.
Not sure if it's just graphics or another implementation, but I am sure that the percentages simply coincide with the graphic level on the battery png.
I might add the 10% increments as i have a battery tool right now that has a status bar widget that shows in 10% increments while the ones I pulled from the ROM only have what you see above. So, I wonder if I just filled in the blanks between stock images with 3 more images:
Exactly, all you need to do is replace the file with your new picture. The only thing is that you won't be able to replace some files because they'll be in use while the phone is on.
I'm pretty sure you can just create your own update.zip to get around this. If you look in any update.zip you'll see you just need to put the file in the folder you want it to go into. Suppose you want to replace /system/framework/framework-res.apk, you would create a system folder on your computer, go into it, create a framework folder, go into it, and place your new framework-res.apk in that folder. Then you would take the system folder and put it into a .zip and use ClockworkMod to apply it.
I think to make a "framework-res.apk" all you do is make "framework-res.zip" and rename it "framework-res.apk" as doing the opposite allowed me to extract a "framework-res.apk" into its files and contents.
the goal of doing it "manually" - as opposed to using metamorph - would be so you could just drop these files in or out and reboot and have them there instantly VERSUS having to flash back an entire ROM just to get back to the stock ones. is this what we are agreeing can be done by doing it "manually" as ease of undoing this if it sucks is what is stopping me.
To clarify on how I do it manually is by pulling the framework-res.apk to my computer modify the images or xml content as needed and then either pushing it back or replacing the apk from my themed .zip file and reflash. Reflashing with either your theme or ROM seems to be the best way with me because if I just simply push it back it makes setup all of my accounts again. I have never tried shadowdude777's approach but probably will to test it.
To clarify on how I do it manually is by pulling the framework-res.apk to my computer modify the images or xml content as needed and then either pushing it back or replacing the apk from my themed .zip file and reflash. Reflashing with either your theme or ROM seems to be the best way with me because if I just simply push it back it makes setup all of my accounts again. I have never tried shadowdude777's approach but probably will to test it.
I have pulled the framework-res.apk to my computer from another ROM, renamed it to .zip, extracted, modified the stock battery images, remade them with same names (and even added a few 10% gaps & used obvious naming convention as I said above, though not sure if they would be shown by phone, but i made them anyway), zipped it up, renamed it back to apk.
BUT, I am trying to follow what shadowdude777's is saying and he makes it sound like we could then, via our SD card, access where this framework-res.apk, pull it, drop in my images, rezip and just drop ours in versus the whole flashing method? if that was the case, to get around the whole "The only thing is that you won't be able to replace some files because they'll be in use while the phone is on." is just shut the phone down, pull your SD card, mount it on the computer and put these files on, no? and if so, where on the SD card?
Last edited by Lock-N-Load; August 7th, 2010 at 10:20 AM.
For one I'm not sure how to replace images in an apk still on the phone. I have always done this from my PC. And I believe what he is saying is that it's hard to do because some of the images might be in use. What he is suggesting is to create your own update.zip to flash from recovery, at least that's how I'm reading it.
For one I'm not sure how to replace images in an apk still on the phone. I have always done this from my PC. And I believe what he is saying is that it's hard to do because some of the images might be in use. What he is suggesting is to create your own update.zip to flash from recovery, at least that's how I'm reading it.
if that is the case, just as easy to use metamorph, make my battery package, install it with that and if I do not like I could (1) reflash back my backup ROM or (2) make a 2nd package of just stock images and put those back via metamorph
just did a test.. loaded up my images with metamorph, using a package I put together based on a reverse engineer of another battery only metamorph package, and it works my images with % signs are now in place!
BUT, I have another battery widget that does 10% increments and it seems while both were on 100%, when the this other widget went to 90%, the Droid battery was still showing at 100% icon. That implies to me, even though I put a 90% in place, it would not pull it and use it. Further proof is that when the widget went to 80%, they both went to 80%. And 80% was a stock option as we know (100 to 80). SO, mine work which is cool as you get the % but the widget clearly shows while mine is still on 100% it in fact could be at 90%, they catch up at 80% and I will assume so on down the line.
so you see the conundrum? leave mine in place and know it will only read the stock Droid settings of 100,80,60,40,20,10,0 and at the same time know when you are at 100 on mine you could actually only be at 90 and that 80 you could be at 70 and at 60 you could be at 50 and so on...
I suspected that this might be the case for you but wasn't sure. I believe that just because you have the images in place the ROM has to know to look for the images. And in this case your ROM was originally only setup to do 20% increments instead of 10% increments.
BUT.. notice how I say the widget can tap into them AND when you charge it in a cradle, it will report 10% increments. So, a widget & charging screen/details can be configured to do something different than the ROM allows? If the Droids ROM only does 20%, how is the widget doing 10%? That is kind of odd to me given a widget and the charging screen can do 10%, but the status bar battery only does 20%???
still, having figured this out, reversed engineered it, made my images and the package and such and made it work, that is pretty cool. If the stock system is clearly considering 100-90% as 100%, as seen by mine showing 100% while the widget shows 90% and both lining up at 80%, then I guess I am cool with it. I just got use to seeing 10% increments but having 1 less widget in my status bar taking space is kind of nice. so, it is a trade off.
Last edited by Lock-N-Load; August 7th, 2010 at 07:01 PM.
I am finding that, unless you have brightness cranked up, mine are kind of hard to read on the phone since they are resized a bit smaller than you see here. The BB 0.4 ones seen below
also do not have the % and have a black background to the numbers.. might investigate that route to make mine stand out. trying to find the ROM Bugless Beast FRF57 V0.2.1 that has this in it? weird thing is, some peoples screen shots have it, some dont and when I just go grab the current BB 0.4, what is found are the general images I have, not the ones seen here with a # in the battery???
I am starting to think now that these are not images. in looking around in the 1 ROM I found, I found a font called 'clocktopia' and that looks much like the font seen here and what further makes me think that is that the font cannot do the "%" symbol, and notice it is not in these images. So, I am thinking, that 100 is NOT an image, but text rendered over the basic battery image.
Last edited by Lock-N-Load; August 7th, 2010 at 06:08 PM.
Okay.. think I nailed it here.. I just decided to make the numbers out of pixels AND use no % as that is pretty obvious so it saves space and makes easier to read. I also emulated the one above which kind of emulates the stock charging battery scheme by having a black background behind each # just like the charging icons do.
loaded up and looks great, better than my first attempt.. WAY better.. check it out
Last edited by Lock-N-Load; August 7th, 2010 at 07:08 PM.
So I haven't been on the forums for a little bit, sorry about that. I do enjoy seeing your progress though, I always thought it was a shame you were on stock until recently because you seem like a sharp guy and you did catch on to this stuff rather quickly. I think you'll have fun with root.
As far as the battery icon goes, if you're looking for pure visibility, have you considered just a simple number? As you can see in the screenshot below, you don't need to look hard at all to see it.
Unfortunately, I'm using Sapphire, a ROM that does battery in increments of 20%. So I did make stat_sys_battery_30/50/70/90.pngs but they don't work. I poked around ChevyNo1's Simply Stunning and didn't see anything very different that allows them to read those files, but then I've never done theming before.
Clearly, the ability for the status bar's battery icon to poll at 10% intervals is something incorporated into individual ROMs. Does anyone here know how to incorporate the ability to poll at 10% intervals? If not, I may be tempted to e-mail a ROM developer that does use 10% intervals like ChevyNo1 or Pete and ask them how they do this.
By the way, I left out a critical part of making an update.zip. You need a file called META-INF/com/google/android/update-script (note that there is no extension on that update-script file and that the path is totally case-sensitive, as are all paths in Android and Linux in general). You can create it as a .txt file, then copy the code below into it, and then remove the extension:
yeah, I figured this out with some reverse engineering and having never done it before in a few hours of snooping around. but I tend to be pretty good at that stuff as it is logical for me once i get some bering on this whole root process.. now doors in my brain are opening left and right. as you can see, I had success and mine works. I never thought about just a # and no battery at all, as that would make it easier, BUT by leaving the battery icon when it charges, the icon and my work still line up.
BTW, I, as well, tried to do those inbtween 10% jumps but as we both know, it will not pull them. I was also wondering if there would be a way to get the ROM to do it, but looking at the code in the package I reverse engineered to make and place mine, there is nothing that makes such a call to the system to poll those results.. so I have no idea where deeper in some other code in the ROM is that info. wish I did as 10% would be nice as we know the system can do it as like I said, the charging cradle screen shows 10% and so does the widget.. so it is there. if you get the answer, post back up.
The Motorola Droid - the first ever Verizon Android Phone - exploded onto the mobile market with an incredibly successful ad campaign that brough Android to the masses. With a huge and vibrant touchscreen, solid metal body, full QWERTY keyboard, 5M... Read More