How to show exact battery percent on droid

allstar5101

New Member
Joined
Apr 22, 2010
Messages
15
Reaction score
0
I'm rooted running jrummys froyo kangerade on my motorola droid. on the many battery widgets iv tried and when the phone is charging it shows batteryin 10percent increments. Is there a way to show exact percent i.e. 93%

Note: the battery was like this on my stock droid and on a plain froyo rom.
 
G

gavron

Guest
Sort of.

Download Battery Left from the market. Train it as to your usage.

It will then show you the percentage based on A)System 10% readings and B)Its estimate of usage to the next 10% mark based on YOUR particular usage.

Side benefit #1: It will tell you the time remaining till the phone is dead

Side benefit #2: It will tell you the ACTUAL time the phone will be dead

Side benefit #3: It will tell you what a full charge gets you usage-time wise.

I recommend when you're training it to use the phone and gps a lot. This will mean all estimates will be conservative later.

Ehud
 

Se7enLC

Active Member
Joined
Nov 16, 2009
Messages
1,262
Reaction score
0
I don't know of a way to do it with a widget, but here's a way you can do it manually:

/sys/class/power_supply/battery is a directory in the /sys virtual device filesystem. It gives you all sorts of useful information:

capacity: Battery percentage, probably in 10% increments. I suspect this is where most apps get their data from
health:
Says "Good" on my Droid. I suppose if there were a problem or if you had reduced capacity, it would show up here.
present: 1 or 0 depending on if the battery is here.
status: Charging, Discharging, Full
technology:
Li-Ion
temp:
Temperature in what looks like tenths of a degree C. So if you are at 32, it'll say "320"
type: Battery
voltage_now
: The current voltage of the battery in microvolts.

So if you just pull from "capacity", you will only see a percentage, probably in 10% increments.

You *might* be able to get more information by looking at voltage_now. Mine says 41940000 when plugged in and fully charged (100%). If you were to pick a value for, say, 50% capacity and 20% capacity, you could interpolate what voltage is what capacity. Judging by the 4 significant digits in the voltage, chances are you can do a lot better than 10% accuracy this way. Unfortunately, voltage is not REALLY a great measure of capacity, so it might take some training to get it to work correctly.

In summary - do you really NEED more than 10% accuracy? :p
 
Top