What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

What exactly does "Wipe Battery Stats" do?

Jaxidian

Team FreeMyMoto
Premium Member
Developer
So we all know (or should know) that when we have a battery die and replace it, we should "recalibrate" the new one, which involves wiping battery stats and a full drain from 100% to dead, and the like. We also know that this is a useful tool when upgrading from a 1500mAh to 1900mAh battery, and the like. We even know that when we flash a new ROM that we should wipe stats so the new ROM (which will handle the battery slightly different from low-level tweaks) will be more battery-efficient.

All that said, it's very unclear to me (and some quick googling failed in helping provide additional information) as to what exactly wiping battery stats changes, and even where. The questions that I would love to have solid answers to:
  1. Where do battery stats exist? In the phone or in some memory chip in the battery itself?
  2. Are battery stats battery-dependent?
  3. If stored in the phone, where at? (Specifically wanting to know if installing a new ROM that formats /system/ will wipe them by the format or is it somewhere else?)
  4. If I have "calibrated" a 1500mAh battery and a 2000mAh battery, do I need to wipe stats when I switch back and forth between the two?
  5. If I have "calibrated" two different identical 1500mAh batteries, do I need to wipe stats when I swap back and forth between the two?

Just looking for more understanding around what's happening behind the scenes here.
 
So we all know (or should know) that when we have a battery die and replace it, we should "recalibrate" the new one, which involves wiping battery stats and a full drain from 100% to dead, and the like. We also know that this is a useful tool when upgrading from a 1500mAh to 1900mAh battery, and the like. We even know that when we flash a new ROM that we should wipe stats so the new ROM (which will handle the battery slightly different from low-level tweaks) will be more battery-efficient.

All that said, it's very unclear to me (and some quick googling failed in helping provide additional information) as to what exactly wiping battery stats changes, and even where. The questions that I would love to have solid answers to:
  1. Where do battery stats exist? In the phone or in some memory chip in the battery itself?
  2. Are battery stats battery-dependent?
  3. If stored in the phone, where at? (Specifically wanting to know if installing a new ROM that formats /system/ will wipe them by the format or is it somewhere else?)
  4. If I have "calibrated" a 1500mAh battery and a 2000mAh battery, do I need to wipe stats when I switch back and forth between the two?
  5. If I have "calibrated" two different identical 1500mAh batteries, do I need to wipe stats when I swap back and forth between the two?

Just looking for more understanding around what's happening behind the scenes here.
Man, who told you all this nonsense? None of that is true, you don't calibrate a lithium battery. That's just crazy.
 
Man, who told you all this nonsense? None of that is true, you don't calibrate a lithium battery. That's just crazy.
Yes, and no. It's not the lithium battery that you're calibrating, it's something Android-specific that you're calibrating. It's essentially software that you're calibrating to make sure it understands a battery properly. This is why I used calibrate in quotes. The memory effect that our phones' batteries have is NOT because of the lithium technology but is because of Android-specific technology. It's that technology that I'm trying to understand.
 
Last edited:
Yes, and no. It's not the lithium battery that you're calibrating, it's something Android-specific that you're calibrating. It's essentially software that you're calibrating to make sure it understands a battery properly. This is why I used calibrate in quotes. The memory effect that our phones' batteries have is NOT because of the lithium technology but is because of Android-specific technology. It's that technology that I'm trying to understand.

Oh…..I gotcha now. So you're trying to improve upon the technology of the software to extend the battery life. Interesting.

I've been of the opinion that if that could have been done it would have been done a long time ago. By Google. I really don't see too much difference in battery life between my D2 and my old Blackberry Storm, both sucked up battery like there was no tomorrow. But hey, I'm not that technical so maybe you're on to something.
 
Oh…..I gotcha now. So you're trying to improve upon the technology of the software to extend the battery life. Interesting.

I've been of the opinion that if that could have been done it would have been done a long time ago. By Google. I really don't see too much difference in battery life between my D2 and my old Blackberry Storm, both sucked up battery like there was no tomorrow. But hey, I'm not that technical so maybe you're on to something.

Well, you kinda got me. You now understand what I mean by "recalibration". This already exists in Android, by Google or the manufacturers - I'm not trying to make any improvements to it to extend battery life.

What I'm trying to do is understand the pros/cons of running with multiple batteries and charging them via external chargers. I've seen some interesting things in my experiments and I'm trying to make sense of the results. For example, I let my phone die with a 1500mAh battery in it and when I put a battery that I thought was 100% charged in, it displayed 5%. This would indicate that Android isn't really taking metrics from the batter itself but is simply just trying to predict its capacity. However, I used to do this all the time with my G1 and with it, when battery A died, putting in fully-charged Battery B showed 100% as soon as I booted up with it.

So I'm trying to learn what Android is doing, or attempting to do, with its battery stats. What stats does it keep (don't care too much about that), how does it tie stats to a specific battery (is VERY important), and how I can tell it to ignore its predictions because I really did just put in a fully-charged battery.
 
The batt stats is a file under data, and it attempts to keep a good record of your usage to accurately predict your battery use. It's good to wipe this, if you're able, every two weeks or so. This file can also get messed up if you flash a rom on a non full battery, hence why battery can be worse after flashing a new rom.

Sent from my Droid using Tapatalk
 
The batt stats is a file under data, and it attempts to keep a good record of your usage to accurately predict your battery use. It's good to wipe this, if you're able, every two weeks or so. This file can also get messed up if you flash a rom on a non full battery, hence why battery can be worse after flashing a new rom.

Sent from my Droid using Tapatalk

Tank, *where* under data do I look for the battery stats - what's it called? :)

-Mike
 
The batt stats is a file under data, and it attempts to keep a good record of your usage to accurately predict your battery use. It's good to wipe this, if you're able, every two weeks or so. This file can also get messed up if you flash a rom on a non full battery, hence why battery can be worse after flashing a new rom.

Do you know if the stats are specific to an individual battery or are they generalized for any battery that you insert?
 
The batt stats is a file under data, and it attempts to keep a good record of your usage to accurately predict your battery use. It's good to wipe this, if you're able, every two weeks or so. This file can also get messed up if you flash a rom on a non full battery, hence why battery can be worse after flashing a new rom.

Sent from my Droid using Tapatalk

Tank, *where* under data do I look for the battery stats - what's it called? :)

-Mike
It is the batterystats.bin under /data/system.
The batt stats is a file under data, and it attempts to keep a good record of your usage to accurately predict your battery use. It's good to wipe this, if you're able, every two weeks or so. This file can also get messed up if you flash a rom on a non full battery, hence why battery can be worse after flashing a new rom.

Do you know if the stats are specific to an individual battery or are they generalized for any battery that you insert?

It will be sorta specific to a battery, from what I can tell. I swap batteries semi often, so it isn't going to be totally specific, but if one is new, and the other is older, your phone might not be able to tell the difference.

Overall though, it is probably more generalized.
 
The batt stats is a file under data, and it attempts to keep a good record of your usage to accurately predict your battery use. It's good to wipe this, if you're able, every two weeks or so. This file can also get messed up if you flash a rom on a non full battery, hence why battery can be worse after flashing a new rom.

Sent from my Droid using Tapatalk

Tank, *where* under data do I look for the battery stats - what's it called? :)

-Mike
It is the batterystats.bin under /data/system.

{Snip}

Overall though, it is probably more generalized.

Thank you sir! :)

-Mike
 
The batt stats is a file under data, and it attempts to keep a good record of your usage to accurately predict your battery use. It's good to wipe this, if you're able, every two weeks or so. This file can also get messed up if you flash a rom on a non full battery, hence why battery can be worse after flashing a new rom.

Do you know if the stats are specific to an individual battery or are they generalized for any battery that you insert?

I'm under the impression that it's just a log file used by the system to try and help with the battery percentage calculations. Delete it and a new one will be started.
 
Back
Top