Android x86 Virtual box with Internet and connection to adb?
I have Android x86 4.2 Installed on my Virtual Box.My main purpose is debug with eclipse and get internet on Android
Some how i am able to get internet and also able to connect from adb (of ADT) but not both at a time
i have tried several combination to get both but no luck
How i get Internet
I get internet when i use NAT in one of these 4 adapters
How i get connected with adb
I get connected with adb when connected to newly created Host Only adapter
note: the default host only adapter was not working
I have two questions:
First is how i will get both The Internet and connection to adbSecond is Can i get my bluetooth and Wifi device available to My Virtual box Android
Note: My Internet connection type is either 3G HSUPA using Modem or WiFi no LAN
Note: when both of them are connected then either of them works not both I have googled, Stacked, Virtual box site too but no luckInitially i was unable to connect to adb but I figured out the way i can!Please any one know the issue.
Answers
I'm using the very same setup with NAT mode. To connect via ADB:
- in VirtualBox Manager, right-click on your VM and select "show log"
- press Ctrl-F to initialize a search, type "DHCP". You will find several lines stating something like
NAT: DHCP offered IP address 10.0.2.15
– that's your IP, write it down ;) - select the "gear icon" in the same context menu to "change settings"
- go to the "network" tab, and click the "port forwarding" button
- add two rules to forward ports 5555 (adb) and 5554 (console) from the guest to your host machine. To make an easy rule for potential multiple Android-VMs, you can simply add a digit to the end – e.g. 5555→55551 and 5554→55541 for this machine (add a "2" for your second, if any).
- now on your host machine, execute the command
adb connect localhost:55551
Done. Execute any ADB commands as usual. You can use adb disconnect localhost:55551
if it gets in the way (e.g. if you're using some other device, and don't want to always specify which one to use with each ADB command).
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通