adb install -r xxx.apk //覆蓋安裝,保留數據和緩存文件 adb install -s xxx.apk //安裝apk到sd卡 adb install -f xxx.apk //安裝apk到內部系統內存 adb install -d xxx.apk //安裝低版本Apk adb install -g xxx.apk //准許Apk manifest中的全部權限
adb shell pm get-install-location
adb uninstall <package> adb uninstall -k <package> //卸載app但保留數據和緩存文件
adb reboot
adb start-server
adb kill-server
adb shell
adb devices
adb shell cat /proc/cpuinfo
adb shell cat /proc/meminfo
adb shell df
adb shell getprop ro.build.version.release
adb shell cat /sys/class/net/wlan0/address
adb shell cat /data/misc/wifi/*.conf
adb shell pm clear <package>
adb shell pm path <package>
adb shell pm list packages -f
adb shell pm list packages google
adb shell pm list packages -3
adb shell am start -n packagename/packagename.activityname 如:adb shell am start -n com.company.appname/ .SplashActivity -es url http://www.baidu.com //-es表示需傳遞參數,其中url表示參數名,連接表示具體參數值
adb shell am start -a android.intent.action.CALL -d tel:10086
adb shell am start -a android.intent.action.VIEW -d http://www.baidu.com
adb shell ps | grep xxx
adb shell ps -x [pid]
adb shell vmstat
adb shell procrank
adb shell kill [pid]
adb shell service list
adb shell dumpsys -l
adb shell dumpsys package adb shell dumpsys package packages | grep <package> //查看某個app資源路徑
adb shell dumpsys meminfo | grep xxx adb shell dumpsys meminfo <pid> // 輸出指定pid的內存使用狀況 adb shell dumpsys meminfo --package <package> // 輸出指定包名內存使用狀況 adb shell top -m 6 //查看內存佔用前6的app
adb shell dumpsys activity top
adb shell dumpsys gfxinfo <package> > /sdcard/fps.txt 取出文件:adb pull /sdcard/fps.txt /Users/admin/Downloads/1234.txt
adb shell dumpsys activity
adb shell dumpsys procstats
adb shell mv path/file newpath/file
adb shell mkdir path
adb shell touch filename
adb shell rename path/filename newpath/newfilename
adb shell cat file
adb pull /data/anr/traces.txt /Users/admin/Downloads/1234.txt
adb push foo.txt /sdcard/foo.txt
adb logcat | grep xxx
adb logcat -d > ~/Desktop/logcat.txt //保存到桌面,須要android.permission.READ_LOGS
adb logcat -c
adb connect <device-ip-address>
adb shell monkey -v -p <package> 500 // 跑500次
adb shell /system/bin/screencap -p /sdcard/screenshot.png adb pull /sdcard/screenshot.png ./Dowload/screenshot.png(保存到電腦)
adb shell screenrecord --time-limit 30 /sdcard/demo.mp4 adb pull /sdcard/demo.mp4 ./Downloads/
Gityuan指令系列android
adb基本命令shell
Android視頻錄製命令screenrecordsegmentfault