Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect Eclipse to Android emulator on a different machine

Can't seem to find the following information although I'm pretty sure this should be possible: I'm running an Android emulator on a machine A. I'm developing on another machine B in which I'm using Eclipse.

Now when I switch to the DDMS perspective in Eclipse, I want the emulator from machine A to show up in the devices tab.

The reason is, that the emulator is quite slow and it looks like running development and emulator on different machines might be a solution.

Since the emulator runs on a specific port, I'm pretty sure I just need to figure out how to tell eclipse where to look for emulators.

Thanks for any tips

like image 573
pgruetter Avatar asked Dec 11 '10 19:12

pgruetter


People also ask

How do I open an Android emulator in a separate window?

To enable the setting you have to visit the Tools > Emulator and then uncheck the "Launch in a tool window" option. By doing that your emulator will launch in a new separate window. Launch Android Emulator in a Separate Window.

Can I run Android emulator inside a virtual machine?

Android Emulator allows you to run emulations of Android devices on Windows, macOS or Linux machines. The Android Emulator runs the Android operating system in a virtual machine called an Android Virtual Device (AVD). The AVD contains the full Android software stack, and it runs as if it were on a physical device.


1 Answers

You can tell adb to connect to a device listening on an IP address and TCP port. That device should then show up in eclipse. So the debug machine is easy.

The emulator machine may be harder. The emulator is listening for TCP connection on a local port. IIRC it has been established that there's no command line switch to make it listen on an external interface, though double check that. So you might have to modify and recompile the emulator, or use some kind of port-forwarder on the hosting machine. ssh might handle that for you though I'm sure there are other tools without the encryption overhead if that's not needed.

like image 150
Chris Stratton Avatar answered Sep 19 '22 11:09

Chris Stratton