Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Android Studio cannot pair the phone over Wi-Fi

ErrorThere was an error pairing the device

Short answer

Wireless pairing needs the phone on Android 11 or higher and on the same Wi-Fi network as the computer, with current Platform-Tools. If the dialog never finds the phone or rejects the code, run adb server-status and adb mdns track-services to see whether adb and the network support discovery.

  • Applies to Android Studio current stable, Android SDK Platform-Tools 37, Android 11 and higher phone
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Ask adb what it thinks of itself. The output shows the adb version and whether mDNS discovery is on.

    adb server-status
  2. 2Match what you see, then jump to its fix

    1. 1The phone never appears in the dialogThe phone and the computer are not on the same network, or the phone is below Android 11Fix
    2. 2adb server-status shows mdns_enabled: false, or a version below 37.0.0Platform-Tools is old, or adb has mDNS switched offFix
    3. 3adb mdns track-services prints nothing while Wireless debugging is onThe network blocks mDNS, so the phone is never discoveredFix
    4. 4Pairing is remembered on the phone, but the new attempt does not completeAn old pairing is stuck on the phoneFix

What does the error look like?

  • There was an error pairing the device
  • The Pair devices over Wi-Fi dialog lists no device

Cause 1 of 4

The phone and the computer are not on the same network, or the phone is below Android 11

1Check

Both devices must be on the same wireless network, and the phone must run Android 11 or higher.

adb shell getprop ro.build.version.release

2Fix

Join the same Wi-Fi on both, turn Wireless debugging on in Developer options, and start pairing again from Android Studio.

# On the phone: Settings > Developer options > Wireless debugging > On

3Verify

The phone shows up under Pair devices over Wi-Fi.

adb devices -l

Confirmed by developer.android.com

Did this fix it?

Cause 2 of 4

Platform-Tools is old, or adb has mDNS switched off

1Check

Check the version and the two mDNS lines in the server status.

adb server-status

2Fix

Update SDK Platform-Tools. If mDNS is false, set the ADB_MDNS environment variable to 1 and restart the adb server. If the backend is not LIBADBMDNS, set ADB_MDNS_OPENSCREEN to 0 and restart.

adb kill-server
adb start-server
adb server-status

3Verify

The status shows mdns_enabled: true.

adb server-status

Confirmed by developer.android.com

Did this fix it?

Cause 3 of 4

The network blocks mDNS, so the phone is never discovered

1Check

With Wireless debugging on, track the services. Empty output means the network does not pass mDNS.

adb mdns track-services --proto-text

2Fix

Pair by hand instead. On the phone choose Pair using pairing code, then give adb the address and port shown there and type the six-digit code when asked.

adb pair 192.168.1.50:37123

3Verify

adb reports that pairing succeeded, and the phone lists your computer under Paired devices.

adb devices -l

Confirmed by developer.android.com

Did this fix it?

Cause 4 of 4

An old pairing is stuck on the phone

1Check

A pairing stays until you forget it or revoke authorizations on the phone.

# Phone: Developer options > Wireless debugging > Paired devices

2Fix

On the phone, open Wireless debugging, tap your computer name under Paired devices and choose Forget (or use Revoke adb debugging authorizations). Then pair again.

# Phone: Wireless debugging > Paired devices > your computer > Forget

3Verify

Pairing works from a clean state.

adb devices -l

Confirmed by developer.android.com

Did this fix it?

How do I stop it coming back?

  • Update Platform-Tools and Android Studio together.
  • Pair once and use the always allow on this network option on a network you trust.
  • Check adb server-status after every Platform-Tools update.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

adb tcpip 5555 fails because no device is found

adb: more than one device/emulator

adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.