Skip to content

Instantly share code, notes, and snippets.

@datvm
Last active December 27, 2022 04:18
Show Gist options
  • Save datvm/10edd5ad70f35f946dfd075f48940fc8 to your computer and use it in GitHub Desktop.
Save datvm/10edd5ad70f35f946dfd075f48940fc8 to your computer and use it in GitHub Desktop.
Commands for connecting to Android phone over Wifi (Wireless Debugging) with ADB

Setup the Phone

To enable developer options, tap the Build Number option 7 times. You can find this option in one of the following locations, depending on your Android version:

Android 9 (API level 28) and higher: Settings > About Phone > Build Number

  • Enable Wireless Debugging: Settings > search Wireless Debugging.

image

  • Pick Pair device with pairing code option.

Pair and Connect with ADB

  • Run adb pair <ip>:<port> <pairing code> (showed in the Pair with device dialog shown after picking above option). For example:
adb pair 192.168.1.123:41000 123456
  • Run adb connect <ip>:<port>.

Note:
The port for pairing and connecting may be different. The port for connecting is listed at IP address & Port in Wireless Debugging panel (see above screenshot, first red square)

adb connect 192.168.1.123:41001

Confirm that it works by running adb devices:

List of devices attached
192.168.1.123:41001       device
adb-random-text._adb-tls-connect._tcp.        device
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment