Install Battery Historian

 

1. 

$ sudo apt-get update

$ sudo apt-get install \
    linux-image-extra-$(uname -r) \
    linux-image-extra-virtual

 

2.

Download Docker

Go to https://apt.dockerproject.org/repo/pool/main/d/docker-engine/ and download the .deb file for the Docker version you want to install and for your version of Ubuntu.

I downloaded   docker-engine_17.04.0~ce-0~ubuntu-trusty_amd64.deb

 

3.

Install Docker

$ sudo dpkg -i /path/to/package.deb    // your downloaded deb file

 

4.

Verify that docker is installed correctly by running the hello-world image.

$ sudo docker run hello-world

 

5.

Start Docker

Run the Battery Historian image. Choose a port number and replace <port> with that number in the commands below:

$ sudo docker run -p <port>:9999 gcr.io/android-battery-historian:2.1 --port 9999

I use below command

$ sudo docker run -p 9999:9999 gcr.io/android-battery-historian:2.1 --port 9999

 

 6.

open a browser

http://localhost:<port>

I use

http://localhost:9999

 

若您不想要這麼麻煩,執行安裝這麼多步驟,

那您應該適合以下這個網站,online battery historian

https://bathist.ef.lc

 

使用:

如何將手機的 bugreport 拿出來呢?

          測試前:

                  先重置一下battery信息.
adb shell dumpsys batterystats --reset
adb shell dumpsys batterystats --enable full-wake-history

 

測試後

adb bugreport > bugreport.txt 

 adb bugreport > bugreport.zip

 

reference :

https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404

posted @ 2017-04-24 15:55  wangchangruei  阅读(744)  评论(0)    收藏  举报