Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio wireless ADB error (10061)

It seems that wireless ADB has more and more issues each time I update Android Studio. Using 2.1.1, I'm now unable to connect to my tablet using the command:

adb connect <ip addr> 

It results in the error:

unable to connect to <ip addr>:5555: cannot connect to <ip addr>:5555: No connection could be made because the target machine actively refused it. (10061) 

This happens directly after approving the connection in the dialog box on the tablet. Before today I was forced to do an adb kill-server prior to attempting to connect to the tablet but now that doesn't even help.

like image 703
Luke Allison Avatar asked May 17 '16 04:05

Luke Allison


People also ask

How do I fix an ADB connection error?

In tools menu,Android-> untick enable adb Integration and Then OPEN widows task manager n manually end process adb.exe This also solved my issue as der were multiple adb.exe running. Show activity on this post. Restart the computer. Now, disconnect the device, connect it, Make sure USB debugging Option is enabled.

How do you fix no connection could be made because the target machine actively refused it 10061?

Try running netstat -anb from the command line to see if there's anything listening on the port you were entered. If you get nothing, try changing your port number and see if that works for you. In Windows operating systems, you can use the netstat services via the command line (cmd.exe) .

How do I authorize a device on ADB?

Open a command window and enter "adb devices". Watch the device's screen for any Authorization message and allow the connection.


2 Answers

Generally you can say this error is network related, check these items first:

  • make sure your computer and your device can see each other in network mostly this means they are connected to the same router, but in more advanced scenarios your device may be connected to a wireless router and you computer may be connected to you Local Area Network. what is important is they can see each other. you can check this by pinging you device ip address from you computer.

  • make sure there is no conflict with ip addresses, this might be very simple. but if you do not use DHCP server and you enter the ip addresses in you devices you could mistakenly entered same ip address in different devices

when you are sure about the network issues redo the famous steps

So when you connected by USB follow these commands:

  1. stay connect via USB

  2. connect to your WIFI network (computer and mobile device both)

  3. ping DeviceIP (must be have ping to your device)

  4. adb kill-server

  5. adb usb

  6. adb tcpip 5555

    1. unplug usb cable (as per @captain_majid 's comment)
  7. adb connect yourDeviceIP

  8. adb devices (must be see two device names , one of them is by deviceIP)

  9. unplug USB cable

Steps from could not connect to tcp:5037: cannot connect to 127.0.0.1:5037: No connection could be made because the target machine actively refused it. (10061)

like image 106
Muhammad Naderi Avatar answered Oct 05 '22 19:10

Muhammad Naderi


when restart device then your port also channge so hit command below

1- adb kill-server

2- connect your phone to pc with usb cable

3- adb tcpip 5555

4- adb connect (your device ip):5555

like image 38
rushikeshmore Avatar answered Oct 05 '22 19:10

rushikeshmore