我正在开发一个 Android 应用程序,但对 我的模拟器
的性能感到厌烦我确实在 VM-ware 和 Virtual Box
中都安装了 Android PC 版本
我可以将它用作模拟器吗?如果是这样,怎么做?如何将 ADB 连接到运行 PC Android 的虚拟机?
我在某个论坛看到使用它,但我的 VMs android 没有特定 IP.
如何连接??
使用最新的 Android X86 4.2 Jelly Bean 和 Virtual Box
我找到了连接 Internet 和 adb 的不同方法
最简单的解决方案是使用 NAT 适配器,如果主机连接到互联网,它将直接将您连接到互联网,但您不会通过此设置获得 adb 连接在这里您将获得公共 ip,因此您无法连接到主机
最简单的解决方案就是使用 Host Only Adapter
注意: 由于 DHCP 服务器设置,默认 Host Only 适配器可能无法工作,要么为现有适配器创建新的 HostOnlyAdapter
或运行 DHCP 服务器
()
在这种情况下你必须小心.
如果您使用 LAN 进行互联网连接,则应将网桥适配器与您的以太网卡一起使用,它将为您提供本地 ip,虚拟机将使用主机连接到互联网
或者,如果您使用 Wifi,只需选择 Wifi 适配器即可
对于其他类型的连接,您应该采用相同的方式
要检查 ip 地址,只需按 Alt+F1 {对于控制台窗口} [要切换回图形视图,请按 Alt+F7 ]
您将看到控制台窗口类型 netcfg
它会显示IP地址
现在转到您的主机运行命令提示符移动到 adb 目录输入
adb connect {你的IP地址}
adb 连接 192.168.1.51
adb kill-serveradb 启动服务器
您可以检查连接到 adb 的设备
adb 设备
I am developing an Android application but fed-up of performance of My emulator
I do have a Android PC version
installed in both VM-ware and Virtual Box
Can I use it as emulator? If so, how? How can I connect ADB to a virtual machine running PC Android?
I saw in some forum to use this but my VMs android having no specific IP.
How to i connect it??
Working with latest Android X86 4.2 Jelly Bean and Virtual Box
I have found Different ways to connect with Internet and adb
The easiest solution is just use NAT adapter that will directly connect you to internet if host is connected to internet but you won't get the adb connection with this setup Here you will get Public ip so you can't connect to Host computer
The easiest solution is just use Host Only Adapter
Note: The default Host Only adapter may not work due to DHCP server settings either create new HostOnlyAdapter
or run DHCP server
for existing Adapter()
You will have to take care in this case.
If you are using LAN for internet connection you shall use Bridge Adapter with your Ethernet card it will give you local ip and Virtual Machine will connect to Internet using host machine
Alternatively if you are with Wifi just do the same by selecting the Wifi adapter
For other type of connection you shall go with the same way
to check the ip Address just press Alt+F1 {for console Window} [To switch back to Graphics view press Alt+F7 ]
you will see the console window type netcfg
it will show the ip address
Now move on to you host run command prompt move to adb directory type
adb connect {your ip address}
adb connect 192.168.1.51
adb kill-server
adb start-server
you can check devices connected to adb
adb devices
这篇关于使用 VMWare/VirtualBox 之类的虚拟机进行调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!