Skip to content

Android 11 and above

Note

Using Android 10 or earlier version? Follow the Android 10 guide.

On Android 11 and above, it's possible to turn on Wireless Debugging without connecting to a PC. There's a built-in option to turn on Wireless debugging (over Wi-Fi).

mDNS Service

Android has a service named mDNS (multi-cast Domain Name System) which facilitates the discovery of services on local network. adb relies on this service to discover and automatically connect to devices once they are paired.

If mDNS service is working correctly, you don't need to enter the pairing and connection ports manually, but only the pairing code. The app automatically discovers the ports using the mDNS service.

If mDNS service is not working on your device, you can try a few things:

  • Disabling the Wireless debugging (and USB debugging) force starts the mdnsd service (which cannot be done manually without root).
  • Force stopping the app recreates the mDNS broadcast listeners.

Note

Before proceeding further, please make sure that you have enabled the Developer Options.

ADB Pairing / Connecting

Enable Wireless debugging in Developer Options, and also check Disable ADB authorization timeout in order to avoid repeating the pairing steps again and again.

Wireless ADB connection port

It's a 2-step process:

  • Pairing (needs pairing port and code)
  • Connecting (needs connection port)

Pairing is an authentication mechanism somewhat like Bluetooth pairing. While connecting is similar to the legacy TCP/IP connection.

Wireless ADB connection port Wireless ADB pairing port

There are 2 options to perform the pairing and connection. Proceed with whichever you find more convenient.

Pairing Method 1: Notification

  • Connect your device to a Wi-Fi network.
  • Open the app and tap ADB Access. Under Pairing Option 1, tap "Show Notification" to start the pairing service. A notification appears.
  • Enable Wireless debugging in Developer Options.
  • Open Wireless debugging screen and tap on "Pair device with pairing code".
  • Note the (1) pairing port number, (2) pairing code, and (3) connection port number.
  • Enter the 3 parameters in the notification one by one as requested. Press Enter / Send button in the notification after entering each value.

Pairing is performed after you enter both pairing parameters. While connection is performed as soon as the connection port is entered.

Info

You won't be asked to enter the pairing and connection ports if mDNS service is working correctly.

Pairing Method 2: Split-Screen

  • Connect your device to a Wi-Fi network.
  • Open the app and tap ADB Access. Tap "Open Developer Options" button to open the same.
  • Enable Wireless debugging in Developer Options.
  • Open Wireless debugging screen and tap on "Pair device with pairing code".
  • Note the (1) pairing port number, (2) pairing code, and (3) connection port number.
  • Switch to Split-Screen to open the app and Developer Options simultaneously.
  • In the app, scroll to Pairing Option 2.
  • Enter the pairing code and port, and tap the "Pair" button. Pairing is performed.
  • After successful pairing, connection section is opened. Enter the connection port, and tap the "Connect" button. Connection is performed.

Info

You don't need to manually enter the pairing and connection ports if mDNS service is working correctly. These fields are auto-filled.

Note

You should leave the Wireless debugging or USB debugging enabled in Developer Options. Disabling the ADB will disconnect the app from ADB.

ADB depends on Wi-Fi

A problem with pairing is that you need to keep the device connected to a Wi-Fi network in order to keep the Wireless debugging enabled. But the device can disconnect from a Wi-Fi network intermittently, particularly when the screen is off. In this case the app loses the ADB connection. It can be frustrating.

There are 2 possible solutions to this problem:

  1. Also enable USB debugging along with Wireless debugging before performing pairing.
  2. Or check the option Auto switch to TCP/IP in app settings. It restarts the ADB daemon (adbd) in the legacy TCP/IP mode after every successful pairing.

    Auto switch to TCP/IP

Now, after every pairing, you can turn-off the Wireless debugging and leave the USB debugging enabled.

An additional benefit of the second approach is that even if you turn off the USB debugging, simply turn it on and the app should connect to ADB. No re-pairing is required unless you restart the device. It's because the TCP/IP settings (system property: service.adb.tcp.port) is not reset when USB debugging is disabled. See more details here.