Android adb wireless / WIFI debug Operation failed

I followed the steps in this post and tried to connect to my debug Motorola X Gen 2 for Wifi on OS X El Cap.

I connected my phone to the laptop using a USB cable, I killed and started the server, the server was started successfully, and then in:

./adb devices 

I got

 List of devices attached TA44909GA0 device 

Then i did

 ./adb tcpip 5555 

And I tried

 ./adb connect <IP addr of my phone>:5555 

both with a USB cable plugged in and unplugged, none of them worked. Both returned an error message:

 unable to connect to ***.***.***.***:5555: Operation timed out 

I can not understand what is happening here, I tried the Android Studio ADB WIFI plugin, which returned the same message, the operation timed out. I restarted everything, tried to connect to another cable and everything, nothing worked.

Does anyone know what is going on here?

+8
source share
5 answers

So, after a huge amount of testing, I think the problem is somehow connected with Wi-Fi, I think that this function does not work with WPA2 (or any kind of?) Corporate encryption, because I used my Wifi school, and this it turned out that everything was in order, up and down, for the hot spot that I installed with another laptop.

+1
source

Make sure your computer and Android device use the same Wi-Fi network. I had the same problem and fixed it after switching to the same Wi-Fi.

+8
source

I think this may help ...

for windows run cmd from "as administrator" then

netsh int ip reset

For Mac Users

  1. Click the Apple icon in the upper left corner and select "System Preferences" from the drop-down menu.

  2. Choose a network.

  3. Select a connected Internet connection (Ethernet or Wi-Fi) and click "Advanced".

enter image description here

  1. Select the TCP / IP tab and click "Update DHCP Lease". And click OK

enter image description here

+2
source

Try to increase the latency in Android Device Monitor.

From Android Studio: Tools-> Android-> Android Device Monitor In an Android device: Window-> Settings, Android-> DDMS.

In the DDMS window, increase "ADB Connection Timeout (ms)". By default, it is 5000 ms. If your application is especially large / takes a long time to load, it may last longer than this timeout, so increasing it may fix it.

+1
source

What solved this for me:

  • disconnect the phone from the USB cable
  • reboot phone
  • reconnect the phone via USB cable

(Until):

  • adb kill-server
  • adb start-server

Then follow the β€œstandard” procedure.

0
source

Source: https://habr.com/ru/post/1239597/


All Articles