Mike Lockwood | a2dffa9 | 2010-06-15 20:57:59 -0700 | [diff] [blame] | 1 | on early-init |
| 2 | export EXTERNAL_STORAGE /mnt/sdcard |
| 3 | mkdir /mnt/sdcard 0000 system system |
| 4 | # for backwards compatibility |
| 5 | symlink /mnt/sdcard /sdcard |
| 6 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 7 | on boot |
Stephen Smalley | 1eee419 | 2012-01-13 08:54:34 -0500 | [diff] [blame] | 8 | setsebool in_qemu=1 |
| 9 | restorecon /sys/qemu_trace/process_name |
| 10 | restorecon /sys/qemu_trace/state |
| 11 | restorecon /sys/qemu_trace/symbol |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 12 | setprop ARGH ARGH |
David 'Digit' Turner | eeeca4d | 2011-01-18 20:13:12 +0100 | [diff] [blame] | 13 | setprop net.eth0.gw 10.0.2.2 |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 14 | setprop net.eth0.dns1 10.0.2.3 |
| 15 | setprop net.gprs.local-ip 10.0.2.15 |
| 16 | setprop ro.radio.use-ppp no |
| 17 | setprop ro.build.product generic |
| 18 | setprop ro.product.device generic |
| 19 | |
| 20 | # fake some battery state |
| 21 | setprop status.battery.state Slow |
| 22 | setprop status.battery.level 5 |
| 23 | setprop status.battery.level_raw 50 |
| 24 | setprop status.battery.level_scale 9 |
| 25 | |
| 26 | # disable some daemons the emulator doesn't want |
| 27 | stop dund |
| 28 | stop akmd |
| 29 | |
David 'Digit' Turner | 95df887 | 2011-01-06 11:01:35 +0100 | [diff] [blame] | 30 | # start essential services |
| 31 | start qemud |
| 32 | start goldfish-logcat |
| 33 | start goldfish-setup |
| 34 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 35 | setprop ro.setupwizard.mode EMULATOR |
| 36 | |
| 37 | # enable Google-specific location features, |
| 38 | # like NetworkLocationProvider and LocationCollector |
| 39 | setprop ro.com.google.locationfeatures 1 |
| 40 | |
| 41 | # For the emulator, which bypasses Setup Wizard, you can specify |
| 42 | # account info for the device via these two properties. Google |
| 43 | # Login Service will insert these accounts into the database when |
| 44 | # it is created (ie, after a data wipe). |
| 45 | # |
| 46 | # setprop ro.config.hosted_account username@hosteddomain.org:password |
| 47 | # setprop ro.config.google_account username@gmail.com:password |
| 48 | # |
| 49 | # You MUST have a Google account on the device, and you MAY |
| 50 | # additionally have a hosted account. No other configuration is |
| 51 | # supported, and arbitrary breakage may result if you specify |
| 52 | # something else. |
| 53 | |
| 54 | service goldfish-setup /system/etc/init.goldfish.sh |
David 'Digit' Turner | 95df887 | 2011-01-06 11:01:35 +0100 | [diff] [blame] | 55 | user root |
| 56 | group root |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 57 | oneshot |
| 58 | |
David 'Digit' Turner | a503456 | 2011-09-16 00:19:40 +0200 | [diff] [blame] | 59 | # The qemu-props program is used to set various system |
| 60 | # properties on boot. It must be run early during the boot |
| 61 | # process to avoid race conditions with other daemons that |
| 62 | # might read them (e.g. surface flinger), so define it in |
| 63 | # class 'core' |
| 64 | # |
| 65 | service qemu-props /system/bin/qemu-props |
| 66 | class core |
| 67 | user root |
| 68 | group root |
| 69 | oneshot |
| 70 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 71 | service qemud /system/bin/qemud |
The Android Open Source Project | f614d64 | 2009-03-18 17:39:49 -0700 | [diff] [blame] | 72 | socket qemud stream 666 |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 73 | oneshot |
| 74 | |
| 75 | # -Q is a special logcat option that forces the |
| 76 | # program to check wether it runs on the emulator |
| 77 | # if it does, it redirects its output to the device |
| 78 | # named by the androidboot.console kernel option |
David 'Digit' Turner | 95df887 | 2011-01-06 11:01:35 +0100 | [diff] [blame] | 79 | # if not, is simply exits immediately |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 80 | |
| 81 | service goldfish-logcat /system/bin/logcat -Q |
| 82 | oneshot |