David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 1 | on fs |
| 2 | mount_all /fstab.ranchu |
| 3 | |
| 4 | on early-init |
| 5 | mount debugfs debugfs /sys/kernel/debug |
| 6 | |
| 7 | on init |
| 8 | # See storage config details at http://source.android.com/tech/storage/ |
| 9 | mkdir /storage/sdcard 0555 root root |
| 10 | |
| 11 | export EXTERNAL_STORAGE /storage/sdcard |
| 12 | |
| 13 | # Support legacy paths |
| 14 | #symlink /storage/sdcard /sdcard |
| 15 | #symlink /storage/sdcard /mnt/sdcard |
| 16 | |
David 'Digit' Turner | e3e6865 | 2014-09-24 00:35:08 +0200 | [diff] [blame] | 17 | symlink /dev/goldfish_pipe /dev/android_pipe |
| 18 | symlink /dev/goldfish_pipe /dev/qemu_pipe |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 19 | |
| 20 | on boot |
| 21 | setprop net.eth0.gw 10.0.2.2 |
| 22 | setprop net.eth0.dns1 10.0.2.3 |
| 23 | setprop net.gprs.local-ip 10.0.2.15 |
| 24 | setprop ro.radio.use-ppp no |
| 25 | setprop ro.build.product generic |
| 26 | setprop ro.product.device generic |
Yu Ning | 0657d89 | 2015-04-02 16:59:47 +0800 | [diff] [blame] | 27 | setprop ro.hardware.audio.primary goldfish |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 28 | |
| 29 | # fake some battery state |
| 30 | setprop status.battery.state Slow |
| 31 | setprop status.battery.level 5 |
| 32 | setprop status.battery.level_raw 50 |
| 33 | setprop status.battery.level_scale 9 |
| 34 | |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 35 | # disable some daemons the emulator doesn't want |
| 36 | stop dund |
| 37 | stop akmd |
| 38 | |
Yu Ning | 2cfff05 | 2015-05-19 14:43:55 +0800 | [diff] [blame] | 39 | # start essential services |
| 40 | # These were written for the classic emulator, but are applicable to ranchu |
| 41 | start goldfish-logcat |
| 42 | start goldfish-setup |
| 43 | |
Miroslav Tisma | 0668c61 | 2015-06-04 15:23:19 +0200 | [diff] [blame] | 44 | # enable dhcpcd on eth0 interface |
| 45 | service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL |
| 46 | class main |
| 47 | disabled |
| 48 | oneshot |
| 49 | |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 50 | # enable Google-specific location features, |
| 51 | # like NetworkLocationProvider and LocationCollector |
| 52 | setprop ro.com.google.locationfeatures 1 |
| 53 | |
Yu Ning | 2cfff05 | 2015-05-19 14:43:55 +0800 | [diff] [blame] | 54 | service goldfish-setup /system/etc/init.goldfish.sh |
| 55 | user root |
| 56 | group root |
| 57 | oneshot |
| 58 | |
Miroslav Tisma | b104c44 | 2015-09-23 18:32:27 +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 | |
Yu Ning | 2cfff05 | 2015-05-19 14:43:55 +0800 | [diff] [blame] | 71 | # -Q is a special logcat option that forces the |
| 72 | # program to check wether it runs on the emulator |
| 73 | # if it does, it redirects its output to the device |
| 74 | # named by the androidboot.console kernel option |
| 75 | # if not, is simply exits immediately |
| 76 | |
| 77 | service goldfish-logcat /system/bin/logcat -Q |
| 78 | oneshot |