如何查看Android应用使用的电量

http://androidren.com/index.php?qa=326&qa_1=%E5%A6%82%E4%BD%95%E6%9F%A5%E7%9C%8Bandroid%E5%BA%94%E7%94%A8%E4%BD%BF%E7%94%A8%E7%9A%84%E7%94%B5%E9%87%8F


简单的来说就是在电脑终端上输入下面的命令:

https://github.com/google/battery-historian

> adb kill-server

> adb devices

> adb shell dumpsys batterystats --reset

<disconnect and play with app>...<reconnect>

> adb devices

>adb shell dumpsys batterystats > batterystats.txt

> python historian.py batterystats.txt > batterystats.html

 

详细的信息可以参考下面链接:

http://developer.android.com/tools/performance/batterystats-battery-historian/index.html

https://source.android.com/devices/tech/power/batterystats.html

http://developer.android.com/tools/performance/systrace/index.html



你可能感兴趣的:(如何查看Android应用使用的电量)