Http://hukai.me/android-performance-battery/can refer to this article first
1$ adb shell Dumpsys batterystats > Xxx.txt//Get power consumption information for the entire device $ adb shell Dumpsys batterystats > COM.PACKAGE.N Ame > Xxx.txt//Get battery consumption information for the specified app
2 Installing Python setting environment variables
3python historian.py xxx.txt > xxx.html
Get the generated xxx.html
Open it and look like this.
Visualizer disabled. If you see this message, download the HTML then open it
This sentence causes the chart to not appear
Open a source file with Notepad
First few lines found
<script type= "Text/javascript" src= "https://www.google.com/jsapi?autoload={' modules ': [{' Name ': ' Visualization ', ' version ': ' 1 ', ' packages ': [' Timeline ']}]}"></script><script src=" https:// Ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js "></script>
I know that this path is a domestic wall, so it's been loaded and then it can't be displayed.
And then... Of course it's FQ. Recommend a VPN agent soon Http://honx.in/i/U0etuoKo1w28DR7D#two name is called Red Apricot listen to the name you know ...
And then you open the HTML file.
The first picture should look like this.
Using Battery Historian (Android 5.0)