本文介绍了Android的仿真器之间的交际的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能与两款Android模拟器的交际开始在两台不同的机器联网。

I wanted to know if it is possible the comunication between two Android Emulators started on two different machines networked.

例如 - 仿真器在机器M1运行 - 模拟器B上的机M2运行

For example- Emulator A run on machine M1- Emulator B run on machine M2

可不可以A和B交换消息?

Can A and B exchange messages?

如果是的话,我应该使用什么IP地址?

If yes, what ip address do I use?

非常感谢你德博拉

推荐答案

您可能已经知道了。由于Android的SDK-tools_r7它至少应该是可能的两个仿真器连接到对方。无论是在物理机之间的作品是不是我知道。这可能是可以设置为这个特定的广播在两台主机之间的伪装。

You might know this already. As of android-sdk-tools_r7 it should at least be possible to connect two emulators to each other. Whether is works between physical machines is not something I know. It might be possible to set up masquerading between the two hosts for this specific broadcast.

从Android 提交

启用模拟器的联网

该补丁增加了-shared-NET-ID选项的仿真器  加入在共享网络仿真器。  如果选项中给出的仿真器在启动时附加  网络接口绑定到一个多播套接字。该播套接字  模拟一个网络集线器,互连仿真器。  如果未给出-shared-NET-ID选项,没有什么变化。

This patch adds a -shared-net-id option to the emulator which joins the emulator in a shared network. If the option is given the emulator is started with an additional network interface bound to a multicast socket. This multicast socket emulates a network hub, interconnecting emulators. If the -shared-net-id option is not given, nothing changes.

要连接两个仿真器,使用 -shared-NET-ID<数字&GT。然后,他们将直接分享一切发送或读取IP 10.1.2<数字>在模拟器上

To connect two emulators, use the -shared-net-id <number> command line option when starting the emulator. They will then directly share everything sent to or read from ip 10.1.2.<number> on the emulator.

另一种方法是利用亚行,使仿真器之间的端口转发,然后设置为伪装的联网计算机的端口。

Another approach would be to enable port forwarding between the emulators using adb, and then set up masquerading for those ports on the networked machines.

我真的不知道,要么这些解决方案相匹配的用例,你问后。如果不是,增加更多的细节,原来的问题可能会有帮助。 :)

I'm not really sure that either of these solutions match the use case that you're asking after. If not, adding more details to the original question might help. :)

免责声明:我没有尝试过的第一种方式,第二我只用确保仿真器可以绕过一个讨厌的企业防火墙和HTTP代理,这样我们可以测试的Andr​​oid浏览器。该原则应该是合理的,但。

Disclaimer: I have not tried the first approach, and the second I've only used to make sure that an emulator could bypass a nasty corporate firewall and HTTP proxy so that we could test the android browser. The principle should be sound though.

更新:不,我研究了一下这一大堆,没有发现很好的解决方案。我不是在iptables来设置该方式适用于服务器端的一个有效通道足够好了。

Update:Nope, I played around with it a whole lot and found no nice solutions. I am not good enough at iptables to set up a valid tunnel that way that works for the server end.

问候,
的Mikael

Regards,
Mikael

这篇关于Android的仿真器之间的交际的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 01:06
查看更多