我在我的 Windows 7 PC 上下载了适用于 Oracle VirtualBox ( http://www.genymotion.com/ ) 的Genymotion Android 模拟器,使用 Google Apps 设备创建了一个虚拟果冻豆。如何启用 ADB 访问它?在系统设置/开发人员选项中,我已经启用了“USB 调试”,但输入“adb devices”会显示已连接设备的空列表。尝试为此 VM 添加 USB 端口并重新启动 VM,但没有帮助。
格雷格
我在我的 Windows 7 PC 上下载了适用于 Oracle VirtualBox ( http://www.genymotion.com/ ) 的Genymotion Android 模拟器,使用 Google Apps 设备创建了一个虚拟果冻豆。如何启用 ADB 访问它?在系统设置/开发人员选项中,我已经启用了“USB 调试”,但输入“adb devices”会显示已连接设备的空列表。尝试为此 VM 添加 USB 端口并重新启动 VM,但没有帮助。
格雷格
我们需要使用 IP 地址连接到模拟器,因此查找正在运行的模拟器的 IP 地址(它显示在模拟器标题栏中)并使用以下内容:
亚行连接 192.168.56.102:5555
之后adb
正常工作。您还可以通过启动“Genymotion Shell”并输入“设备列表”来找出正在运行的模拟器的 IP 地址
我还发现,当模拟器运行较长时间并且 ADB 与它断开连接时,有时我必须执行上述操作。
格雷格
如果您使用启动板(下载 VM 的 genymotion 二进制文件)启动 VM,并将 Android SDK 路径设置为应用程序参数,则连接是自动的,您无需运行adb connect
您可以在Genymotion Docs中找到信息。
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
My working solution is:
cd /opt/genymobile/genymotion/tools
./adb shell
You have to use its own adb tool.
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
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
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.
您可以获取 IP Genymotion 虚拟设备管理器,然后使用这样的命令
adb connect your ip