Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug in Android Studio using adb over WiFi

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 do to connect my (connected) adb Android Studio?

When I plug it in through USB, it shows up on the list

like image 874
John Avatar asked Nov 15 '15 23:11

John


People also ask

Can you use ADB over WiFi?

ADB is normally used on Android via a USB cable. But you can also set up and use ADB wirelessly.

How do I enable WiFi debugging on Android?

If you are using Android 11 click on the build version many times to activate the developer option then go to Settings>Advanced>Developer options. Scroll to debugging and turn on the "Wireless debugging" checkbox. Then open the menu debugging by touching the "Wireless debugging".

Does Android Studio support wireless debugging?

Today, in the latest release of Android Studio called Bumblebee, a new and much easier wireless debugging tool has been released into the IDE. This tool, however, currently only works for Android devices running API 11 or higher.


1 Answers

You can find the adb tool in /platform-tools/

cd Library/Android/sdk/platform-tools/ 

You can check your devices using:

./adb devices 

My result:

List of devices attached XXXXXXXXX   device 

Set a TCP port:

./adb shell setprop service.adb.tcp.port 4444  ./adb tcpip 4444 

Result message:

restarting in TCP mode port: 4444 

To init a wifi connection you have to check your device IP and execute:

./adb connect 192.168.0.155:4444 

Good luck!

like image 189
anthorlop Avatar answered Sep 20 '22 15:09

anthorlop