电量优化
2019-10-08 本文已影响0人
宾格66
来点前奏说明
当你打开这个文档的时候,你已经做好准备了,话不多说开搞。
本文以https://docs.docker.com/install/linux/docker-ee/ubuntu/#prerequisites和https://github.com/google/battery-historian
参考。
1、环境要求:
https://success.docker.com/article/compatibility-matrix
- 我的电脑
Ubuntu 18.04


2、安装程序:
- 安装浏览器插件
下载---解压---加载已解压的扩展程序---选择
https://github.com/justjavac/ReplaceGoogleCDN
- 安装docker
sudo apt-get install docker.io
- Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
- 运行docker
sudo docker run -p 9999:9999 blystad/battery-historian
3、使用:
- 重置之前状态
adb shell dumpsys batterystats --reset
- 启用完整的WakeLock报告分析
adb shell dumpsys batterystats --enable full-wake-history
注意事项
拔掉电源----使用手机两个小时以上
- 7.0及其以上设备
adb bugreport bugreport.zip
- 6.0及其以下设备
adb bugreport > bugreport.txt
- 浏览器加载上面日志
http://localhost:9999/

- 电脑能够上网,然后就显示如下图,点击Submit提交

- 然后就显示如下图
