发布时间:2020-11-06 12:36:46
查看当前界面Activity的方法:
1)运行命令:adb shell dumpsys window | findstr "mCurrentFocus"
mCurrentFocus=Window{227cb04 u0 com.oppo.music/com.oppo.music.MainListActivity}
从结果中可知:
当前应用包名:com.oppo.music
当前界面Activity:com.oppo.music.MainListActivity
2)查看应用的PID
adb shell ps | findstr “com.oppo.music”,找到PID对应的列
6、adb脚本录屏方法(不一定有用,有的机器无该命令或–bugreport选项,且需要android API21+)
测试方法:
1)adb shell screenrecord –bugreport /sdcard/test.mp4
2)使用QuickTime分析视频即可,同方法1
备注:查看是否支持-bugreport选项
使用 adb shell screencap –help查看是否支持—bugreport选项
7、各种方法测试数据比较
欢迎分享转载 →启动时间 Android App启动时间测试方法总结