可以在同一台计算机上安全地运行多个Android模拟器并使用套接字进行通信吗? [英] Possible to safely run multiple Android emulators on the same machine and communicate using sockets?

查看:157
本文介绍了可以在同一台计算机上安全地运行多个Android模拟器并使用套接字进行通信吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在一台笔记本电脑(最坏的情况下)或专用网络上的多台计算机上模拟一小组Android设备。

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.

是否存在一种安全的方法来从Eclipse下的给定应用程序中识别并启动特定的仿真器?我最近安装了Eclipse / Java / ADT,并且正在使用Mark Murphy,Meier和Abelson的各种教程。

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.

推荐答案

从Android文档状态中运行多个模拟器实例您可以同时运行多个实例。

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

如何在Windows上创建两个或多个仿真器实例在Linux上显示可以创建使用不同端口的实例。

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.

您可以还可以从设备管理选项卡中在Eclipse中启动多个仿真器。端口号将在虚拟设备名称旁边列出。例如,my-emulator-name(emulator-5556)。

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).

我个人没有尝试连接到在不同计算机上运行的多个实例,但这似乎是可行的。技巧是将对主机的请求重定向到模拟器 。您可以从控制台使用 adb转发或 redir添加来完成此操作。

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.

有关更多信息,请参见仿真器网络在Android文档中。

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

这篇关于可以在同一台计算机上安全地运行多个Android模拟器并使用套接字进行通信吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆