Android devices are packed with background services, apps, and hardware components that constantly draw power. When a phone’s battery life suddenly drops, the usual suspects are rogue apps, misbehaving system services, or hardware issues. Battery Historian is a Google‑provided tool that parses the bugreport generated by the Android Debug Bridge (ADB) and visualises power‑related events on an interactive timeline.
Unlike the generic Battery Usage screen in Settings, Battery Historian shows you:
Armed with this data you can identify the real culprits and take targeted actions, rather than guessing or resetting everything.
platform-tools folder to your system PATH.The bugreport contains a snapshot of system logs, battery stats, and many other diagnostics. For battery analysis you need a bugreport that spans several hours of typical usage.
adb devices
You should see your device’s serial number listed as device. If it shows unauthorized, confirm the RSA prompt on the phone.
adb bugreport bugreport.zip
This command tells the device to gather logs for about 30 seconds and then compress them into bugreport.zip. For a more thorough analysis you want a longer capture. Use the --stream option and let it run while you use the phone normally:
adb bugreport --stream bugreport.zip
Leave the phone on for at least 2‑4 hours, performing typical actions (checking mail, browsing, playing music, etc.). When you feel the period is sufficient, stop the command with Ctrl+C. The resulting bugreport.zip will contain a bugreport.txt file that Battery Historian can read.
Battery Historian is distributed as a single JAR file. Follow these steps:
battery-historian-*.jar file.C:\tools\battery-historian or ~/battery-historian.java -jar battery-historian-*.jar
The tool starts an embedded Jetty server, usually listening on http://localhost:9999. No further installation is required.
Open your web browser and navigate to http://localhost:9999. You will see a simple upload form.
bugreport.txt (or the whole bugreport.zip – the tool extracts the text automatically).The interface consists of several panels:
Battery Historian does not give you a single “problem” line; you need to look for patterns.
In the Wake‑locks panel, each bar represents a lock held by an app or system service. Hover over a bar to see details such as:
com.google.android.gms).Partial WakeLock).Long durations (several minutes or more) are red flags. Note the package name; you will address it later.
The CPU graph shows when cores were active. If you see many short spikes that line up with a particular app’s activity, that app may be performing background work too often.
Sometimes the battery drain is simply due to high screen brightness or long screen‑on sessions. The Battery level line combined with the Screen bars helps you see if the drop coincides with heavy usage.
Excessive Wi‑Fi or cellular activity can be a drain. The Network panel shows data bursts; if they happen while the screen is off, an app may be syncing in the background.
Once you have identified the main offenders, you can apply targeted fixes:
After making changes, repeat the capture process for another few hours to verify the impact. A noticeable flattening of the battery‑level curve indicates improvement.
adb shell dumpsys batterystats for a textual summary if you prefer the command line. The output can be fed to Battery Historian with --format=html flag.adb bugreport nightly and stores the file with a timestamp. This helps you track long‑term trends.adb logcat – if a particular wake‑lock is suspicious, capture logs around the same time to see error messages or stack traces.Battery Historian works on Android 5.0 (Lollipop) and newer because older versions lack the detailed batterystats data. The tool itself is read‑only; it does not modify the device, so there’s no risk of bricking.
However, enabling USB debugging and pulling bugreports does expose internal logs that may contain personal data (e.g., Wi‑Fi SSIDs, notification contents). Treat the bugreport files as sensitive and delete them after analysis if you share the device.
On devices with encrypted storage, the bugreport may not include certain secure data, but the battery‑related information is still available.
Battery Historian transforms a raw bugreport into a visual story of how your Android device consumes power. By following the steps above you can capture a bugreport, run the tool, pinpoint wake‑locks, CPU spikes, and network activity, and then take concrete actions to reclaim lost battery life. The process is repeatable, requires only free tools, and gives you a level of insight that the standard Settings screen cannot provide.
Regularly checking your battery health with Historian, especially after installing new apps or system updates, will help you stay ahead of power‑draining issues and keep your phone lasting through the day.









