adb (Android Debug Bridge) Android device control
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
adb devices -ladb install <apk>
adb shelladb logcatadb push <local> <remote>
adb pull <remote> <local>
adb pair <ip>:<port>
adb kill-serverConcepts
- adb client your command
- adb server on the host
- adbd on the device
Devices & server
adb devices -ladb -s <serial> <command>
adb -d <command>
adb kill-serveradb start-server
adb versionadb wait-for-device
Wireless
adb pair <ip>:<port>
adb connect <ip>:<port>
adb disconnect <ip>:<port>
adb tcpip 5555Apps
adb install <apk>
adb install -r <apk>
adb install -g <apk>
adb uninstall <package>
adb shell pm list packages
adb shell pm list packages -3
adb shell pm clear <package>
adb shell pm grant <package> <permission>
Activity manager
adb shell am start -n
<package>/<activity>
adb shell am start -a android.intent.action.VIEW -d
<uri>
adb shell am force-stop <package>
Files & shell
adb shelladb shell <command>
adb push <local> <remote>
adb pull <remote> [<local>]
adb exec-out <command> > <file>
Logs & debugging
adb logcatadb logcat -cadb logcat -dadb logcat -s <tag>
adb logcat <tag>:<level> *:S
adb logcat -e <regex>
adb logcat -v time
adb bugreport [<path>]
adb shell dumpsys <service>
Screen & input
adb exec-out screencap -p > <file>.png
adb shell screenrecord /sdcard/<file>.mp4
adb shell input text <text>
adb shell input keyevent <code>
Ports & power
adb forward tcp:<host> tcp:<device>
adb reverse tcp:<device> tcp:<host>
adb rebootadb reboot bootloader
Recipes
# phone: Wireless debugging onadb pair 192.168.1.20:37099adb connect 192.168.1.20:41235adb devices -l
adb uninstall com.example.appadb install -g app-debug.apkadb logcat -cadb shell am start -n com.example.app/.MainActivityadb logcat --pid=$(adb shell pidof com.example.app)
adb reverse tcp:8080 tcp:8080# on the device, http://localhost:8080 now hits your host



