adb server startup and connection
adb start-server
//指定端口
adb -P <port> start-server
adb kill-server
- ADB Client connects to the remote terminal through the command adb connect ip
adb connect 127.0.0.1:7555
Control the phone
adb reboot
adb install app.apk
adb install -r app.apk
adb uninstall 包名
adb shell input keyevent 3
adb shell input keyevent 4
adb shell input keyevent 26
adb shell input keyevent 82
adb shell input keyevent 223
adb shell input keyevent 224
adb shell input keyevent 67
adb shell input text "text"
adb shell input tap 458 573 根据坐标点击
- Swipe
adb shell input swipe x: left to right on the screen y: from top to bottom, the upper left corner is 0 point-image coordinate system
adb shell input swipe 550 1200 550 375
adb shell input swipe 700 200 100 200
adb shell input swipe 100 200 1000 200
File processing
- Get files from your phone
adb pull /sdcard/file.log topath/
- Send the file to the phone
adb push filename /sdcard/filename
adb shell screencap -p /sdcard/screen.png
adb shell screenrecord --time-limit 10 /sdcard/demo.mp4
adb shell screenrecord --size 1280*720 /sdcard/demo.mp4
adb shell screenrecord --bit-rate 6000000 /sdcard/demo.mp4
Other supplements
adb shell svc wifi disable
adb shell svc wifi enable
adb shell settings put global airplane_mode_on 1
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true
adb shell settings put global airplane_mode_on 0
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false
Expand
- svc command
- Android busybox
- wpa_spplicant