19

I want to pair my android device by scanning QrCode in device manager android studio.

Sometime it works but often it doesn't work.

when I scan QrCode it waits in state below

I try ways below:

1- Connecting to same wifi

2- Deleting all previous paired devices

3- Try to connect using pairing with code

4- Reseting android studio

and all solutions offered in stack

enter image description here

2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Sep 5, 2022 at 6:21
  • Deleting of previously paired device was a solution for me. Commented Mar 14, 2023 at 11:07

3 Answers 3

60

By following the 7 steps below, your problem will be solved definitely:

  1. You should add adb to your environment variables. open your environment variable and add Your-SDK=path\platform-tools to environment variables Path.
  2. In your device open Wireless debugging under developer options.(if developer options not exists in your settings you should activate developer mode)
  3. in wireless debugging tap on Pair device with pairing code.
  4. in your Android studio open Terminal and write commands below in terminal.
  5. adb pair Ip-address:port (get Ip address from dialog below)

  1. Insert wifi pairing code. (get pairing code from dialog above)
  2. adb connect IP-address:port (get Ip address & port from dialog below). You've done successfully. congratulations

enter image description here

Sign up to request clarification or add additional context in comments.

8 Comments

Why does the GUI not work if the solution is this simple?!
Successfully paired to 192.168.0.162:41609 failed to connect to '192.168.0.162:41609': Connection refused I see no options to wi-fi debug after pairing.
This paired my device successfully. But I still can't see a way to "run" the app on my device since the device doesn't show up as active on the device manager.
@Psijic you have to use different ports to pair and to connect to the device; in the answer above, the port 41551 is used to pair and the port 40119 is used to connect
Thank you! using ADB worked... it's so stupid that the UI (either wifi or using code) doesn't work o_O)
|
3

I had a problem like it. Now I use Android Studio Dolphin, WiFi connection works well. Also In Windows Task Manager you can kill adb.exe and try connect your device again.

Comments

0

I encountered the same issue, and this solution works for me:

  1. Plug in the device via usb and enable usb debugging.
  2. In Android Studio terminal, enter adb tcpip 5555
  3. Unplug the usb cable.
  4. In terminal enter adb connect <your-device-ip>:5555

That's it, now you can check if it's listed in the android studio device manager.

1 Comment

stackoverflow.com/questions/4893953/… i fixed this issue. you can check that. Maybe you are facing same problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.