Android Adb命令汇总
命令 | 说明 |
---|---|
adb devices | 列出设备 |
adb start-server | 开启服务 |
adb kill-server | 关闭服务 |
adb install -r myDemo.apk | 安装包到手机 |
adb uninstall com.sun.demo | 卸载apk |
adb pull sdcard/emulator/0/Android/data/com.sun.xxx/files/xxx.jpg | 把sdcard里面的一张图片pull到当前电脑目录上 |
adb push ~/User/sun/path/1.txt sdcard/..../files/log/ | 把电脑上的文件,push到手机里面 |
adb shell screencap /sdcard/screen.png | 截屏 |
adb shell screenrecord /sdcard/demo.mp4 | 录屏 |
adb shell am start -a android.intent.action.VIEW | 打开对应intent |
adb shell am start -n com.sun.app_1/.MainActivity | 打开对应Activity |
adb shell am set-debug-app -w com.sun.app_1 | 设置调试应用,-w启动等待app |
adb shell am clear-debug-app | 清除调试应用 |
adb shell pm clear com.sun.packagename | 清除数据缓存 |