diff options
Diffstat (limited to 'rootdir/etc')
| -rw-r--r-- | rootdir/etc/init.goldfish.rc | 16 | ||||
| -rwxr-xr-x | rootdir/etc/init.goldfish.sh | 37 | ||||
| -rw-r--r-- | rootdir/etc/ueventd.goldfish.rc | 3 |
3 files changed, 44 insertions, 12 deletions
diff --git a/rootdir/etc/init.goldfish.rc b/rootdir/etc/init.goldfish.rc index 569555c..1ac09ca 100644 --- a/rootdir/etc/init.goldfish.rc +++ b/rootdir/etc/init.goldfish.rc @@ -1,5 +1,12 @@ +on early-init + export EXTERNAL_STORAGE /mnt/sdcard + mkdir /mnt/sdcard 0000 system system + # for backwards compatibility + symlink /mnt/sdcard /sdcard + on boot setprop ARGH ARGH + setprop net.eth0.gw 10.0.2.2 setprop net.eth0.dns1 10.0.2.3 setprop net.gprs.local-ip 10.0.2.15 setprop ro.radio.use-ppp no @@ -16,6 +23,11 @@ on boot stop dund stop akmd +# start essential services + start qemud + start goldfish-logcat + start goldfish-setup + setprop ro.setupwizard.mode EMULATOR # enable Google-specific location features, @@ -36,6 +48,8 @@ on boot # something else. service goldfish-setup /system/etc/init.goldfish.sh + user root + group root oneshot service qemud /system/bin/qemud @@ -46,7 +60,7 @@ service qemud /system/bin/qemud # program to check wether it runs on the emulator # if it does, it redirects its output to the device # named by the androidboot.console kernel option -# if not, is simply exit immediately +# if not, is simply exits immediately service goldfish-logcat /system/bin/logcat -Q oneshot diff --git a/rootdir/etc/init.goldfish.sh b/rootdir/etc/init.goldfish.sh index cfa2c82..1156dd7 100755 --- a/rootdir/etc/init.goldfish.sh +++ b/rootdir/etc/init.goldfish.sh @@ -1,8 +1,26 @@ #!/system/bin/sh +# Setup networking when boot starts ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up route add default gw 10.0.2.2 dev eth0 +# ro.kernel.android.qemud is normally set when we +# want the RIL (radio interface layer) to talk to +# the emulated modem through qemud. +# +# However, this will be undefined in two cases: +# +# - When we want the RIL to talk directly to a guest +# serial device that is connected to a host serial +# device by the emulator. +# +# - We don't want to use the RIL but the VM-based +# modem emulation that runs inside the guest system +# instead. +# +# The following detects the latter case and sets up the +# system for it. +# qemud=`getprop ro.kernel.android.qemud` case "$qemud" in "") @@ -18,17 +36,18 @@ case "$qemud" in ;; esac -num_dns=`getprop ro.kernel.android.ndns` +# Setup additionnal DNS servers if needed +num_dns=`getprop ro.kernel.ndns` case "$num_dns" in 2) setprop net.eth0.dns2 10.0.2.4 - ;; + ;; 3) setprop net.eth0.dns2 10.0.2.4 - setprop net.eth0.dns3 10.0.2.5 - ;; + setprop net.eth0.dns3 10.0.2.5 + ;; 4) setprop net.eth0.dns2 10.0.2.4 - setprop net.eth0.dns3 10.0.2.5 - setprop net.eth0.dns4 10.0.2.6 - ;; + setprop net.eth0.dns3 10.0.2.5 + setprop net.eth0.dns4 10.0.2.6 + ;; esac # disable boot animation for a faster boot sequence when needed @@ -42,10 +61,6 @@ esac # /system/bin/qemu-props -# this line doesn't really do anything useful. however without it the -# previous setprop doesn't seem to apply for some really odd reason -setprop ro.qemu.init.completed 1 - # set up the second interface (for inter-emulator connections) # if required my_ip=`getprop net.shared_net_ip` diff --git a/rootdir/etc/ueventd.goldfish.rc b/rootdir/etc/ueventd.goldfish.rc index f4262fb..8de7049 100644 --- a/rootdir/etc/ueventd.goldfish.rc +++ b/rootdir/etc/ueventd.goldfish.rc @@ -1,2 +1,5 @@ +# These settings are specific to running under the Android emulator /dev/qemu_trace 0666 system system /dev/qemu_pipe 0666 system system +/dev/ttyS* 0666 system system +/proc 0666 system system |
