Go to WSA settings Developer tab. Click on Manage developer settings which opens the Android developer options. Find USB debugging. turn it on if it was not already. If it is already on, turn it off before turning it back on. Go back to your Windows command prompt adb connect should work again.
Cannot connect to 127.0.0.1:58526 (Port shown under the Developer Mode of WSA)
As shown in the title, I can't connect to 127.0.0.1:58526 via adb.
(cannot connect to 127.0.0.1:58526: No connection could be made because the target machine actively refused it. (10061))
I checked the netstat and the result showed that Port 58526 is not listening! ( And of course my Developer Mode is ON)
BTW, I can connect to WSA by the given IP in the WSA Setting panel( e.g.:172.22..).
How can I fix this? Thanks!
Windows for business | Windows Client for IT Pros | User experience | Other
7 answers
Sort by: Most helpful
-
-
Andrew Leader-MSFT 306 Reputation points Microsoft Employee Moderator
2022-04-11T18:08:14.223+00:00 Hi, have you tried the following...
- Reboot your PC
- Launch a WSA app (like Amazon Appstore)
- Attempt connecting again
When you see the "target machine actively refused it" 10061 error, you'll often just have to reboot your PC and then relaunch WSA and try again.
-
kris 16 Reputation points
2022-08-20T20:14:09.78+00:00 Hey, so I've been able to find a solution to the issue.
First, open a PowerShell window and run
ipconfig
You'll get a list containing lots of IP Addresses divided into categories. Look for a header with a Default tag.
Now copy the IPv4 Address that's written there.
Connect to the WSA using the following code:
adb connect <Your IPv4 Address>:58526
You'll get a prompt from WSA requesting you to allow debugging. Press Accept and you're done!
Source:
https://learn.microsoft.com/en-us/windows/android/wsa/ -
yahgoo 1 Reputation point
2022-10-31T05:12:38.79+00:00 Click Hamburger menu in WSA, select Developer
Enable Developer mode
Click Manage Developer Settings
Enable Use Developer option
Enable USB Debugging
Restart pc
In Terminal, type following commands
adb connect <Your IPv4 Address>:58526
adb install xxxx.apk -
Jennifer Guzman 0 Reputation points
2023-03-27T22:57:23.21+00:00 I don't know if Hyper-V is required to run WSA apps, but I was having this issue as well - unable to connect to the ADB port - and enabling Hyper-V solved this issue for me.