pra*_*das 5 android android-5.0-lollipop
由于Google在其网站上提供了更新的Android L SDK.我一直在尝试测试新的电池历史记录功能.Google API概述网站声称该工具可在sdk/tools下使用.不幸的是,即使确保我已经完全更新了SDK,我也无法在任何地方找到该工具.有谁知道我如何访问这个工具?
如果您希望使用KitKat及以下设备查看电池历史数据,请分叉电池历史记录,然后运行以下命令:
$ 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 <<
Run Code Online (Sandbox Code Playgroud)
如果使用季风或任何其他工具生成功耗文件,则可以通过使用-p参数传递该文件(行)来添加
编辑 更好,更快的方法来获取bug报告是通过使用:
# 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
Run Code Online (Sandbox Code Playgroud)
它并没有丢失,它可以在以下位置获得:
https://github.com/google/battery-historian
注意:它当前需要依赖项 monsoon.py,该依赖项尚未包含在 AOSP 中 - 但可以在此处找到:
| 归档时间: |
|
| 查看次数: |
3061 次 |
| 最近记录: |