赞
踩
主要介绍怎么抓取 bugreport 用于分析异常唤醒什么的
分析可参考:
https://github.com/google/battery-historian
测试之前手机连接usb打开usb调试开关执行以下命令
a、adb shell dumpsys batterystats --reset
b、adb shell dumpsys batterystats --enable full-wake-history
测试结束后执行下面命令输出 bugreport
adb bugreport > bugreport.txt
解析位置:需翻墙
https://bathist.ef.lc/
1)安装 Go 语言 下载:https://golang.org/doc/install 配置环境变量: GOROOT C:\Go // 安装目录 GOPATH %GOROOT%\workspace path %GOROOT%\bin // 添加到环境变量中 检查是否安装成功:cmd 执行 “go version” (2)安装 Python 下载:https://www.python.org/ 【注意仅支持 python 2.7,python3.0改变很大】 配置环境变量: path D:\Python27 // 安装目录 检查是否安装成功:cmd 执行 “python –V”【注意是大写V】 (3)安装Git 下载:https://git-scm.com/ 配置环境变量: path C:\Program Files\Git\bin 检查是否安装成功:cmd 执行 “git version” (4)安装 Java 环境 (5)下载 Battery Historian 源码并且运行 mingw64 执行“go get -d -u github.com/google/battery-historian/...”【注意最后有三个点】 cmd 运行 Battery Historian C:\Go\workspace\src\github.com\google\battery-historian>go run setup.go // 【第一次执行要下载,时间会久一些,以后就快些】 cmd 执行“go run cmd/battery-historian/battery-historian.go” 登录网址 http://localhost:9999 查看是否运行 二、使用 1、运行 Battery Historian 在上面 Building from source code 均配置成功的情况下: 进入到 “$GOPATH/src/github.com/google/battery-historian” 目录下方 cmd 执行“go run setup.go” cmd 执行“go run cmd/battery-historian/battery-historian.go” 测试之前手机连接usb打开usb调试开关执行以下命令 a、adb shell dumpsys batterystats --reset b、adb shell dumpsys batterystats --enable full-wake-history 测试结束后执行下面命令输出 bugreport adb bugreport > bugreport.txt 浏览器访问: http://localhost:9999/ 源码位置: https://github.com/google/battery-historian
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。