以下是adb工具包最新Google官方版下载地址:
ADB和Fastboot for Windows
https://dl.google.com/android/repository/platform-tools-latest-windows.zip
ADB和Fastboot for Mac
https://dl.google.com/android/repository/platform-tools-latest-darwin.zip
ADB和Fastboot for Linux
https://dl.google.com/android/repository/platform-tools-latest-linux.zip
2、下载好自己需要的安装包--安装、配置环境:检查一下环境是否配置成功
3、连接前准备1、开启手机开发者模式
2、进入开发者--开启usb调试
3、检查电脑是否有识别安卓机的驱动,如果没有-需安装豌豆荚或手机助手
4、连接手机
异常情况:
offline —— 表示设备未连接成功或无响应
device —— 设备已连接
no device —— 没有设备/模拟器连接
List of devices attached 设备/模拟器未连接到 adb 或无响应
4-1、查看当前启动的安装包--找到安装包名成
adb shell ”dumpsys activity activities“
4-2、也可通过查询第三方安装包找---------------adb shell pm list packages -3
4.3 adb shell dumpsys window w |findstr \/ |findstr name=
5、使用monkey执行测试
adb shell money -p com.bgy.guanjia --throttle 400 --ignore-crashes --ignore-timeouts --ignore-security-exceptions -v -v 200 >D:\BGY\DGJ\gj.txt
>G:\APP\applog\a.txt 保存日志路径
5-1、日志分析
(1)ANR问题(程序无响应):在日志中搜索“ANR"(application no response)
(2)闪退问题:在日志中搜索"crash"
(3)异常:搜索"exception"
(4)强制退出:搜索"force closed"
找到日志里面那个地方出错,手动执行找出,或使用monkey带上相同的seed值在执行一次
adb shell money -p com.bgy.guanjia -s1645992843067 --throttle 400 --ignore-crashes --ignore-timeouts --ignore-security-exceptions -v -v 200 >D:\BGY\DGJ\gj.txt
5-2、Event percentages(事件百分比):
0:触摸事件百分比,参数--pct-touch
1:滑动事件百分比,参数--pct-motion
2:缩放事件百分比,参数--pct-pinchzoom
3:轨迹球事件百分比,参数--pct-trackball
4:屏幕旋转事件百分比,参数--pct-rotation
5:暂时不知道这个是什么
6:基本导航事件百分比,参数--pct-nav
7:主要导航事件百分比,参数--pct-majornav
8:系统事件百分比,参数--pct-syskeys
9:Activity启动事件百分比,参数--pct-appswitch
10:键盘翻转事件百分比,参数--pct-flip
11:其他事件百分比,参数--pct-anyeven
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)