• adb devices 显示当前运行的全部android设备
    • adb -s 设备编号 指定命令 对某一设备执行命令
    • adb install -r 应用程序.apk 安装应用程序,-r 表示replace 覆盖安装
    • adb uninstall 主包名 卸载应用程序
    • adb pull 下载文件
    • adb push 上传文件
    • adb shell 进入shell模式
    • adb shell am start -n 主包名/.主类名 启动应用程序
      • -W 启动时间
    • adb shell am force-stop 主包名 强制停止应用程序
    • aapt dump badging 应用程序.apk 查看应用程序的主包名和主类名
    • adb shell ps | finstr 主包名 查看应用程序的启动状态
    • adb shell screencap -p /sdcard/screen.png 截图
    • adb shell pm list package 列出所有的应用程序的包名
      • -3 第三方安装的应用程序
    • adb shell input text 在设备的焦点位置发送文本内容,不能发送中文
    • adb shell input keyevent 模拟按键发送一个键盘事件
    • adb shell input tap X Y 在设备的坐标位置发送一个触摸事件
    • adb shell input swipe X1 Y1 X2 Y2 持续时间 模拟滑动操作,整个过程持续多少秒
    • adb shell dumpsys cpuinfo 查看应用程序消耗的CPU资源
    • adb shell dumpsys meminfo 查看应用程序消耗的内存资源
    • adb shell dumpsys battery 查看应用程序消耗的电量资源
    • adb shell dumpsys activity | grep mFocused Activity 查找应用程序的主包名和主类名