Iliyan Malchev | ce7d34c | 2012-04-03 13:06:15 -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 | |
Vladimir Chtchetkine | 2aced2d | 2011-04-05 17:28:43 -0700 | [diff] [blame] | 7 | on boot |
| 8 | setprop ARGH ARGH |
Iliyan Malchev | ce7d34c | 2012-04-03 13:06:15 -0700 | [diff] [blame] | 9 | setprop net.eth0.gw 10.0.2.2 |
Vladimir Chtchetkine | 2aced2d | 2011-04-05 17:28:43 -0700 | [diff] [blame] | 10 | setprop net.eth0.dns1 10.0.2.3 |
| 11 | setprop net.gprs.local-ip 10.0.2.15 |
| 12 | setprop ro.radio.use-ppp no |
| 13 | setprop ro.build.product generic |
| 14 | setprop ro.product.device generic |
| 15 | |
| 16 | # fake some battery state |
| 17 | setprop status.battery.state Slow |
| 18 | setprop status.battery.level 5 |
| 19 | setprop status.battery.level_raw 50 |
| 20 | setprop status.battery.level_scale 9 |
| 21 | |
| 22 | # disable some daemons the emulator doesn't want |
| 23 | stop dund |
| 24 | stop akmd |
| 25 | |
Iliyan Malchev | ce7d34c | 2012-04-03 13:06:15 -0700 | [diff] [blame] | 26 | # start essential services |
| 27 | start qemud |
| 28 | start goldfish-logcat |
| 29 | # start goldfish-setup |
| 30 | start netcfg |
| 31 | |
Vladimir Chtchetkine | 2aced2d | 2011-04-05 17:28:43 -0700 | [diff] [blame] | 32 | setprop ro.setupwizard.mode EMULATOR |
| 33 | |
Iliyan Malchev | ce7d34c | 2012-04-03 13:06:15 -0700 | [diff] [blame] | 34 | on fs |
| 35 | # mount sda partitions |
| 36 | mount ext4 /dev/block/sda6 /system |
| 37 | mount ext4 /dev/block/sda6 /system ro remount |
| 38 | mount ext4 /dev/block/sda7 /data nosuid nodev |
| 39 | mount ext4 /dev/block/sda8 /cache nosuid nodev |
| 40 | |
Vladimir Chtchetkine | 2aced2d | 2011-04-05 17:28:43 -0700 | [diff] [blame] | 41 | # enable Google-specific location features, |
| 42 | # like NetworkLocationProvider and LocationCollector |
| 43 | setprop ro.com.google.locationfeatures 1 |
| 44 | |
| 45 | # For the emulator, which bypasses Setup Wizard, you can specify |
| 46 | # account info for the device via these two properties. Google |
| 47 | # Login Service will insert these accounts into the database when |
| 48 | # it is created (ie, after a data wipe). |
| 49 | # |
| 50 | # setprop ro.config.hosted_account username@hosteddomain.org:password |
| 51 | # setprop ro.config.google_account username@gmail.com:password |
| 52 | # |
| 53 | # You MUST have a Google account on the device, and you MAY |
| 54 | # additionally have a hosted account. No other configuration is |
| 55 | # supported, and arbitrary breakage may result if you specify |
| 56 | # something else. |
| 57 | |
| 58 | service goldfish-setup /system/etc/init.goldfish.sh |
Iliyan Malchev | ce7d34c | 2012-04-03 13:06:15 -0700 | [diff] [blame] | 59 | user root |
| 60 | group root |
| 61 | oneshot |
| 62 | |
| 63 | # The qemu-props program is used to set various system |
| 64 | # properties on boot. It must be run early during the boot |
| 65 | # process to avoid race conditions with other daemons that |
| 66 | # might read them (e.g. surface flinger), so define it in |
| 67 | # class 'core' |
| 68 | # |
| 69 | service qemu-props /system/bin/qemu-props |
| 70 | class core |
| 71 | user root |
| 72 | group root |
| 73 | oneshot |
Vladimir Chtchetkine | 2aced2d | 2011-04-05 17:28:43 -0700 | [diff] [blame] | 74 | |
| 75 | service qemud /system/bin/qemud |
| 76 | socket qemud stream 666 |
| 77 | oneshot |
| 78 | |
| 79 | # -Q is a special logcat option that forces the |
| 80 | # program to check wether it runs on the emulator |
| 81 | # if it does, it redirects its output to the device |
| 82 | # named by the androidboot.console kernel option |
Iliyan Malchev | ce7d34c | 2012-04-03 13:06:15 -0700 | [diff] [blame] | 83 | # if not, it simply exits immediately |
Vladimir Chtchetkine | 2aced2d | 2011-04-05 17:28:43 -0700 | [diff] [blame] | 84 | |
| 85 | service goldfish-logcat /system/bin/logcat -Q |
| 86 | oneshot |
Iliyan Malchev | ce7d34c | 2012-04-03 13:06:15 -0700 | [diff] [blame] | 87 | |
| 88 | # Enable networking so that adb can connect |
| 89 | service netcfg /system/bin/netcfg eth0 dhcp |
| 90 | oneshot |