如何在两个模拟器实例它们之间的相同的机器和传输数据(文件)进行连接?模拟器、实例、机器、两个

2023-09-06 17:53:43 作者:放肆的年华

在这里不言而喻。

有两个仿真器实例说,连接到互联网同一台机器上A和B。现在我需要我怎么做,要传递A和B之间的文件?

There are two emulator instances say A and B on same machine that is connected to internet. Now I need to transfer a file between A and B. How do I do that ?

我写一个ftp可能是有意义的..但我不知道的端口和IPS将如何。在那里,Android支持,方便文件传输的事情吗? (仿真器之间应工作)

I writing a ftp might make sense .. but am not sure of how the ports and ips would be. are there any thing that Android supports for easy file transfer ? (Should work between emulators)

这将是伟大的,都知道这样做的方式..谢谢

It would be great to know all the ways to do it.. Thanks

推荐答案

在解释两款Android模拟器之间如何沟通http://developer.android.com/guide/developing/devices/emulator.html:

How to communicate between two Android emulators is explained in http://developer.android.com/guide/developing/devices/emulator.html:

互连仿真实例

要允许一个模拟器实例与另一通信,则必须  建立必要的网络重定向,如下图所示。

To allow one emulator instance to communicate with another, you must set up the necessary network redirections as illustrated below.

假设你的环境是

   A是你开发机器   B是你的第一个仿真器实例,对运行中的   C是你的第二个模拟器实例,在一个过于运行  

和你想运行在B中的服务器,到Ç将连接,这里是如何  你可以设置它:

and you want to run a server on B, to which C will connect, here is how you could set it up:

  设置了B上的服务器,听10.0.2.15:  在B的  控制台设置为从一个重定向:本地主机:以  乙:10.0.2.15:  在C,已在客户端连接到  10.0.2.2:  

例如,如果你想运行一个HTTP服务器,您可以80选择并为8080:

For example, if you wanted to run an HTTP server, you can select as 80 and as 8080:

  乙监听10.0.2.15:80   在B的控制台,问题REDIR添加TCP:8080:80   ç连接到10.0.2.2:8080   

希望它帮助!

 
精彩推荐
图片推荐