如何通过ADB连接从VirtualBox机器到托管Windows?
我在 windows10 中使用 Android Studio 2021.1.1,在 VirtualBox 6.13 中使用 Santoku,我想通过 ADB 工具从 Santoku 连接到在 Windows 中运行的 Android 模拟器。
我已经从 Windows 中的 adb 工具检查了 android 模拟器的 ip,我得到了模拟器的 ip 地址,即
C:\Users\x\AppData\Local\Android\Sdk\platform-tools>adb shell
root@android:/ # ifconfig eth0
eth0: ip 10.0.2.15 mask 255.255.255.0 flags [向上广播运行 组播]
当我在虚拟机中使用 adb connect 10.0.2.15:5554
时,它给了我
无法连接到设备
,如下所示:
我有一个关于问题是我需要在 Android 模拟器中将网络适配器从 NAT 设置为桥接,但我不知道如何在 SDK 中设置它。
I'm using Android Studio 2021.1.1 in windows10 and Santoku in VirtualBox 6.13 and i want to connect through ADB tool from Santoku to the Android Emulator that is running in windows.
I have check the ip for the android emulator from adb tool in windows and i got the ip address for the emulator which is
C:\Users\x\AppData\Local\Android\Sdk\platform-tools>adb shell
root@android:/ # ifconfig eth0
eth0: ip 10.0.2.15 mask 255.255.255.0 flags [up broadcast running
multicast]
And when i use adb connect 10.0.2.15:5554
in vm it gives me
unable to connect to device
after checked many solutions like these:
How to connect a socket to Genymotion device that is hosting a server?
I have an idea about the problem that is i need to set the network adapter from NAT to bridge in Android Emulator but I don't know how to set it up in SDK .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论