在Eclipse中虚框机器人仿真 [英] android emulation on virtual box in eclipse

查看:178
本文介绍了在Eclipse中虚框机器人仿真的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有运行Android VirtualBox上,用它作为第二手机与蓝牙USB记忆棒,将它与一个真正的设备连接。

我有2个问题:

  1. 是否有可能得到与DDMS接入日食像真正的设备到虚拟盒版?

  2. 我怎样才能在虚拟中的android安装的apk文件包?

我希望somoeone能帮助我。

谢谢!

解决方案
  1. preSS <大骨节病>替代 + <大骨节病> F1 键入加上netcfg 记下IP地址和preSS <大骨节病>替代 + <大骨节病> F7
  2. 运行 ADB连接&LT; virtual_machine_ip&GT; 在你的主机上的终端

您应看到设备ADT,并能够在其上运行的应用程序。

编辑:这将工作,如果你设置为使用桥接或仅主机适配器:为NAT,必须设置端口转发第一:

  1. cd到Windows上的VirtualBox的文件夹(C:/ Program Files文件/甲骨文/ VirtualBox的)
  2. 设置了通过命令行端口转发规则,如下所示: VBoxManage modifyvm&LT; name_of_your_android_vm&GT; --natpf1亚洲开发银行,TCP,*,5555 *,5555
  3. 运行你的虚拟机
  4. 连接到您的虚拟机键入 ADB连接本地主机:5555
  5. 在Eclipse中启动应用程序,您将看到本地主机:5555作为一个可用的AVD

I have android running on virtualbox, to use it as a second cell phone with an bluetooth usb stick, to connect it with a real device.

I have 2 Questions:

  1. Is it possible to get access with DDMS in eclipse like the real device to the virtual box version?

  2. How can i install in .apk package on the virtual box android?

I hope somoeone can help me.

Thanks!

解决方案

  1. Press Alt+F1, type netcfg write down the IP address and press Alt+F7.
  2. Run adb connect <virtual_machine_ip> in terminal on your host machine.

You should then see the device in ADT and be able to run your applications on it.

Edit: This will work if you are set up to use bridged or host-only adapters: for NAT you must set up port forwarding first:

  1. cd to your VirtualBox folder on Windows: (C:/Program Files/Oracle/VirtualBox)
  2. set up a port forwarding rule via command line like so: VBoxManage modifyvm <name_of_your_android_vm> --natpf1 adb,tcp,*,5555,*,5555
  3. Run your vm
  4. Connect to your VM by typing adb connect localhost:5555
  5. Launch your application in Eclipse and you will see localhost:5555 as an available AVD

这篇关于在Eclipse中虚框机器人仿真的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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