Skip to content

Most visited

Recently visited


Battery Historian Charts

The Battery Historian chart graphs power-relevant events over time.

Each row shows a colored bar segment when a system component is active and thus drawing current from the battery. The chart does not show how much battery was used by the component, only that the app was active. Charts are organized by category.

Figure 1. Example of Battery Historian output.

Battery usage categories

Note: Not every chart will show every category.

Filtering batterystats output

You can gather additional information from the batterystats.txt file where you saved the output from the batterystats command.

Figure 2.Example of filtered batterystats output.

Open the file in a text editor and search for:

  1. Battery History: A time series of power-relevant events, such as screen, Wi-Fi, and app launch. These are also visible through Battery Historian.
  2. Per-PID Stats: How long each process ran.
  3. Statistics since last charge: System-wide statistics, such as cell signal levels and screen brightness. Provides an overall picture of what's happening with the device. This information is especially useful to make sure no external events are affecting your experiment.
  4. Estimated power use (mAh) by UID and peripheral: This is currently an extremely rough estimate and should not be considered experiment data.
  5. Per-app mobile ms per packet: Radio-awake-time divided by packets sent. An efficient app will transfer all its traffic in batches, so the lower this number the better.
  6. All partial wake locks: All app-held wakelocks, by aggregate duration and count.
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields


Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)