last_updated: 2026-04-15

adb#

Either install Android Studio, or platform-tools to get a standalone adb executable.

Enable USB debugging on your mobile phone:

  • settings > info > version > tap build 7x

  • settings > dev > enable USB debug

Verify adb key:

adb pubkey ~/.android/adbkey | awk '{print $1}' | openssl base64 -A -a -d | openssl md5 -c | awk '{ print $2 }' | tr a-z A-Z

adb wifi#

WiFi (mobile phone’s host name is sx)

# attach cable
adb devices
adb tcpip 5555
# detach cable
adb connect sx:5555
adb devices

adb forward#

adb forward tcp:9222 localabstract:chrome_devtools_remote
adb forward --list
adb forward --remove tcp:9222

adb devices#

List devices, set device to act on:

adb devices
export ANDROID_SERIAL=R3CMB01P2HD
export ANDROID_SERIAL=sx:5555