Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADB through network with android studio

I would like to know is it possible to connect Android Studio Debugger through the network. Currently I generate an APK on the computer 1, I push on the network and I use adb to install it.

Now I would like to use the debugger on my Android Studio, so I would like is it possible to connect Android Studio on an ADB installed on an another computer? If yes, do you have a tutorial?

I created a schema for a better understanding :

(I don't want use ADB on my Computer 1)

Shema of my situation

Thanks

like image 365
Ben44 Avatar asked Oct 15 '15 12:10

Ben44


People also ask

Does Android Studio support wireless debugging?

Starting from Android Studio Bumblebee (2021.1. 1) Stable, you can debug over Wifi just pairing the device by just scanning the QR code.


1 Answers

IMHO, I think of course you can do remote ADB and remote debugging, but you have to have ADB installed. (if you have Android Studio installed on Computer 1, I guess you also have Android SDK there, then ADB is there as well: $ANDROID_SDK/platform-tools/adb)

You can forget about Computer 2.

Precondition:

  • Computer 1 has Android Studio and Android SDK
  • Android Device has enabled Developer options -> USB debugging (no root required)

Steps:

  1. Connect device to computer via USB

  2. Run adb tcpip 5555 (you'll see restarting in TCP mode port: 5555)

  3. Find your device's IP address (assume it's 192.168.1.101), then run adb connect 192.168.1.101:5555 (it should say connected to 192.168.1.101:5555)

  4. Disconnect device from USB (so now it's remote connected via tcpip)

like image 181
Jing Li Avatar answered Oct 28 '22 12:10

Jing Li