44

我在我的 Windows 7 PC 上下载了适用于 Oracle VirtualBox ( http://www.genymotion.com/ ) 的Genymotion Android 模拟器,使用 Google Apps 设备创建了一个虚拟果冻豆。如何启用 ADB 访问它?在系统设置/开发人员选项中,我已经启用了“USB 调试”,但输入“adb devices”会显示已连接设备的空列表。尝试为此 VM 添加 USB 端口并重新启动 VM,但没有帮助。

格雷格

4

8 回答 8

45

我们需要使用 IP 地址连接到模拟器,因此查找正在运行的模拟器的 IP 地址(它显示在模拟器标题栏中)并使用以下内容:

亚行连接 192.168.56.102:5555

之后adb正常工作。您还可以通过启动“Genymotion Shell”并输入“设备列表”来找出正在运行的模拟器的 IP 地址

我还发现,当模拟器运行较长时间并且 ADB 与它断开连接时,有时我必须执行上述操作。

格雷格

于 2013-07-08T15:26:44.687 回答
39

如果您使用启动板(下载 VM 的 genymotion 二进制文件)启动 VM,并将 Android SDK 路径设置为应用程序参数,则连接是自动的,您无需运行adb connect

您可以在Genymotion Docs中找到信息。

于 2013-07-20T06:42:46.220 回答
8

Simply do this, with genymotion device running you can open Virtual Box , and see that there is a VM for you device , then go to network Settings of the VM, NAT and do port forwarding of local 5555 to remote 5555 screen attachedVirtual Box Nat Network Port forwarding

于 2016-01-04T15:51:48.690 回答
5

My working solution is:

cd /opt/genymobile/genymotion/tools
./adb shell

You have to use its own adb tool.

于 2020-06-12T14:38:31.437 回答
3

Connect didn't work for me, The problem was that Genymotion uses its own dk-tools and you need to change it to custom SDK tools.

More info: https://stackoverflow.com/a/26630862/4154438

于 2015-12-08T23:31:32.293 回答
2

Just Go To the Genymotion Installation Directory and then in folder tools you will see adb.exe there open command prompt here and run adb commands

于 2019-11-27T04:28:36.890 回答
1

I know it's way too late to answer this question, but I'll just post the solution that worked for me, in case someone runs into trouble again in the future.

I tried using genymotion's own adb tools and the original Android SDK ones, and even purging and reinstalling adb from my system, but nothing worked. I kept getting the error:

adb server is out of date. killing... cannot bind 'tcp:5037' ADB server didn't ACK *failed to start daemon* error:
So I tried adb connect [ip] as suggested here, but I didn't work either, the same error came up.

What finally worked for me was downloading ADT, and running adb directly from the downloaded folder, instead of the system-wide command. So adb devices will give me the error above, but /yourdownloadpath/adb devices works just fine for me.

Hope it helped.

于 2015-11-24T17:44:43.517 回答
-1

您可以获取 IP Genymotion 虚拟设备管理器,然后使用这样的命令

adb connect your ip
于 2014-07-28T02:42:39.910 回答