Reputation: 4187
I have problems trying to do wireless debugging.
I followed this instruction: https://developer.android.com/studio/command-line/adb#wireless
And it seems that I cannot connect to my phone at step 7 of the article adb connect device_ip_address
.
It said cannot connect to 192.168.1.35:5555: No connection could be made because the target machine actively refused it. (10061)
I tried searching for the solution in stackoverflow but the answers do not suit my situation. They said to make sure that I connect to the same network and I'm pretty sure I am connected to the same network. I see my phone is connected to wifi name "Chor" And PC is also connected to the same name. I can even ping phone IP in the command prompt and receive a good response.
Any clues about what could be the issue? The phone I use is Huawei P30 Lite. I'm using Windows 10.
Upvotes: 23
Views: 71598
Reputation: 1
Go to Developer Options > Turn on Wireless Debugging.
If you select it to see the details, you would probably be shown the IP address & Port of the phone itself.
Then go adb connect 192.168.x.x:Port
and it will probably solve your problem!
Upvotes: 0
Reputation: 7
This occurs due to incorrect IP address. For me this worked: Connect system with the hotspot of my phone. Tap on network to see details. Enter IP address. This setup resolved my IP-related connectivity problems(10060 & 10061).
Upvotes: -1
Reputation: 1
I also faced the same issue. Resolved it by following these steps:
Open the terminal and try these commands
1. adb kill-server
2. adb tcpip 5555
3. adb connect <IP address>:5555
Upvotes: 0
Reputation: 726
Kill and start ADB
At terminal:
adb kill-server
adb start-server
Upvotes: 0
Reputation: 839
that Occurs due to
Follow those Steps to resolve that problem,
Upvotes: 44
Reputation: 1
going on developer option -> wireless debugging -> ON ;Check IP address and port use that with adb connect or scrcpy --tcpip=192.168.x.x:port
Upvotes: 0
Reputation: 21
go to wireless debugging settings on your phone locate the ip&port option and use the port your phone show like so: adb connect 192.168.1.101:39111enter image description here
Upvotes: 2
Reputation: 163
Make sure you are using a cable that can transfer data, and that the device appears in the devices list when the cable is connected.
For device list run command:
adb devices
While the device is still connected enter the connecting command, with the IP address from the device wifi settings.
adb connect ip_address
Upvotes: 1
Reputation: 201
Solved:- Just once connect your mobile with USB and allow the permission pop-up on the mobile screen, and then try to connect on wifi, it will connect.
Upvotes: 0
Reputation: 4611
As other mentioned about the process you should first clean the path for connection. But try these two important points
1- Change adb
to .\adb
.\adb kill-server
.\adb usb
.\adb tcpip 5555
.\adb connect 192.168.1.34:5555
2- Just you can keep one IP and for the next must clean the path!
Points:
1- As you know, we can set the IP address for a real phone in Static
2- If use a real phone by android 11, need to turn on Wireless debugging, then find the IP & Port
Upvotes: 0
Reputation: 467
check your wifi debugging ip address
developer option -> wifi debugging
Upvotes: 0
Reputation: 126
I'm facing the same issue then I'm restart everything like Phone, Android Studio/VS Code, and restart Computer. then solved.
Some of the commands you can try.
adb tcpip 4568
adb connect <Your device IP>:4568
adb disconnect
adb kill-server
Upvotes: 2
Reputation: 17566
I ran into this error message when attempting to debug my Samsung Galaxy watch and it turns out that the Samsung Galaxy watches run on the Tizen OS and are not meant to be connected to Android Studio via adb. In order to develop apps for these devices, you will need to use Tizen Studio and connect to your device via sdb.
Upvotes: 1
Reputation: 1157
Seems like there are some bugs with authorization conditions across different manufacturers. To get your target device to trust your computer, you need to go through more than just approving the computer's MAC address.
After some modifications of @off99555's answer, this is the solution for OnePlus 7 T/Pro devices on OxygenOS 10 (Android 10.x). Might be device manufacturer specific:
The target device should recognize your computer now, and you can unplug USB and use ADB wireless now. Note that if you revoke USB auth in the future, you will have go through these steps again.
Upvotes: 5
Reputation: 4187
I have accidentally found the solution now!
It seems to be a phone issue (specifically Huawei phone). It keeps turning off USB debugging mode by itself so what I had to do was to prevent it from turning off USB debugging mode.
I am not clearly sure of what is the exact step that fixed the issue but here's everything I did in Developer options:
Upvotes: 15