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