1. Are you ready for the Galaxy S20? Here is everything we know so far!

Can you change increments on battery meter?

Discussion in 'Android Devices' started by rcourt529, Feb 8, 2011.

  1. rcourt529

    rcourt529 Well-Known Member
    Thread Starter

    I recently downloaded the app: Battery Solo Widget and on the screen preview it shows the battery meter at 69 meaning it can move at 1% intervals. I downloaded the widget and ran it on my desktop and it only moves in increments of 10 ie: 100, 90, 80, 70, etc. Is there a setting on this widget or with the API that would enable the battery meter to show single digit increments, ie: 100, 99, 98, 97, etc. instead of ten digit increments?

    1. Download the Forums for Android™ app!


  2. shadowdude777

    shadowdude777 Android Expert

    No, the firmware in the Droid's battery meter only reports to the phone in increments of 10%. It's possible on many other phones. I know the Epic does it in 1% increments, for example.
  3. NiceGuysFinishLast

    NiceGuysFinishLast Android Enthusiast

    Yeah, the framework of the phone itself only reports 10% increments down to 20%, where it switches to 5%.
  4. Lock-N-Load

    Lock-N-Load Android Expert

    this issue has always been one of those deficiencies in the stock software of this phone IMHO - kind of like no real good cut and paste functionality.

    IIRC, some ROMs have been able to free up the increments to like 5% - but never seen 1%
  5. rcourt529

    rcourt529 Well-Known Member
    Thread Starter

    Gotcha, well it was worth a shot...thanks for all your input!
  6. shadowdude777

    shadowdude777 Android Expert

    I don't think it's possible to have 5% increments at all above 20% unless you interpolate like Battery Left does. The hardware is just not able to report, for example, 95% left.
  7. Lock-N-Load

    Lock-N-Load Android Expert

    I am pretty sure 10% on some of the devs ROMs has been done - your likely right bout 5%. I think BB, JRummy and GummyJAR did/does 10%. but I was not willing to load a whole ROM for just that future. EDIT: yes, many ROMs can do 10%, better than the stock 20%.

    as I understood it, the hardware can do 10% increments through the spectrum but the XML file that reports the battery to the phones GUI is coded for 20% and the images that come stock on the phone are 20% but you can edit the XML file and remake 10% increment png images, it can report them.

    If you recall, I made my own custom battery icons with the % in them - loaded via Metamorph - and I did 10% increments as well but the phone only supports showing the 20% images since I was not able to edit the XML file and recompile it... so it is a matter of the DEVs having edited & recompiling - which I could not - that XML file - stat_sys_battery.xml in /res/drawable/ and providing new icons for the 10% ranges.. and icons go in res/drawable-hdpi

    I have the 10% icons I made and I can edit the XML file but it is recompiling the file for the system to recognize it that is the issue. Placing the images can be done with simple Easy Root BUT if you do not edit that XML file to find and recognize 10% images and increments, your images will not be seen at those middle 10% ranges.

    So, now, a lot of Google searching has proven this setup is as I think but finding an edited and working apk that holds the edited stat_sys_battery.xml file is my problem. If I could get that and get it to install, I could push my other 5, 15, 30, 70 icons. But for now, I cannot get any of the stat_sys_battery.xml files to work I have found :(
  8. shadowdude777

    shadowdude777 Android Expert

    Yes, I remember that, and you're right, the XML file that reports the battery to the notification pane of the phone is only set to do 20% increments in AOSP ROMs (like CyanogenMod). I am almost certain the Droid-build ROMs did 10% because it was modified specifically for the Droid by Motorola, and then some devs took AOSP and modified it to do this too. But I've never seen more accuracy than 10% by any method other than Battery Left's interpolation methods.
  9. Lock-N-Load

    Lock-N-Load Android Expert

    yeah, 10% is as good as it gets until below 20% there seems to be a 15% and 5% before you get to 0. Many threads on other Droid sites show this to be true and several ROMS provide them.

    I just want this 10% functions without a full custom ROM
  10. shadowdude777

    shadowdude777 Android Expert

    I never figured out what XML file it is that reports battery life to the status bar, unfortunately. I use CyanogenMod exclusively, and while it does let you put a number overlay on the battery icon that works at 10% intervals, there are only new icons for every 20%, and if you recall, I made a set of very large custom battery icons that are just a number in a color that corresponds to current battery life, and I'd like to be able to use those instead of CyanogenMod's small text overlay on the stock battery icon.
  11. Lock-N-Load

    Lock-N-Load Android Expert

    I just read this

    "As of now I'm using CM6, the percentage is in increments of 1%. Example, right now it's at 51%."
  12. Lock-N-Load

    Lock-N-Load Android Expert

    for a fact, it is stat_sys_battery.xml located in /res/drawable/

    BUT it is not just as simple as editing that file alone to get it to recognize 5,15 and 10% increments. So, it is a combo of additional images, the editing of that file, and then recompiling it (which is where I am stuck at).

    I have just spent over an hour trying different methods of editing stat_sys_battery.xml in /res/drawable/ and getting it to recognize the images at the 5-15 and 10% increments and no avail. I have tried direct edit, Metamorph, etc. I can get it to use my custom images BUT it fails to read the additional 10% at like 5,15,30,70 and only does 100, 80, 60, 40, 20, 0.

    a few of the ways I tried really should have worked from what I read so I am starting to wonder if just stock rooted FRG ROM I use cannot do the 10% even if I edit the stat_sys_battery.xml, which does not make sense as that file is what tells the ROM what to report so editing it to show 10% amounts should have worked.. it did not :( Maybe a D1 limitation even if the file is edited??
  13. shadowdude777

    shadowdude777 Android Expert

    It's not a D1 limitation though! If you go into About Phone in the Settings menu you can clearly read the battery at 10% increments. All widgets can read it at 10% increments. And more importantly, the stock Motorola Droid ROM can display 10% increments in the notification bar.
  14. Lock-N-Load

    Lock-N-Load Android Expert

    agreed. also, the battery widget I use shows 10%. so I take that back.

    the issue is coming down to the uncompiling, editing of stat_sys_battery.xml, recompiling and placing. you CANNOT just edit and place the file. doing so will give bad results like no icons at all. and the whole uncompliling of the file in the apk and recompiling is just more gibbberish and apps to try to find - mostly for a PC and I work on macs - so I am kind of dead.

    what I am trying to do now is find one setup that is already edited with 5,15,30,70 and compiled - even if it does not have the images I want - as I do know for a fact changing images is fast and easy. but I just need to get a complete apk setup with the file working and then I can edit in my images. so far, all the ones I have tried fail to work.

Motorola Droid Forum

The Motorola Droid release date was November 2009. Features and Specs include a 3.7" inch screen, 5MP camera, 256GB RAM, processor, and 1400mAh battery.

November 2009
Release Date

Share This Page