Battery life and autonomy have always been a major concern for smartphone users over time. These have limited autonomyAnd improving it has always been key. However, the truth is that Improving autonomy is not easy. of a smartphone. In any case, at least now we can access a large amount of data about our battery usage thanks to Google. How do I access this Google data? about our battery?
Google and battery data

Naturally, the main party interested in improve battery life On Android smartphones, it's Google, and that's why it has a tool to which we can send an error report from our Android device, which will generate a complete graph with detailed battery usage statistics We can access this data from different Android phones thanks to a tool called Battery Historian. However, obtaining it isn't exactly easy, so we're going to explain how you can do it step by step.
Furthermore, it is good to know that Battery Historian cross-references system events (CPU, wakelocks, radio, screen, syncs, jobs) along with the battery level drop to identify anomalous consumption patterns. This makes it a very valuable diagnostic tool when you notice your phone is underpowered. It uses more battery than expected..

1.- Create an error report

It's quite possible that you've encountered the option on your mobile phone at some point to send some error report You should send an error report to Google when an error occurs on your smartphone. In reality, almost no one does, because they think it won't be useful. After all, it will only be useful to Google if it's sent en masse by all users, and we'll never get a response. With a lot of luck, an update will eventually come out that fixes our smartphone's problem. With a lot of luck. However, in this case, it's necessary to send an error report to access Battery Historian, so let's see how we can send this report. To do this, you need to go to Developer OptionsIn Settings (if you don't have it enabled, go to Settings > About phone and tap Build number more than seven times). In Developer options, we'll first need to enable the option USB debugging, and once this option is activated go to Create error report, which is one of the first options.
If you have a mobile in which this option does not appear, such as a Xiaomi, you will not be able to access Battery Historian. Recommended alternativeGenerate the report from a computer with ADB using adb bugreport (you can add -z (to compress) and use that file with Historian; this way you avoid depending on the "Create report" menu on the device.
2.- Upload the error report to Battery Historian

Next, we will send this error report to Google's database so that Google can use this data in the future when... improve energy use from your smartphone. That's the actual function of Battery Historian. In our case, it will simply be to be able to use it to access that data. The Battery Historian website is an IP address, but here we will have to upload the file we downloaded by tapping on Create error reportNow click Submit, and that's it. If you run Historian locally, you can launch it with Docker and upload your bugreport without exposing data; value privacy from the file, since it contains system logs.
Pro tip: before generating the bugreportYou can reset statistics for the period you want to analyze with adb shell dumpsys batterystats --reset and, after a period of actual use, capture again. This makes it easier to detect consumption peaks and cause-and-effect associations.
3.- Analyze Battery Historian

Next, we'll find a comprehensive report showing the different energy uses of our smartphone in each category. From the use of the CPUthe kernel, etc. An advanced user will be able to find a lot of data here and will be able to determine what is happening with their phone if it is using a lot of battery recently. A black line shows us the battery percentage and how it has been declining over time. Perhaps we can find a lot of activity in a particular category and thus locate a problem that is occurring on our phone.
In the overall system view you will see, for example, that in a sudden fall they coincide CPU active, screen on and a wakelock from an app; that's the clue. If the mobile radio keeps turning on and off frequently, reduce background requests with Job Scheduler or plans synchronizations with SyncManagerIn "Tables > Device Power Estimates" you will identify the apps that contribute most to consumption.
For more details wakelocks In the report, enable the full history with: adb shell dumpsys batterystats --enable full-wake-historyThen filter by your package in "App Selection" and compare. activation blocksservices, processes, and scheduled work. If you prefer to measure in real time during controlled tests, the Android Studio Power Profiler It offers a component-by-component timeline (CPU, GPU, network, screen) that is very useful for reproducing problems.
Alternative methods for viewing health and cycles without reports
Android doesn't always show the battery health in Settings. Some brands hide it in factory menus, and in recent versions, the system displays more data. The key idea: health reflects the maximum capacity which retains the original design and degrades with the charge cycles (One cycle equals 100% of the total charge from partial charges.) Lithium batteries typically maintain good performance for several hundred cycles before showing noticeable declines. Consult a specialist if you wish to extend their lifespan.
Starting with certain modern versions, the API of BatteryManager allows apps to read health and charge cyclesApps like Batt can display them if you grant the appropriate permission (for example, with the help of Shizuku). On brands like Samsung, the Members app offers basic diagnostics. From Settings > Battery > Battery usage You'll see which apps and features are using the most resources; it's a good first filter. Also, apps like Energy Bar They can offer complementary visual indicators.
If your phone doesn't provide this feature, use reliable third-party apps. AccuBattery Estimates actual capacity (mAh), wear per charge, remaining time and consumption per app; GSam Battery Monitor breaks down consumption by CPU and sensors; Battery guru It adds temperature and level alarms; and Ampere current sample and loading rateAvoid intrusive apps and check permissions. Hush It is another option that focuses on energy saving.
You can also try the secret dialer: open Phone and dial *#*#4636#*#* to view status and temperature on some models. Not all manufacturers These codes support them. In the second-hand market, request a technical report of the device Battery status and hardware testing provide transparency to buyers and sellers.
ADB, Shizuku and LADB: direct data reading

If you have a computer, connect the phone with USB Debugging enabled and run adb shell dumpsys batteryCheck fields like state (that is valid), "charge counter" and associated capacity values. The load counter can help you estimate the current capacity with a rule proportional to the current percentage. Supplement with adb shell dumpsys batterystats to see usage history and consumer profiles.
With local access via Shizuku y LADB (without root) you can launch commands from the mobile itself: adb shell dumpsys battery, cat /sys/class/power_supply/battery/charge_full y cat /sys/class/power_supply/battery/cycle_count when they are exposed. These system files offer clues about Loading capacity y accumulated cycles on certain devices. Keep in mind that some manufacturers restrict these paths for security reasons.

Some ROMs show indicators such as "mSavedBatteryAsoc" (approximation of capacity relative to design). For greater accuracy, perform a calibration Use a controlled cycle (fully discharge and recharge to capacity, without forcing it) and avoid aggressive service codes that could alter readings. Remember that not all terminals expose cycle counters at the hardware level.
Signs of a degraded battery and recommendations

A faulty battery usually manifests itself with sudden drainageOverheating, random shutdowns with high battery percentage, package swelling, and charger dependence. If the health drops below approximately 80%It is advisable to consider replacement at a qualified technical service.
To extend its life: keep the charge between 20% and 80%Avoid extreme temperatures, use certified chargersIt reduces brightness and screen-on time, activates power saving, updates the system and your apps, and limits prolonged gaming and streaming. Don't close it manually. critical services of the system; it relies on Doze and Android's automatic power management to balance performance and energy consumption. Nighttime charging is not a problem on modern devices with battery protectionsprovided that heat does not accumulate.
If you're buying or selling a used Android device, ask for a device report with battery status and cycle count whenever possible; it's a clear way to ensure transparency about its lifespan. With these techniques you will have both an X-ray of which drains the battery at the system level (Historian/bugreport) as reads of health and cycles (API, ADB, or apps). Combining them will allow you to detect problems, correct habits, and, when the time comes, decide the best time to change the battery without losing time or performance.

