How to set up network on VirtualBox for Android 2.3
Solution 1
If you are going to be using VirtualBox, you need to use the eeepc.iso image not the asus-laptop.iso image.
Also, you will want to double check a few settings on your VM to make sure they are configured correctly:
- OS Type: Linux 2.6
- Memory: 256MB or more
- Sound: Sound Blaster 16
- Network: NAT or Bridged, the adapter must be PC-net-FAST III
From http://www.android-x86.org/documents/virtualboxhowto
I also found the following two things to be very helpful:
- Disable Mouse Integration (under the Machine Menu)
- Once the VM has started, open the app drawer and launch Settings. Find the ethernet section and enable it. You should see an eth0 device you can configure.
Solution 2
An answer for Android 4.0, which is a combination of Goyuix's advice and other information on the internet.
- download the ASUS eeepc iso
- Choose Linux 2.6 32bit and PC-net fast III in the VM settings in Virtual Box.
- Install the OS. Create a "bootable" "primary" partition, and install OS as "read write".
- In Android 4.0 there's no Ethernet configuration in the settings page. Instead:
- Hit Alt+F1 to bring up the console.
- Type "netcfg". You should see "eth0" in the list.
- Follow the instructions here. For the sake of SO community they're reproduced as below:
- execute
ifconfig eth0 up
. (Note it is not "ipconfig"!) - execute
dhcpcd -LK -d eth0
. - Find out the DNS server's address in your network. In a typical setup this is the "default gateway" address of
ipconfig
on the host machine. Now executesetprop net.dns1 192.168.56.1
, substitute the correct IP address. - Hit Alt+F7 to exit the console. It's still says "no connection" at the bottom right. But internet is working. Open the browser to verify.
davioooh
Hi, I'm David Castelletti. I like to create things with Java & Kotlin (❤). LinkedIn profile Personal Page + Blog (italian)
Updated on July 05, 2022Comments
-
davioooh almost 2 years
I'm trying to install a VirtualBox virtual machine for developing on Android 2.3 (Gingerbread) but I cannot properly configure the internet connection.
I followed many tutorials on the web and tried to apply some workaround suggested here on StackOverflow (for example Android x86 porting, unable to make it work ), but I still can't connect from my Android machine.
Some details:
- When I execute
netcfg
on android console it returns only thelo
interface (127.0.0.1). - The iso image I'm using is "android-x86-2.3-RC1-asus_laptop.iso" downloaded from http://www.android-x86.org/download. I use it on a Lenovo notebook with Windows 7 (but I've tried also on Ubuntu 11.04 Natty).
- I've tried to setup both host-only and bridged interface on my virtual machine, but they don't seem to work.
- When I execute
-
davioooh about 12 yearsWhich host OS are you using? and which VirtualBox version?
-
Daniel about 12 years<h1> OS: windows 7 and Fedora</h1> <br><br/> <h2> virtual box: 4.1.8 </h2>
-
gumuruh almost 10 yearsdoes anyone could share me a bit, in which configuration that eepc & asus android version that makes it differences while running the VBox?
-
AntonK almost 6 yearsThanks for the answer! Changing the adapter to PC-net-FAST III was the missing part in my setup.