Friday, September 18, 2015

connecting adb to emulators running on anther host

Device 1 is named master (this one is running android studio)
Device 2 is named slave1 (this one is running the emulators)

Both boxes are running linux

To setup transparent adb access to slave1 is insanly simple

On master do:

➜  ~  adb-kill server
➜  ~  ssh -L 5037:localhost:5037 slave1


open new terminal

➜  ~  adb devices
List of devices attached
emulator-5554 device


Android studio will also see the emulators without any additional configuration

Note: If you get

* daemon not running. starting it now on port 5037 *
* daemon started successfully *


after running adb devices the port was not forwarded correctly

No comments:

Post a Comment