I'm working on a research project about Android smartphones power consumption. Using "adb shell dumpsys batterystats" interesting stats can be obtained. For example:
Statistics since last charge:
System starts: 0, currently on battery: false
Time on battery: 1h 0m 38s 51ms (99.7%) realtime, 1h 0m 38s 50ms (99.7%) uptime
Time on battery screen off: 30m 21s 169ms (49.9%) realtime, 30m 21s 169ms (49.9%) uptime
Total run time: 1h 0m 47s 207ms realtime, 1h 0m 47s 207ms uptime
Start clock time: 2016-06-18-22-57-54
Screen on: 30m 16s 882ms (49.9%) 1x, Interactive: 30m 16s 367ms (49.9%)
dark 10s 89ms (0.6%)
light 30m 6s 793ms (99.4%)
Estimated power use (mAh):
Capacity: 6700, Computed drain: 298, actual drain: 335-402
Unaccounted: 36.9 ( )
Uid u0a90: 15.8 ( cpu=15.8 )
Uid 1000: 9.58 ( cpu=9.49 sensor=0.0868 )
As far as I know, the power_profile.xml is used to estimate the power consumption of each hardware component, and differs from device model to another.
Now I have couple of questions:
Q1: How does Android compute actual drain ? I looked everywhere and I can't seem to find an answer. I also checked Android code, but unfortunately I couldn't identify the implementation of the method responsible for "actual drain".
Q2: How Android estimates the screen power consumption ? the Screen's value when its "light = 75%" found in the power_profile.xml on Nexus 9:
ligh: 120.96 ( and it's in mA according to the power_profile.xml)
The report says the power consumption of the screen is 244 mAh, when it was on "light" state for 30 mins, it doesn't make sense to me ! Can you guys explain it ? I tried to check the source code in [here], :( again I couldn't find it.
Q3 How accurate these values in the power_profile.xml ? I found on another Android community werbsite some reported issues for Samsung devices. But I don't know about Nexus 9.
Thank you guys for your time.