I\'m able to connect to my phone using adb connect, and I can adb shell also.
But when I go to Run->Device Chooser, there are no devices there.
What should I
If you are using a rooted phone then try this application WiFi ADB.
Probably this is the most simplest way to debug on wifi.
I am using this application from many days and it works flawlessly.
I used the following steps to successfully debug over wifi connection. I recommend this solution to everybody experiencing problems using integrated solutions like Android WiFi ADB plugin. In my case it failed to keep the Wifi connection to my device after unplugging USB. The following solution overcomes this problem.
If you have a local wlan you can connect your android device and your pc to this wlan. Then identify the IP address of the android device by looking into its wlan settings.
I prefer to connect with a hotspot on the device. This is more private and does not open your debugging connection to the (public) wlan.
192.168.43.1
adb tcpip 5555
to open a port on the device for adb connection.adb connect IPADDRESS
.adb connect 192.168.43.1
The command adb devices -l
should now display two devices if everything is ok. For example:
List of devices attached
ZY2244N2ZZ device product:athene model:Moto_G__4_ device:athene
192.168.43.1:5555 device product:athene model:Moto_G__4_ device:athene
The tricky part comes when unplugging the USB connection. In my case both connections are closed immediately! This may not be the case for all users. For me this was the reason that I could not use Android WiFi ADB plugin for android studio. I solved the problem by manually reconnecting the Wifi after unplugging usb by
adb connect 192.168.43.1
After that adb devices -l
shows a single wifi connected device. This devices shows also up in android studio and can then be selected for debugging. When the connection is unstable you may need to repeat the above command from time to time to reactivate the connection.
You may need to restart your adb via Android Studio (do it twice for good measure).