ADB via Wireless Debugging

Como conectar um dispositivo Android ao ADB via Wireless Debugging nativo. Disponível a partir do Android 11. Não requer USB em nenhum momento.

The Android Debug Bridge (ADB) is a command-line tool from Google that allows direct communication between a computer and an Android device. Wireless Debugging is a native feature introduced in Android 11 that allows wireless ADB connections directly from the device's settings, with no need to start over USB. It's the most modern and practical method for Players without an accessible USB port or that operate entirely wirelessly.


Prerequisites


Steps

  1. On the device, go to Settings > Developer Options > Wireless Debugging and enable it.
  2. Inside the Wireless Debugging screen, tap "Pair device with code". The device will display:
    • An IP address and pairing port (e.g. 192.168.1.100:37001)
    • A 6-digit pairing code (e.g. 123456)
  3. On the computer, run the pairing command with the IP and port shown on the screen:
    adb pair 192.168.1.100:37001
    # Enter the code when prompted: 123456
  4. After pairing, go back to the Wireless Debugging screen and note the connection IP and port shown — this port is different from the pairing port (e.g. 192.168.1.100:42389).
  5. Connect to the device using this connection port:
    adb connect 192.168.1.100:42389
  6. Confirm the connection:
    adb devices

Notes:

  • The connection port changes with every Wireless Debugging session — always check the current port on the device when reconnecting.
  • Pairing (adb pair) only needs to be done once per computer; subsequent reconnections only need adb connect with the current port.
 

Troubleshooting

  • Device doesn't appear in adb devices after adb connect — The connection port may have changed; check the current IP and port in Developer Options > Wireless Debugging and run adb connect again with the current values.
  • adb pair returns an authentication error — The pairing code expired; generate a new one via "Pair device with code" and try again. The code is single-use and expires within a few minutes.
  • Wireless Debugging option doesn't appear in Developer Options — Check the Android version in Settings > About device; this feature requires Android 11 or newer. If the device runs Android 10 or earlier, use ADB via Wi-Fi instead.
  • ADB is not recognized as a command in the terminal — Download Android Platform Tools and extract it to an easily accessible folder. Add the folder path to the OS PATH: macOS/Linux — add export PATH=$PATH:/path/to/platform-tools to ~/.bashrc or ~/.zshrc. Windows — add it via Control Panel > System > Environment Variables. Restart the terminal and confirm with adb version.