1.Debug
adb devices
adb start-server
adb kill-server
adb shell am start 包名/完整Activity路径
adb shell am broadcast -a "broadcastactionfilter"
2.包(package)
adb shell pm list packages
adb shell dumpsys window windows | findstr mFocusedApp
adb shell dumpsys activity activities | grep LAUNCHER
adb shell pm path 包名
adb shell pm clear 包名
3.安装和卸载APP
adb install 包名
adb install-multiple test.apk 包名
adb install -r 包名
adb uninstall test.apk
adb uninstall -k test.apk
4.截图和录屏
adb shell screencap -p /sdcard/1.png
adb pull /sdcard/1.png ./1.png
adb shell screenrecord /sdcard/1.mp4
adb shell screenrecord --size 1280x720 /sdcard/1.mp4
adb shell screenrecord --bit-rate 4000000 /sdcard/1.mp4
adb shell screenrecord --time-limit=120 /sdcard/1.mp4
5.文件管理
adb pull /sdcard/1.png ./1.png
adb pull -a /sdcard/1.png ./1.png
adb push 2.png /sdcard/2.png
adb shell ls /sdcard/
adb shell ls /sdcard/ -a
adb shell ls -R /sdcard/
adb shell cd /sdcard/
adb shell touch /sdcard/1.txt
adb shell rm /sdcard/1.txt
adb shell rm -f /sdcard/1.txt
adb shell rm -i /sdcard/1.txt
adb shell rm -rR /sdcard/test_dir/
adb shell cp /sdcard/1.txt /sdcard/2.txt
adb shell mv /sdcard/1.txt /sdcard/2.txt
adb shell mkdir /sdcard/test
adb shell mkdir -m 777 /sdcard/test
adb shell mkdir -p /sdcard/test/temp/my_dir
6.网络状态
adb shell netstat -r
adb shell netstat -a
adb shell netstat -l
adb shell netstat -t
adb shell netstat -u
adb shell netstat -x
adb shell netstat -w
adb shell netstat -e
adb shell netstat -n
adb shell netstat -p
adb shell ping www.baidu.com
adb shell ifconfig
7.打印日志
adb logcat *:级别
adb logcat *:D
8.查看进程
adb shell ps
adb shell ps -A
adb shell ps -p 1234
adb shell ps -t
adb shell top