使用VMWare / VirtualBox等虚拟机调试? [英] Debugging using a virtual machine like VMWare/VirtualBox?

查看:311
本文介绍了使用VMWare / VirtualBox等虚拟机调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Android应用程序,但表现为我的模拟器
我有一个 Android PC版本安装在VM-ware和虚拟框中

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

我可以将其用作模拟器吗?如果是这样,怎么办?如何将 ADB 连接到运行PC Android的虚拟机?

Can I use it as emulator? If so, how? How can I connect ADB to a virtual machine running PC Android?

我在某些论坛中看到使用这个但是我的 VMs android没有特定的IP。

I saw in some forum to use this but my VMs android having no specific IP.

如何连接?

推荐答案

解决方案:



我强烈建议使用Android x86 coz它比使用Android x86的Android模拟器快很多倍4.2你可以安装和使用任何应用程序,并使用Google Play与您的帐户同步,因为您使用平板电脑



使用最新的Android X86 4.2 Jelly Bean和虚拟框

Solution:

I would highly recommend to use Android x86 coz it many many times faster than Android emulator with Android x86 4.2 you can install and use any application with this and use "Google play" synch with your account as you do it with tablet

Working with latest Android X86 4.2 Jelly Bean and Virtual Box

我已经找到了不同的方式连接互联网和adb

I have found Different ways to connect with Internet and adb

最简单的解决方案只是使用NAT适配器,如果主机连接,将直接连接到互联网互联网,但你不会得到adb连接机智h这个设置
这里你会得到公共ip,所以你无法连接到主机计算机

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

注意:默认的仅主机适配器可能无法工作,因为DHCP服务器设置可能会创建新的 HostOnlyAdapter 或运行 DHCP服务器现有的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.

如果您使用局域网进行互联网连接,您将使用带有以太网卡的Bridge Adapter,它将给您本地ip,虚拟机将使用主机连接到Internet

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

或者如果您使用Wifi只要选择WiFi适配器,请执行相同操作。

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

检查ip地址只需按 Alt + F1 {控制台窗口} [切换回图形视图按 Alt + F7

to check the ip Address just press Alt+F1 {for console Window} [To switch back to Graphics view press Alt+F7 ]

您将看到控制台窗口类型 netcfg

you will see the console window type netcfg

它将显示ip地址

现在转到你主机运行命令提示符移动到adb目录
类型

Now move on to you host run command prompt move to adb directory type

 adb connect {your ip address}



例如



Example


adb connect 192.168.1.51

adb connect 192.168.1.51



注意:如果adb没有运行或响应,您可以执行以下操作。



Note: if adb is not running or responding you can do following

adb kill-server

adb start-server 

您可以检查连接到adb的设备

you can check devices connected to adb

adb devices

这篇关于使用VMWare / VirtualBox等虚拟机调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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