At some point, I mentioned an app that I swear by, BetterBatteryStats, by chamomix.
So, DoomLord encouraged me to start this thread to provide info about how to effectively use this app to accurately locate causes of battery drain issue.
This is very important for users who want to evaluate kernels' performance on that department, but it doesn't stop there.
You can use this app to see if any application you installed is acting up and keeping your phone awake, for example.
Before proceeding with this guide, I have to mention that BetterBatteryStats is given away for FREE for all XDA users (do not redistribute though) and there is also a paid version on the Market for people who wish to support the developer. I bought this app and I am sure that if you read this guide, by the end, you are going to want to do the same! Thanks chamomix!
Download the app from this post for free, or buy it from the Market.
So, what is all these???
Don't panic! First, let's set it up in a way that it'll make things less complicated.
Launch the app and hit the Menu button, then select Preferences.
Make sure Filter stats is checked.
Hide time since stat begin should be unchecked.
Hide graph bars also unchecked.
Default stat: It can be anything. This is what you will first see when you launch the app. I have set it to Other, so I can take a quick glance at how long the phone was asleep and how long the screen was on everytime I open the app.
Default stat type: Better set it to Since charged. Again, this is just what you will see first. You can navigate through all the other stat and display times later.
Wakelock pct of: Choose % of time awake minus time with screen on. This is VERY important. When a developer asks for reports on wakelocks, all users should use the same option, otherwise the stats vary and thus can be misleading and not helpful.
All the other settings are unimportant, tune them as you wish.
Now you have all the info you need about where did your battery go right there in front of you! I am going to help you interpret it.
We will use my phone usage as an example.
This is what I see when I launch the app:
So, my battery is at 97%, it was charged to 100% 21 minutes ago, it was awake for 20 minutes and the screen was on for 8 minutes.
That means that my phone was not sleeping even thought the screen was off for (20 - 8 =) 12 minutes.
Let's press the first dropdown menu and select Partial Wakelocks to figure it out.
Here's what I see:
Browser takes the first place with 2 minutes wakelock, then my Gmail sync with 1 minute and the rest with a lot less.
So, yeah, I left my browser on loading a webpage and the screen switched off.
Up to this point, we got a good idea of what app or process may be a battery drainer.
Moving on, we will investigate more advanced aspects of battery drain, useful for kernel testing and not only.
Is that all???
Oh no, hardly. You can see much more with this app.
Let's select Process from the first dropdown menu to see which processes used CPU power and when.
Here's what I see:
Notice how the bars can have 2 different colors.
Blue part of the bar means that the app/process used CPU power while the screen was on.
Red part of the bar means that the app/process used CPU power while the screen was off.
akmd8975 is the G-sensor (wherever you see akmd means the G-sensor), so for some reason it's using more processing power than it should. I am currently testing a new kernel, so I must inform the creator about it because this is the first time I see this in my stats.
(And that, my friends, is an example of how you should use all these for the general good. )
mediaserver is the process that imports all your media files to the gallery, usually it shows high usage after reboot, but after a while, it fades out (because there's a check for new media files upon every boot).
Now let's choose Kernel Wakelocks from the dropdown menu to see even more.
This is something you should leave to the kernel developer to interpret.
Most of these things are gibberish for us average users but can be VERY helpful to devs.
(I can safely say that the 3 first entries are related to charging and they only appear while you are charging the phone and shortly after. No need to get into deeper.)
Now let's take a look into the Alarms.
What are Alarms?
In layman's terms, Alarms in the Android system are those intents that wake up the phone in intervals or at a specific time. I am sure you can think of many apps that do that. Let's see which apps do that on my phone.
Hit Menu -> More -> Alarms
com.google.android.gsf is Google Apps Framework (your Gmail account, and related syncs and services).
android is the Android System itself which seems to be waking up my phone way too often (104 times in 20 minutes ). One more thing I should discuss with the kernel developer.
I get it now! How can I gather all this info into one place?
By hitting menu button, selecting More -> Dump to File.
It will create a txt file on /sdcard named BetterBatteryStats-xxxx-xx-xx-xxxxxxx.txt (where the xxxxx indicate the date and time).
And the file will look somewhat like this when opened:
So, be it an app, a kernel or a ROM you are testing, you need this app!!!
As a co-creator of TEAM ROM for the X10, I have to tell you, I love all our users for their support, but sometimes I just want to scream when I see a post like this:
my battery drains fast why???
I CAN'T POSSIBLY KNOW WHY. It could be SO many things.
That's where BetterBatteryStats comes to the rescue!
Use it! You will help yourself and your beloved developers beyond words!
If you feel all this is "too complicated" for you and you don't want to bother, please consider how many complicated things developers are doing for you for free. You owe them at least decent reports. Am I right or am I right?
PS: If you liked this guide, don't forget to check another one about How to Report Force Closes in an App or ROM by PvyParts.