adb 常用操作

1.安装卸载APP

adb install -r 文件名

adb uninstall 包名

2.获取包名

1.先连接上手机,使用命令 adb shell am monitor

2.打开想要获取包名的APP即可

3.查看页面名称

adb shell "dumpsys window | grep mCurrentFocus"

4.获取APP启动时间

adb shell am start -W com.android.calendar/com.android.calendar.AllInOneActivity

5.monkey测试

adb shell monkey -p 包名 -v 1000 >monkey.log

原文地址:https://www.cnblogs.com/lazy-sang/p/14331155.html