The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 1 | #!/system/bin/sh |
| 2 | |
| 3 | ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up |
| 4 | route add default gw 10.0.2.2 dev eth0 |
| 5 | |
Simon Braunschmidt | 15681df | 2008-11-28 01:24:13 +0100 | [diff] [blame] | 6 | qemud=`getprop ro.kernel.android.qemud` |
| 7 | case "$qemud" in |
| 8 | "") |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 9 | radio_ril=`getprop ro.kernel.android.ril` |
Simon Braunschmidt | 15681df | 2008-11-28 01:24:13 +0100 | [diff] [blame] | 10 | case "$radio_ril" in |
| 11 | "") |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 12 | # no need for the radio interface daemon |
| 13 | # telephony is entirely emulated in Java |
| 14 | setprop ro.radio.noril yes |
| 15 | stop ril-daemon |
Simon Braunschmidt | 15681df | 2008-11-28 01:24:13 +0100 | [diff] [blame] | 16 | ;; |
| 17 | esac |
| 18 | ;; |
| 19 | esac |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 20 | |
| 21 | num_dns=`getprop ro.kernel.android.ndns` |
| 22 | case "$num_dns" in |
| 23 | 2) setprop net.eth0.dns2 10.0.2.4 |
| 24 | ;; |
| 25 | 3) setprop net.eth0.dns2 10.0.2.4 |
| 26 | setprop net.eth0.dns3 10.0.2.5 |
| 27 | ;; |
| 28 | 4) setprop net.eth0.dns2 10.0.2.4 |
| 29 | setprop net.eth0.dns3 10.0.2.5 |
| 30 | setprop net.eth0.dns4 10.0.2.6 |
| 31 | ;; |
| 32 | esac |
| 33 | |
| 34 | # disable boot animation for a faster boot sequence when needed |
| 35 | boot_anim=`getprop ro.kernel.android.bootanim` |
| 36 | case "$boot_anim" in |
| 37 | 0) setprop debug.sf.nobootanimation 1 |
| 38 | ;; |
| 39 | esac |
| 40 | |
David 'Digit' Turner | 653164b | 2009-05-26 13:16:59 +0200 | [diff] [blame] | 41 | # call 'qemu-props' to set system properties from the emulator. |
| 42 | # |
| 43 | /system/bin/qemu-props |
| 44 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 45 | # this line doesn't really do anything useful. however without it the |
| 46 | # previous setprop doesn't seem to apply for some really odd reason |
| 47 | setprop ro.qemu.init.completed 1 |
Dries Harnie | 2a74373 | 2010-01-18 17:44:33 +0100 | [diff] [blame] | 48 | |
| 49 | # set up the second interface (for inter-emulator connections) |
| 50 | # if required |
| 51 | my_ip=`getprop net.shared_net_ip` |
| 52 | case "$my_ip" in |
| 53 | "") |
| 54 | ;; |
| 55 | *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up |
| 56 | ;; |
| 57 | esac |