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.