文档: Android 调试桥 (adb) | Android 开发者 | Android Developers
-
连接设备
adb connect ip -
查看链接的设备
adb devices -l -
发送命令
adb [-s diviceName] install helloWorld.apk # 连接多个设备时需要指定设备名字 adb install helloWorld.apk -
复制文件
adb pull remote local # 从设备复制到本地 adb push local remote # 从本地上传到设备 # 比如 adb push foo.txt /sdcard/foo.txt -
发送shell命令
adb [-d |-e | -s serial_number] shell shell_command # 连接多个设备时需要指定设备名字 # 如 adb shell ls /system/bin -
执行交互式shell
adb [-d | -e | -s serial_number] shell # 连接多个设备时需要指定设备名字 adb shell