查看安装的所有apk包名
adb shell pm list packages
查看当前界面的app的包名
adb shell dumpsys window windows | findstr mFocusedApp
adb 启动设置界面
adb shell am start com.android.settings/com.android.settings.Settings
关闭设置界面
adb shell am close com.android.settings/com.android.settings.Settings
回退事件
adb shell input keyevent BACK
返回home界面
adb shell input keyevent HOME
启动应用
adb shell am start 应用包名/应用入口界面全路径
关闭相应的应用
adb shell am force-stop 应用包名
获取应用的安装路径
adb shell pm path 应用包名
获取android系统版本
adb shell getprop ro.build.version.release
获取android系统api版本:
adb shell getprop ro.build.version.sdk
监控性能
adb shell COLUMNS=512 top -d 3 -m 5 -s 8
查看进程内存占用情况
adb shell dumpsys meminfo
安装到system目录下应用的卸载流程
1)通过命令:adb shell pm list packages -s 列出的应用包列表中找到要删除的包名
2)获取此要卸载的包名的地址:adb shell pm path com.xx.xx
3)挂载系统读写权限:adb remount
4)删除包:adb shell rm /system/app/xxxxxx/xxxxxx.apk
5)最后adb reboot重启即可