如何将网络设备从 Android 模拟器桥接到主机
有没有办法将Android模拟器的网络设备桥接到主机上?
我看过这些说明,但它们真的很旧,文件名有改变了,我尝试将它们翻译到当前的模拟器没有成功。还有一些其他类似的例子,但它们都是 2007 年至 2008 年的。我必须承认,我的 Linux,尤其是网络能力并不强。我无法让第二个网络设备 (eth1) 显示在模拟器中。
我想让网络设备在主机上显示为设备的原因是我需要能够通过 rsh 从远程计算机(而不是主机)连接到 android 设备(我已经能够执行,如我的此处的说明所示),然后从内部使用 ssh 连接到另一台远程计算机。我可以进入 rsh,但无法 ssh 出去(或 ping 远程计算机)。 (我已经获得了带有 rshd 的图像,这在实际手机上运行良好,但隐藏的模拟器网络设备会导致问题)
如果可以创建并桥接 eth1,那就太好了。我也愿意桥接 eth0(但我想将 IP 更改为 172.xxx,以便与远程计算机位于同一子网中)
谢谢。如果你问的话我会尽力澄清。
Is there a way to bridge the network device of the Android emulator onto the host machine?
I have seen these instructions, but they are really old, the file names have changed, and my attempts to translate them to the current emulator haven't worked. There are a few other similar examples around, but they're all from 2007-2008. I must admit, my Linux- and especially networking-fu are not strong. I could not get a second networking device (eth1) to show up in the emulator.
The reason I want to have the network device appear as a device on the host machine is that I need to be able to connect to the android device from a remote computer (not the host), through rsh (which I've been able to do, as shown in my instructions here), and then use ssh from within to connect to another remote computer. I can get in to rsh, but I can not ssh out (or ping the remote computer). (I've been provided with an image with rshd on it, and this works fine on an actual phone, but the emulator's network devices being hidden is causing problems)
If an eth1 could be created and bridged, that would be great. I'm also open to bridging eth0 (but I'd want to change the IP to 172.x.x.x to be on the same subnet as the remote computers)
Thanks. I'll try to clarify anything if you ask.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1) 从 Google 代码上的 LiveAndroid 项目下载 LiveAndroid iso。或者,从此处下载 Android-x86 iso。 2) 使用 VMWare 或 VirtualBox 将其作为虚拟机启动。 3) 将虚拟机配置为使用桥接网络,就像配置任何常规虚拟机一样。 4) 将 Android SDK 和其他工具(例如
adb
)安装到您的主机上。使用adb
连接到虚拟机,就像它是一个真正的 Android 硬件设备一样。注意:LiveAndroid是一个基于EE-PC的虚拟机。它认为它运行在 EE-PC 硬件上。因此不会有基于 QEMU 的 Android 模拟器运行。网络桥接将由您选择的虚拟化软件提供的主机操作系统驱动程序执行。
1) Download the LiveAndroid iso from the LiveAndroid Project on google code. Or alternatively, download Android-x86 iso from here. 2) Boot it as a virtual machine with VMWare or VirtualBox. 3) Configure your virtual machine to use Bridge networking, as you would per any regular virtual machine. 4) Install Android SDK the other tools like
adb
onto your Host computer. Connect usingadb
to the virtual machine as if it were a real android hardware device.Note: LiveAndroid is an EE-PC based virtual machine. It thinks its running on EE-PC hardware. So there will be no QEMU-based android emulator running. The network bridging will be performed by the Host-OS drivers provided by your chosen virtualization software.