Can't connect to Android via ADB over wifi - Do I need root access? Can't connect to Android via ADB over wifi - Do I need root access? android android

Can't connect to Android via ADB over wifi - Do I need root access?


Step 1 . Go to Androidsdk\platform-tools on PC/Laptop

Step 2 :

Connect your device via USB and run:

adb kill-server

then run

adb tcpip 5555

you will see below message...

daemon not running. starting it now on port 5037 *daemon started successfully * restarting in TCP mode port: 5555

Step3:

Now open new CMD window,

Go to Androidsdk\platform-tools

Now run

adb connect xx.xx.xx.xx:5555 (xx.xx.xx.xx is device IP)

Step4: Disconnect your device from USB and it will work as if connected from your Android studio.


Symptoms

With my phone, this problem happens a lot. I get these symptoms:

  • ping x.x.x.x times out
  • adb connect x.x.x.x times out ("unable to connect")
  • telnet x.x.x.x 5555 times out

Workaround

I need to disable and re-enable WiFi on my phone before running adb connect on my computer. Then I can both ping, telnet, and adb connect to the phone.

I'm using a Sony Xperia M C1904 running CyanogenMod 12.1.


Your device hasn't to be rooted. I've developed a plugin for IntelliJ/Android Studio to connect your device over wifi pressing just one button. Here is the code and here the plugin ready to be used.

The usage is quite simple. Here you have a gif:

enter image description here