Ben44
Ben44

Reputation: 245

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

Upvotes: 7

Views: 18232

Answers (1)

Jing Li
Jing Li

Reputation: 15116

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)

Upvotes: 21

Related Questions