Since Google made the updated SDK for Android L available on their website. I have been trying to test the new battery historian feature. The Google API overview website claims that the tool is available under sdk/tools. Unfortunately even after ensuring that I have updated the SDK completely I am unable to find the tool anywhere. Does anyone know how I can access this tool?
If you like to see the battery history data with KitKat and below devices, fork the battery-historian and then run the following:
$ adb shell dumpsys batterystats --reset
>> run some test. either manual or with espresso, or monkeyrunner ... <<
$ adb bugreport > bugreport.txt
$ ./historian.py bugreport.txt > out.html
>> open out.html with your favorite browser <<
If you generated a power consumption file with either monsoon or any other tool, you can add this file (lines of ) by passing it with the -p
parameter
Edit A better and faster way to get the bugreport is by using:
# create battery stats table
adb shell dumpsys batterystats > bugreport
# append the creation time, which is way more accurate
echo "== dumpstate: `adb shell date +'%Y-%m-%d %H:%M:%S'`" >> bugreport
It's not missing it's available at:
https://github.com/google/battery-historian
note: it currently requires the dependency, monsoon.py which is not in AOSP (yet) - but can be found here:
https://chromium.googlesource.com/experimental/chromium/src/+/master/tools/telemetry/telemetry/core/platform/power_monitor/monsoon_power_monitor.py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With