开发者

Possible to safely run multiple Android emulators on the same machine and communicate using sockets?

I would like to simulate a small cluster of Android devices either on one laptop (w开发者_开发知识库orst-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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜