Android L battery historian.par tool missing

让人想犯罪 __ 提交于 2019-12-23 10:49:24

问题


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?


回答1:


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




回答2:


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


来源:https://stackoverflow.com/questions/24500834/android-l-battery-historian-par-tool-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!