1

The biggest battery usage culprits on my phone, according to both the battery settings page and to GSam Battery Monitor, are always "Android System" and "Android OS." I also have "Watchdog" installed, which keeps warning me that "Android System" is using a lot of background CPU.

GSam explains helpfully that "Android System" includes the packages "Input Devices," "Key Chain," "Settings," "LocationServices," among others, and the processes "servicemanager" and "audiod" among others, but it doesn't break down the battery usage of each piece.

Is there any way to see battery or CPU usage info for each package/process separately, so I can figure out which specific component of "Android System" is burning my battery? It's hard to troubleshoot when I don't have detailed info about what's wrong.

1

dumpsys batterystats (or dumpsys batteryinfo pre-Lollipop) should give you the information you are looking for, broken down by process/package. The machine-readable format (--checkin flag) will show specific UIDs if you need them.

You will probably need root to run that command in a terminal on your device, but it should also work from adb shell.

  • How can I use this? dumpsys batterystats (run with adb since I don't have root) gives a LOT of information, but I'm not sure it includes what I need. It shows wake time per PID, but that's not really useful since PIDs change, and wake time isn't the same as battery usage. The only part of the output that estimates power use in mAh breaks it down by Uid, which seem to map to packages, but I can't find a way to map Uids to packages. – Josh Aug 11 '15 at 20:19
  • @Josh Running it with the flag --checkin will output a computer-readable format that stats with a map of UIDs to package names. You can see the format here: source.android.com/devices/tech/power/batterystats.html – Matthew Read Aug 12 '15 at 13:09

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.