no network in Android x86 on VirtualBox 4.1.2
Asked Answered
E

7

34

My issue is nearly identical to this question. I tried those solution and none worked. But I am using a different Android x86 image. I'm using the ICS (4.0-RC1) asus_laptop image. (I tried a different image previously and couldn't get it to install.)

I installed VirtualBox 4.1.12 on Kubuntu 12.04. I followed these steps and installed the android-x86-4.0-RC1-asus_laptop.iso image in my VM. It boots up and works correctly except for networking.

Alt-F1 netcfg shows no interfaces up except the lo (127.0.0.1). eth0, which should be available, is not shown. That prevents me from trying the solution here.

New references I'm checking out:

Ellswerth answered 9/4, 2012 at 5:7 Comment(1)
Have you found any solution to this problemMakeup
L
26

The following works very good for me

sudo vi /etc/init.sh

add 4 lines below to init.sh

netcfg eth0 dhcp
echo nameserver <ip> > /etc/resolv.conf
dnsmasq 
setprop net.dns1 8.8.8.8

on virtualbox set the network interface to bridged (PCnet Fast III) and that's all.

Leuctra answered 13/4, 2012 at 2:55 Comment(10)
Which Androidx86 image are you using?Ellswerth
android-x86-4.0-RC1-eeepc.isoLeuctra
I added the above to /etc/init.sh and it didn't work. Then I changed the network adapter to (bridged) PCnet-FAST III (Am79C973) rebooted and BINGO! I also needed to add "setprop net.dns1 8.8.8.8" to the init.sh file for the DNS (e.g. ping google.com) to workIncest
Just to clarify because I stumbled over it: All three lines need to be added to init.shThreaten
Using this android-x86-4.0-RC2-eeepc.iso I only needed to add setprop net.dsn1 8.8.8.8 to the init.sh, reboot and it worked. Btw, using vbox bridge.Cholla
What is the dsnmasq? It only gives me the lack of a .pid file error.Cholla
Thanks, also confirming that you only need setprop net.dsn1 8.8.8.8 in init.sh, after the interface is set to bridged. Works like a charm. It still says no internet connection, but the browser works fine.Orlop
"sudo not found" what do i do abt this?Treadle
@usman Write only "su" + Intro. After that, you are logged in as administrator, and you can directly write "vi /etc/init.sh".Vincevincelette
you said echo nameserver <ip> >, but What <ip> should we put here ? Gateway ? machine Ip ? DNS ?Misfire
V
16

Update: If Android x86 does not work well for you, you might want to look at AndroVM. I run it in VirtualBox and have had no hardware related issues.

Real Answer:

Somewhat of a follow-up answer since I can't add comments yet. I think getting this setup is highly dependent on your host hardware. I am not using hardware that perfectly fits any of the current ISOs. So I tested all of them with all Ethernet settings to see what would work.

On a Dell Latitude D820 here is what I got:

  • eeepc - Bridged Adapter with PCnet-PCI II
  • tegav2 - NAT adapter with PCnet-PCI III
  • amd_brazos - No CPU support
  • asus_laptop - No eth0 option for any Ethernet adapter setting
  • s104t - Would not boot

For the two ISOs that would work for me (eeepc and tegav2), I added the following two lines to /etc/init.sh (as per the other answer)

netcfg eth0 dhcp
setprop net.dns1 8.8.8.8
Vulturine answered 13/6, 2012 at 18:21 Comment(4)
Yeah, I couldn't get anything to work with the ASUS tablet either, sadly.Protolanguage
"sudo not found" what do i do abt this?Treadle
@usman Sorry, never had that issue. I suggest you try the Android x86 forum: groups.google.com/forum/#!forum/android-x86Vulturine
Does androvm support libhoudini?Dardani
T
2

For me the solution of user1330614 worked very well. Another nice writeup for the problem can be found here: http://davematthew.blogspot.de/2012/04/android-x86-ics-on-virtualbox.html

Threaten answered 13/6, 2012 at 9:46 Comment(0)
V
1

try this one

VBoxManage modifyvm "Your Android VB name" --natpf1 adb,tcp,*,5555,*,5555
Vicinage answered 9/4, 2012 at 5:18 Comment(1)
Thanks, but that didn't help. Same issue: netcfg doesn't show eth0 or any usable iface.Ellswerth
S
1

If you can't edit /etc/init.sh or /etc/init.androVM.sh and the error is the read-only file (despite being su) you can just write the following as superuser on the commandline:

setprop net.dns1 10.0.0.138

or any other IP, this is often the local router (capable of DNS). Check your network connection details for getting this IP.

The drawback is, that you have to do this every time, but it is not very time-consuming.

Slugabed answered 6/4, 2014 at 9:5 Comment(0)
Z
1

I had to enable WiFi in the Android settings and select the virtual network created by VirtualBox. In my case it was called "VirtWifi", which is a fake WiFi network using my computer network.

Zoroastrian answered 18/2, 2020 at 10:59 Comment(0)
A
0

Some sources in the net says you should use the PCnet-Fast III either in bridged mode or NAT in your VBox Machine settings. Just give it a try. This is a guide i found, but to be sincere, i am new to Android on VBox (and to Android at all) and i didn't test it myself.

Aphyllous answered 10/4, 2012 at 3:16 Comment(1)
That's exactly what I did. I tried both bridged mode and NAT. I could not get either one to work.Ellswerth

© 2022 - 2024 — McMap. All rights reserved.