Android Studio cannot pair the phone over Wi-Fi
There was an error pairing the deviceShort 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.
Fix it fast
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-status2Match what you see, then jump to its fix
- 1
The phone never appears in the dialogThe phone and the computer are not on the same network, or the phone is below Android 11Fix - 2
adb server-status shows mdns_enabled: false, or a version below 37.0.0Platform-Tools is old, or adb has mDNS switched offFix - 3
adb mdns track-services prints nothing while Wireless debugging is onThe network blocks mDNS, so the phone is never discoveredFix - 4
Pairing is remembered on the phone, but the new attempt does not completeAn old pairing is stuck on the phoneFix
- 1
What does the error look like?
There was an error pairing the deviceThe 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.release2Fix
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 > On3Verify
The phone shows up under Pair devices over Wi-Fi.
adb devices -lConfirmed by developer.android.com
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-status2Fix
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-status3Verify
The status shows mdns_enabled: true.
adb server-statusConfirmed by developer.android.com
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-text2Fix
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:371233Verify
adb reports that pairing succeeded, and the phone lists your computer under Paired devices.
adb devices -lConfirmed by developer.android.com
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 devices2Fix
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 > Forget3Verify
Pairing works from a clean state.
adb devices -lConfirmed by developer.android.com
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 pair or adb connect fails with error 10061 over Wi-Fi
Wireless debugging device not listed by adb devices
Error 10061 means the phone's address refused the TCP connection.
4 causes, each with a fixMobile apps
adb cannot start because something already holds its port
adb start-server failed
The adb server must bind local TCP port 5037, and every adb client talks to it there.
2 causes, each with a fixMobile apps
The phone shows as unauthorized and Android Studio will not run the app
adb devices lists the phone but Android Studio cannot deploy to it
An unauthorized phone means it has not trusted this computer's RSA key.
3 causes, each with a fixMobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb prints 'server version doesn't match this client; killing...'
adb server version doesn't match this client; killing...
adb runs a background server, and every adb command is a client.
3 causes, each with a fixMobile 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