views:

545

answers:

1

I would like to simulate a small cluster of Android devices either on one laptop (worst-case), or on several machines on a private network. This is for testing communications and process migration on Android.

Is there a safe way to identify and launch a particular emulator from a given application under Eclipse? I have a recent Eclipse/Java/ADT setup and I'm using the a variety of tutorials from Mark Murphy, Meier, and Abelson.

--Will

+3  A: 

Running multiple emulator instances from the Android documentation states that you can run multiple instances concurrently.

How to create two or multiple instances of emulator on Windows or on Linux shows that instances can be created that are using different ports.

You can also start multiple emulators in Eclipse from the Device Management tab. The port number will be listed next to the name of the virtual device. For instance, my-emulator-name (emulator-5556).

I have not personally tried connecting to multiple instances running on different machines but it appears to be possible. The trick is to redirect requests to the host machine to the emulator. You can do this using "adb forward" or "redir add" from the console.

For more information, see Emulator Networking in the Android documentation.

Timothy Lee Russell
Thanks, Timothy.I've been able to get a 2nd emulator up and running (barely) by using named Emulators and targeting an App to a specific Emulator. However, on a slow laptop with only 1GB of memory, the 2nd emulator copy appears immediately, but its services (as shown in the DDMS view of Eclipse) may not show up for 30 minutes or more! Very strange.My goal is to have several Emulators running across 3 physical machines on the same private network in order to share process information amongst the Android "devices" via emulator. It looks a bit flakey; do you have Emulator links? --Will
Will Gillick