My quest continues for an understanding of battery reporting. I have done the battery calibration, both from the app and from CWR, with a full battery, followed by allowing it to fully drain until it shuts itself down and won't come back on, then replacing the battery with a fully charged one from the separate charger, but yet my same problems persist.
I'm looking for info on exactly what such battery reporting is really measuring. In my quest, I have found some other apps that others may find interesting.
One is called Battery Circle, which also gives 1% increment readings, but also shows the info in the notification/status bar instead of as a widget. The notification bar icon shows a colored circle indicator with a number inside.
The other is Battery Monitor Widget, which offers a plethora of information. This showed me that the phone still thinks I'm using a 1500 mAh battery, which is not correct. It also has a place to manually enter your battery's total capacity, and min and max voltages.
Also nice is the fact that I'm running SSX rom, which offers an option to hide the normal battery icon from the status bar, which only did 10% increments and is redundant with Battery Circle.
I hope someone finds this info useful, and if anyone can point me to info regarding what the battery reporting is actually measuring, I'm all ears.
3club,
I can tell you a little of what I know (or think I know
).
From how I think things work, you've got the information that the circuitry in the battery reports (voltage, temperature info, etc.) back to the Android operating system. Android records this information in the batterystats.bin file (located for the Droid X in
/data/system/batterystats.bin -- that's the file that gets deleted when you do a "wipe battery stats").
Additionally, Android records this information in a set of files that are a little more palatable for external viewing (or more likely, various APIs) in the
/sys/devices/platform/cpcap_battery/power_supply/battery directory (on the Droid X, at least--this directory varies by phone and manufacturer).
Here's an
ls -al output of that directory:
Code:
# ls -a -l /sys/devices/platform/cpcap_battery/power_supply/battery
-rw-r--r-- root root 4096 2011-08-19 21:05 uevent
lrwxrwxrwx root root 2011-08-19 21:05 subsystem -> ../../../../../class/power_supply
lrwxrwxrwx root root 2011-08-19 21:05 device -> ../../../cpcap_battery
drwxr-xr-x root root 2011-08-19 21:05 power
-r--r--r-- root root 4096 2011-08-19 21:05 type
-r--r--r-- root root 4096 2011-08-19 21:05 status
-r--r--r-- root root 4096 2011-08-19 21:05 health
-r--r--r-- root root 4096 2011-08-19 21:05 present
-r--r--r-- root root 4096 2011-08-19 21:05 technology
-r--r--r-- root root 4096 2011-08-19 21:05 capacity
-r--r--r-- root root 4096 2011-08-19 21:05 voltage_now
-r--r--r-- root root 4096 2011-08-19 21:05 temp
-r--r--r-- root root 4096 2011-08-19 21:05 charge_full_design
-r--r--r-- root root 4096 2011-08-19 21:05 charge_counter
These files correspond to the values reported when an app listens/subscribes for the
BATTERY_CHANGED /
ACTION_BATTERY_CHANGEDsystem intent.
Most of the files' purpose is self-evident, but you should know that the
charge_counter file is the one that contains the 1% battery percentage delta values (note: the values in this file can exceed 100, probably due to the variation in a battery's actual capacity).
The
capacity file is what is referenced by the system in reporting and showing the percentage charge on the notification bar's battery icon on your phone. Of course, its values are reported in 10% increments vs. the 1% values recorded in the
charge_counter file. I suspect that this is primarily done by Moto given, again, the variability between batteries and the imprecise nature of what a battery's actual reported charge.
Having an app (like my
BattMonX app) report the 1% percent charged delta requires directly reading the
charge_counter file.
For more details on what and the format reported by the aforementioned system intent, see this page:
BatteryManager | Android Developers.
Also, you might gain some insight on your particular problems from here:
http://androidforums.com/droid-x-support-troubleshooting/383790-phone-not-charging-when-dead-unable-find-help-anywhere.html
Do You Know Everything There Is To Know About Lithium Ion Batteries? If Not, Read This… | xda-developers
Things You Should Know About Lithium Ion Battery - xda-developers
Hope that helps.
Cheers!