ADB

Wireless ADB: How to Connect Android Over Wi-Fi

Use ADB over Wi-Fi: Wireless debugging pairing on Android 11+, adb tcpip for older phones, scrcpy over Wi-Fi, and fixes for common errors.

Updated Oct 25, 20267 min readBy the RovaFlow team

ADB normally runs over a USB cable, but it can also run over Wi-Fi. That's handy for mirroring a phone without cables, testing on a phone across the room, or freeing USB ports. There are two ways, depending on the Android version: Wireless debugging (Android 11 and newer, no cable at all) and adb tcpip (any version, needs USB once).

Requirements: the phone and PC on the same Wi-Fi network, Developer options enabled, and an up-to-date ADB platform-tools (version 30 or newer for adb pair).

Method 1: Wireless debugging (Android 11 and newer)

  1. Open Settings → Developer options and turn on Wireless debugging. Accept the prompt for your network.
  2. Tap Wireless debugging (the text, not the switch) to open its screen.
  3. Tap Pair device with pairing code. The phone shows an IP address and port and a 6-digit code.
  4. On the PC, run (with your IP, pairing port and code):
adb pair 192.168.1.21:37099
Enter pairing code: 482913
Successfully paired to 192.168.1.21:37099
  1. Back on the main Wireless debugging screen, note the IP address & Port shown there. This is a different port from the pairing one. Connect to it:
adb connect 192.168.1.21:41235
adb devices

Pairing is a one-time step per PC; after that, only adb connect is needed (with the current port).

Method 2: adb tcpip (any Android version)

  1. Connect the phone by USB with USB debugging on.
  2. Switch ADB on the phone to network mode on port 5555:
adb tcpip 5555
  1. Find the phone's IP (Settings → About phone → Status, or adb shell ip addr show wlan0), unplug the cable, and connect:
adb connect 192.168.1.21:5555
adb devices

To switch back to USB mode, run adb usb. To drop the connection, run adb disconnect 192.168.1.21:5555.

Mirror the phone over Wi-Fi with scrcpy

Once connected, scrcpy works over Wi-Fi like it does over USB:

scrcpy -s 192.168.1.21:5555 --max-size 1024 --video-bit-rate 4M

scrcpy can also do the tcpip switch for you: with the phone on USB, run scrcpy --tcpip. More in How to mirror Android to PC.

Wireless ADB with many phones

You can connect several phones over Wi-Fi (each has its own IP), and the multi-device ADB scripts work the same way. But for more than a few phones running all day, Wi-Fi is the weak link:

  • Connections drop when phones sleep, change IP or the router reboots.
  • Mirroring many screens over Wi-Fi saturates the network.
  • Phones aren't charging, so batteries run down.

For racks of phones, USB with powered hubs is far more reliable. See phone farm setup: hardware and power.

Troubleshooting

ErrorFix
failed to connect … Connection refusedWrong port. On Android 11+ use the port from the main Wireless debugging screen (not the pairing port); on older phones run adb tcpip 5555 again over USB.
Failed: Wrong password or connection was droppedThe pairing code expired. Open "Pair device with pairing code" again and use the new code quickly.
unknown command pairYour ADB is too old. Install the latest platform-tools.
Connection timed outPC and phone are on different networks, or the router isolates Wi-Fi clients ("AP/client isolation"). Use the same network and turn isolation off.
Device shows offlineadb disconnect, then adb connect again; restart Wireless debugging if needed.

Running a wall of phones?

RovaFlow manages dozens to hundreds of real Android phones over USB: live screen wall, one-to-many control, workflows and device health in one Windows app. One-time price.

See RovaFlow pricing

FAQ

How do I use ADB over Wi-Fi without a USB cable?

On Android 11 or newer, turn on Wireless debugging in Developer options, tap Pair device with pairing code, run adb pair IP:PORT on the PC with the pairing port and code shown, then adb connect IP:PORT with the port shown on the main Wireless debugging screen.

Why does adb connect fail with "connection refused"?

The phone isn't listening on that port. On Android 11+ the connect port is different from the pairing port and changes when Wireless debugging restarts, so check the current one on the Wireless debugging screen. On older phones, run adb tcpip 5555 over USB first.

Does wireless ADB stay connected after a reboot?

No. After a reboot, re-enable Wireless debugging (Android 11+) and reconnect with the new port, or on older phones repeat adb tcpip 5555 over USB.

Is wireless ADB safe?

Only use it on a trusted network. Anyone on the same network who can reach the port could try to connect, so turn Wireless debugging off when you're done and never enable adb tcpip on public Wi-Fi.

Related guides

Home Features Pricing Sign In
Chat with us