时间:2021-07-01 10:21:17 帮助过:11人阅读
# adb -s emulator-5554 shell
打印日志
# adb logcat
上传一个文件
# adb push ./sina_login.png /mnt/sdcard/DCIM/Camera/sina_login.png
上传一个目录
# adb push ./emo /mnt/sdcard/DCIM/Camera/emo
下载一个文件
# adb pull /mnt/sdcard/DCIM/Camera/IMG_20121130_102210.jpg ./IMG_20121130_102210.jpg
280 KB/s (24741 bytes in 0.086s)
下载一个目录,这里不用设置递归参数-R,而且空目录没有下载下来
# adb pull /mnt/sdcard/GigaTalk ./GigaTalk
安装APK
# adb install BigramPaid.apk
1872 KB/s (30541229 bytes in 15.930s)
pkg: /data/local/tmp/BigramPaid.apk
指定安装到SD卡
# adb install -s BigramPaid.apk
2262 KB/s (30541229 bytes in 13.180s)
pkg: /sdcard/tmp/BigramPaid.apk
Success
再次安装,提示错误信息:已安装
# adb install -s BigramPaid.apk
2322 KB/s (30541229 bytes in 12.839s)
pkg: /sdcard/tmp/BigramPaid.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
View Code
重新安装,保留原有数据,允许共用包名及数字签名
# adb install -r BigramPaid.apk
2526 KB/s (30541229 bytes in 11.806s)
pkg: /data/local/tmp/BigramPaid.apk
保留数据以及缓存目录
# adb uninstall com.gigabud.bigram
重新加载/system 分区
# adb remount
remount succeeded
adb指令示例
标签: