Back to all articles
TUTORIAL

ADB Shortcut Keys Cheat Sheet

Sikrid Team avatarSikrid TeamSikrid Engineering Team

ADB commands we actually use every day with BoxPhone

2026-04-266 min read
A quick reference of the ADB (ADB is Android's "talk to your phone from the computer" tool) commands we actually use with BoxPhone every day. Not every command in Google's docs — just the ones we reach for over and over.

Talking to the Device

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 again

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_DOWN

Managing Apps

# 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.android

Screen & Screenshot

# 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.mp4

Network & Connectivity

# enable TCP/IP mode (do this 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_MODE

Batch — Run on Many Devices at Once

# 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 &
done

Tips When You Have Lots of Devices

  • Put & at the end to run in parallel instead of one-by-one — 10-20× faster
  • Keep your SERIAL list in a file — no need to run adb devices every time
  • Always set a timeout on each command — stops the whole script from hanging because of one stuck device
  • Log output per device — when something fails you actually know which one
  • After plugging a device in, use adb -s SERIAL wait-for-device before sending commands

FAQ

01ADB won't type Thai characters — what do I do?+

'input text' only does ASCII. The workaround is either send an intent with 'adb shell am broadcast' carrying the text as an extra, or do clipboard injection — set the clipboard, then paste.

02Tap doesn't do anything+

First check if the screen is locked — unlock with keyevent 82, or turn on 'Stay awake' in Developer Options so it doesn't sleep on you.

03How do I find a button's X/Y coordinates?+

Turn on Developer Options → Pointer Location, or use scrcpy with a crosshair overlay, or run 'uiautomator dump' to see the UI tree.

04How do I run commands on many devices at once?+

Bash loop with & at the end (parallel), or a Python script calling subprocess once per serial. Don't run them one by one if you have more than 5 devices.

Read Next

Related Articles

All articles →
READ MORE / INQUIRE

Ready to deploy BoxPhone? — Talk to the Sikrid team

We design and assemble BoxPhone in Thailand with a complete Enterprise Device Management system in a single platform. See more on TikTok @sikridphonefarmth