Back to all articles
TUTORIAL
ADB Shortcut Keys Cheat Sheet
ADB commands used every day with BoxPhone
Sikrid Team2026-04-266 min read
A short reference of the ADB commands actually used with BoxPhone every day — not every command in Google's docs, but only the ones that are frequent and necessary.
Device Management
adb devices -l # list every device with model info
adb -s <SERIAL> get-state # check status
adb -s <SERIAL> reboot # reboot the device
adb -s <SERIAL> reboot recovery # reboot into recovery
adb kill-server # stop the server
adb start-server # start the server againInput — Tap, Swipe, Type
# tap the screen
adb shell input tap <X> <Y>
# swipe (X1 Y1 X2 Y2 duration_ms)
adb shell input swipe 540 1500 540 500 300
# type text (English / ASCII only)
adb shell input text "hello"
# common keyevents
adb shell input keyevent 3 # HOME
adb shell input keyevent 4 # BACK
adb shell input keyevent 26 # POWER
adb shell input keyevent 82 # MENU (unlock the screen)
adb shell input keyevent 187 # APP_SWITCH
adb shell input keyevent 24 # VOLUME_UP
adb shell input keyevent 25 # VOLUME_DOWNApp Management
# install an APK
adb install app.apk
adb install -r app.apk # reinstall, keep data
adb install -g app.apk # auto-grant permissions
# uninstall an app
adb uninstall com.example.app
# list installed apps
adb shell pm list packages
adb shell pm list packages -3 # third-party only
# open an app (shortest form)
adb shell monkey -p com.tiktok.android 1
# open a specific activity
adb shell am start -n com.tiktok.android/.MainActivity
# force stop
adb shell am force-stop com.tiktok.android
# clear data
adb shell pm clear com.tiktok.androidScreen and Screenshots
# unlock the screen
adb shell input keyevent 224 # WAKE
adb shell input keyevent 82 # MENU
# screen on/off
adb shell input keyevent 26
# screenshot
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
# screen recording (max 3 minutes)
adb shell screenrecord /sdcard/video.mp4Network & Connectivity
# enable TCP/IP mode (over USB the first time)
adb tcpip 5555
adb connect 192.168.1.42:5555
adb disconnect 192.168.1.42:5555
# show IP
adb shell ip addr show wlan0
# Wi-Fi on/off
adb shell svc wifi enable
adb shell svc wifi disable
# Airplane mode
adb shell settings put global airplane_mode_on 1
adb shell am broadcast -a android.intent.action.AIRPLANE_MODEBatch Scripts — Run on Many Devices Simultaneously
# bash loop across every device
for SERIAL in $(adb devices | awk 'NR>1 {print $1}' | grep -v '^$'); do
adb -s "$SERIAL" shell input tap 540 1200 &
done
wait
# reboot all
for SERIAL in $(adb devices | awk 'NR>1 {print $1}' | grep -v '^$'); do
adb -s "$SERIAL" reboot &
doneTips for Running Across Many Devices
- Use
&to run in parallel instead of sequentially — 10–20× faster - Keep a SERIAL list in a file — no need to call
adb deviceseach time - Set a timeout on every command — prevents the script from hanging because of one stuck device
- Log output per device — so you can debug which one failed
- Use
adb -s SERIAL wait-for-deviceright after plugging in a device
FAQ
01ADB won't type Thai characters — what do I do?+
input text only supports ASCII. Use 'adb shell am broadcast' to send an intent with an extra string, or use clipboard injection (set the clipboard, then paste).
02Tap doesn't do anything+
Check whether the screen is locked — unlock it first with keyevent 82, or enable 'Stay awake' in Developer Options.
03How do I find a button's X/Y coordinates?+
Enable Developer Options → Pointer Location, or use scrcpy with a crosshair, or 'uiautomator dump'.
04How do I run commands across many devices simultaneously?+
Use a bash loop with & for parallel execution, or write a Python script that calls subprocess for each device serial.
Continue Reading
READ MORE / INQUIRE
Ready to deploy BoxPhone? — Talk to the Sikrid team
We design and assemble BoxPhone in Thailand with a complete Automation system in a single platform. See more on TikTok @sikridphonefarmth
