1#!/system/bin/sh 2 3# Setup networking when boot starts 4ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up 5route add default gw 10.0.2.2 dev eth0 6 7# ro.kernel.android.qemud is normally set when we 8# want the RIL (radio interface layer) to talk to 9# the emulated modem through qemud. 10# 11# However, this will be undefined in two cases: 12# 13# - When we want the RIL to talk directly to a guest 14# serial device that is connected to a host serial 15# device by the emulator. 16# 17# - We don't want to use the RIL but the VM-based 18# modem emulation that runs inside the guest system 19# instead. 20# 21# The following detects the latter case and sets up the 22# system for it. 23# 24qemud=`getprop ro.kernel.android.qemud` 25case "$qemud" in 26 "") 27 radio_ril=`getprop ro.kernel.android.ril` 28 case "$radio_ril" in 29 "") 30 # no need for the radio interface daemon 31 # telephony is entirely emulated in Java 32 setprop ro.radio.noril yes 33 stop ril-daemon 34 ;; 35 esac 36 ;; 37esac 38 39# Setup additionnal DNS servers if needed 40num_dns=`getprop ro.kernel.ndns` 41case "$num_dns" in 42 2) setprop net.eth0.dns2 10.0.2.4 43 ;; 44 3) setprop net.eth0.dns2 10.0.2.4 45 setprop net.eth0.dns3 10.0.2.5 46 ;; 47 4) setprop net.eth0.dns2 10.0.2.4 48 setprop net.eth0.dns3 10.0.2.5 49 setprop net.eth0.dns4 10.0.2.6 50 ;; 51esac 52 53# disable boot animation for a faster boot sequence when needed 54boot_anim=`getprop ro.kernel.android.bootanim` 55case "$boot_anim" in 56 0) setprop debug.sf.nobootanimation 1 57 ;; 58esac 59 60# set up the second interface (for inter-emulator connections) 61# if required 62my_ip=`getprop net.shared_net_ip` 63case "$my_ip" in 64 "") 65 ;; 66 *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up 67 ;; 68esac 69