1

I'm looking at the "Battery" section under "Settings", and there's two major sections:

  1. a graph that shows how full the battery has been over some period
  2. Which apps have used the most battery power over (what appears to be) that same period.

There's a label between the two sections that says "Use since last full charge"

And I can't figure out what constitutes "full charge".

Things I've tried: 1. Not letting the battery get full. (thought it would be this simple a couple of months ago when I started this investigation, but it's not this simple) 2. Not letting the battery get empty (it seems to reset the stats more when the battery is low, 3. Time charging (it also seems to happen if it's a short or a long charge)

So, I guess what I'm asking is, "What is it precisely that resets the battery stats?"

Android is open source? Does this mean the code is readily available to look through? Where would I get started to try to figure it out myself? Is this kept in a battery library? Where's the source code for that?

Here's an example of when it reset at about 75%. enter image description here I'm running 7.1.1

  • 1
    On my Samsung devices (2 tablets and a phone), 90% charge,, something I experimented with early on, constitutes 'Full' and resets the counters. YMMV, based on your device. – wbogacz Mar 19 '18 at 22:12
1

"What is it precisely that resets the battery stats?"

Quoting from an old post by a Google engineer

....it is reset every time you unplug from power with a relatively full charge (thus why the battery usage UI data resets at that point)....

Relatively full is not defined AFAIK but from experience 90% charge does the trick of resetting it. IIRC on KitKat reboot also did that

Location of batterystats.bin file is /data/system/batterystats.bin

  • I can't point you to the code

  • Battery usage statistics in Android is poor though it has improved considerably in Oreo. Without specifying the Android version and an accompanying screenshot your question about interpretation cannot be answered fully, but here's an example. Suppose you charged fully (100%) and used only YouTube and Chrome till it dropped to 70%. In app usage of it shows YouTube used 60%, it means 60 % of the drop (=30%) is used by it. In outlet words, 60*30 =18% of battery capacity is used by YouTube. Similarly for Chrome and other apps. The total will never exactly match up. If you install GSam battery monitor, you get more meaningful interpretation

enter image description here

  • I think I have to disagree, because mine resets at numbers much lower than 90%. I've seen it reset at 8% and 20%, for example. – McKay Mar 21 '18 at 4:05
  • I've added an image of my battery screen. I'm running 7.1.1 – McKay Mar 21 '18 at 4:09
  • Well, I can't say why. I have explained the standard behaviour. Explanation of statistics interpretation is the same – beeshyams Mar 21 '18 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.