时间:2021-07-01 10:21:17 帮助过:18人阅读
| 常用命令 | 示例 | 
| adb devices | 列出设备 | 
| adb push/pull (传文件) | 1、adb -s 设备名 push 本地文件 设备上的文件 2、adb -s 设备名 pull 设备上的文件 本地文件 | 
| adb forward (端口转发) | 1、adb forward tcp:1080 tcp:1080 (将pc端1080端口的通信转发到设备端1080端口) | 
| adb start-server/kill-server | 重启server | 
| adb install/uninstall | adb install apk包名 | 
| adb shell | 1、adb -s 设备名 shell (登录到设备的命令行) | 
| adb get-seriaino | 获取设备ID和序列号serialNumber | 
| adb get-state | 查看模拟器/设施的当前状态 | 
| adb [-d|-e|-s <serialNumber>] <command> | -d 发送命令给usb连接的设备 -e 发送命令到模拟器设备 -s <serialNumber> 发送命令到指定设备 | 
| adb reboot | 重启手机 | 
| adb remount | 将system分区重新挂载为可读写分区 | 
| adb root | 以root权限重启adb服务 | 
| adb shell am | 启动应用程序 | 
| adb shell input text <string> | 向设备输入文本 | 
| adb shell input keyevent <event_code> | 发送按键事件。 event_code=1 左滑 event_code=2 右滑 event_code=3 返回home event_code=4 返回 。。。 | 
| adb shell procrank | 各进程内存使用情况 | 
| adb shell service list | 查看services信息 | 
| adb shell cat /proc/meminfo | 查看当前的内存情况 | 
| adb shell cat /proc/cpuinfo | 查看CPU信息(硬件) | 
| adb shell cat /proc/iomem | 查看IO内存分区 | 
adb 常用命令
标签:apk 挂载 常用命令 按键事件 手机 t权限 mount ber rem