I am trying to connect my Android 11 device with the android studio over adb wifi but it is not working.
I updated to the latest stable bumblebee and updated my SDK
I tried turning off the firewall on my pc but it is the same result.
When I use the QR code method my android phone just shows "pairing device" and nothing happens
If I try the code method, the android studio just shows "searching for devices" but nothing happens
and, yes, I enabled wireless debugging on my phone and I am connected to the same wifi network.
I don’t know if the problem is with my computer or phone. I do not have any other Android11+ phone to try with
15
Answers
I was having the same problem as you. Neither pairing by QR nor by pairing code worked.
So I tried connecting by typing
adb connect [phone_ip]:[port]
in the terminal and that worked flawlessly. Didn’t even need to plug the phone into the computer with a USB. Your phone will tell you the IP and port right above the "pair with QR code" option inside the Wi-Fi debugging setting. Just connect to that address.Go to
Settings -> Build, Execution... -> Debugger -> Built-in Server
and in the
Built-in Server
option set the value ofPort
as the same port you see in your phone and tick the Can accept external connectionsafter that go to wireless pairing and your device will show now
I was having the same problem.
QR Code, Pairing code, or even connecting manually with the "adb connect [phone_ip]:[port]" method didn’t work.
However, the problem was solved as soon as I disabled the "AP isolation" option on the modem settings.
I had this issue; it paired fine the first time in-app but never worked again when trying to pair or connect directly from Android Studio.
What I now do to connect/pair is the following:
Pair device with pairing code
, and keep it on that screen.cd
into the%LOCALAPPDATA%Androidsdkplatform-tools
directory.adb pair <PHONE_IP>:<PHONE_PORT>
adb connect <PHONE_IP>:<PHONE_PORT_PROVIDED_ABOVE_PAIR_WITH_QR_BUTTON>
, and it should connect; Android Studio will automatically detect the connection, so that’s it!In my case, I have a galaxy s10e, and I need to put my phone in charge and activate wifi debugging and when it’s connected with android studio, I can unplug the phone and it still works. In Huawei there is an option in developer options "Allow ADB debugging in load only mode", we can disable it and it works without charging the phone. On s10e there is no such option, I think that it is allowed by default and we can’t change it.
It may be worth your while to ensure:
After that, the connection wizard at least recognized my device (Samsung Note 10), but failed to connect and gave a generic error message. I avoided this by using
adb pair <ip-address>:<port> <code>
as mentioned in this answer. Seems like this feature still has a ways to go.ping 192.168.1.97
. You should see that packets are transmitted.adb pair
I periodically get this problem (Pairing Android Studio on my Mac to Android Phone, the Computer just hangs after phone scans QR code). When I disable and then re-enable wifi debugging on the Android phone, it connects on the next attempt.
I tried everything to fix this and nothing worked. In frustration, I went for a walk. When I came back – it worked.
So while I can’t say for sure what fixed it, try turning your phone’s WiFi off then on again.
Try to update SDK Platform-Tool and Build-tools.
Enable wifi debug on your phone.
Then write in terminal of android studio:
Navigate to platform-tools
and then:
Press enter.
Then type your pair password.
Then
If not working again just restart phone and try again
I was able to get it to pair (Windows 11), by doing this:
My problem was with the file "devices.xml" located in $USER_FOLDER/.android
I have renamed it and the problem goes.
I have reinstalled platform-tools and it helped.
open terminal and type
cd %LOCALAPPDATA%Androidsdkplatform-tools
./adb connect <device_ip>:<device_port>