1.下载battery historian
下载地址:https://github.com/google/battery-historian
简介:go语言开发的,分析电池耗电工具,Android5.0以上
https://developer.android.com/topic/performance/power/setup-battery-historian
2.安装go语言
下载地址:https://golang.org/dl/
配置环境变量 命令行启动go 可正常启动
3.下载git
下载地址:https://git-scm.com/
4.安装battery historian
git 命令行执行
git clone https://github.com/google/battery-historian.git (将项目克隆岛本地)
cd battery-historian
go get -d -u github.com/google/battery-historian/
go run setup.go
go run cmd/battery-historian/battery-historian.go