Network unavailable in UI (androidx86 6.0-r1, static IP, vSphere vm, no NAT)

593 views
Skip to first unread message

Kevin Freeman

unread,
Sep 27, 2016, 10:38:39 AM9/27/16
to Android-x86
How do I get the GUI to use a static network?

Since NAT is unavailable in vSphere I added a few lines near the bottom of init.sh to assign a static IP and enable DNS:

ifconfig eth0 10.10.128.210 netmask 255.255.254.0

busybox route add default gw 10.0.128.1 dev eth0

ndc resolver setnetdns eth0 "" 10.0.128.10 10.0.228.10

ndc network set default eth0


After boot I am able to ping external IP addresses and dns names via the console:
#ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

64 bytes from 8.8.8.8: icmp_seq=1 ttl=45 time=16.7ms


#ping www.yahoo.com

PING fd-fp3.wg1.b.yahoo.com (98.139.180.149) 56(84) bytes of data.

64 bytes from ir1.fp.vip.bf1.yahoo.com (98.139.180.149): icmp_seq=1 ttl=47 time=27.4ms


But the UI does not see the network.  The browser reports net::ERR_NAME_NOT_RESOLVED when I open it to its default page, and also when I type in a different URL.

When I type in an IP address, the browser reports net::ERR_ADDRESS_UNREACHABLE.

Play Store reports: "You don't have a network connection."

How can I get the UI to see the network connection that is available in the console?

NOTE: If I add the commands:
setprop net.dns1 10.0.128.10
setprop net.dns2 10.0.228.10

to init.sh, after booting init uses 97% CPU and continually logs to the console about 4 times per second, and the GUI still does not see the network:
[timestamp] init: Starting service 'exec 1446 (/system/bin/logwrapper)' ...
[timestamp] init: Service 'exec 1446 (/system/bin/logwrapper)' (pid 17497) exited with status 0

Executing the 2 setprop lines above in the console after boot does not cause a loop, but also does not enable the UI to find the network.

Dave Waugh

unread,
Oct 3, 2016, 12:16:01 AM10/3/16
to Android-x86
I only ever managed to get Android x86 6.0r1 to work in a vmware VM with DHCP. No configuration was needed, it worked out of the box.

Remix OS (a related project) has an ethernet configuration panel in settings that you can use to set up a static IP, gateway and DNS. Hopefully this will be backported to Android x86 in the future.

おとめ座ひなたぼっこ

unread,
Nov 27, 2017, 12:29:04 AM11/27/17
to Android-x86
Sorry for hijack, I have same problem cm12.1
dns ok
$netd resolver rndis0 8.8.8.8
in terminal $wget http://27.3.221.248:9080/live/getimage          work fine
also $ ping microsoft.com fine
but browser says
net::ERR_ADDRESS_UNREACHABLE
any news?
Reply all
Reply to author
Forward
0 new messages