自己工作中经常要用一些Android的adb命令,把常用的adb命令记录一下,留作备忘。
adb devices
查看当前连接的设备
adb install 安装
adb install拖动apk到命令行界面,回车
adb uninstall 卸载
adb uninstall apk的包名,比如adb uninstall com.cn.Pvr_UnitySDK
adb push 把文件放到某个路径
adb push E:downloadpsmvrapi_config.txt /sdcard/psmart/phoenix/psmvrapi_config.txt
用E:downloadpsmvrapi_config.txt覆盖手机里sdcard/psmart/phoenix/psmvrapi_config.txt文件
adb push E:downloadARDistortionValue.txt /sdcard/ARDistortionValue.txt
adb pull 把文件保存到电脑路径
adb pull sdcard/Android/data/com.Company.Antix5238/files D:/SavePath
把sdcard/Android/data/com.Company.Antix5238/files路径下的所有文件保存到D:/SavePath
adb logcat >E:log.txt 抓取log到E:log.txt目录,按Ctrl+C结束抓取
adb shell 先进入shell
logcat 可查看实时log
logcat | grep -i Unityaa 过滤所有log,只看包含Unityaa的log