Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android L battery historian.par tool missing

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?

like image 986
docpkd Avatar asked Jul 01 '14 00:07

docpkd


2 Answers

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
like image 112
joecks Avatar answered Sep 28 '22 09:09

joecks


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

like image 42
dljava Avatar answered Sep 28 '22 09:09

dljava