1on fs
2    mount_all /fstab.ranchu
3
4on early-init
5    mount debugfs debugfs /sys/kernel/debug mode=755
6
7on init
8
9    symlink /dev/goldfish_pipe /dev/android_pipe
10    symlink /dev/goldfish_pipe /dev/qemu_pipe
11
12on post-fs-data
13    setprop vold.post_fs_data_done 1
14
15on boot
16    setprop net.eth0.gw 10.0.2.2
17    setprop net.eth0.dns1 10.0.2.3
18    setprop net.gprs.local-ip 10.0.2.15
19    setprop ro.radio.use-ppp no
20    setprop ro.build.product generic
21    setprop ro.product.device generic
22    setprop ro.hardware.audio.primary goldfish
23    setprop ro.setupwizard.mode EMULATOR
24
25# fake some battery state
26    setprop status.battery.state Slow
27    setprop status.battery.level 5
28    setprop status.battery.level_raw  50
29    setprop status.battery.level_scale 9
30
31# set up the GPU caching
32    setprop ro.hwui.texture_cache_size 72
33    setprop ro.hwui.layer_cache_size 48
34    setprop ro.hwui.r_buffer_cache_size 8
35    setprop ro.hwui.path_cache_size 32
36    setprop ro.hwui.gradient_cache_size 1
37    setprop ro.hwui.drop_shadow_cache_size 6
38    setprop ro.hwui.texture_cache_flushrate 0.4
39    setprop ro.hwui.text_small_cache_width 1024
40    setprop ro.hwui.text_small_cache_height 1024
41    setprop ro.hwui.text_large_cache_width 2048
42    setprop ro.hwui.text_large_cache_height 1024
43
44# disable some daemons the emulator doesn't want
45    stop dund
46    stop akmd
47
48# start essential services
49# These were written for the classic emulator, but are applicable to ranchu
50    start goldfish-logcat
51#    start goldfish-setup
52
53
54# enable Google-specific location features,
55# like NetworkLocationProvider and LocationCollector
56    setprop ro.com.google.locationfeatures 1
57
58#emulator is not much useful before boot complete
59#start it later
60on property:sys.boot_completed=1
61    setprop sys.usb.config adb
62    start adbd
63    start goldfish-logcat
64
65on property:qemu.adbd=start
66    setprop sys.usb.config adb
67    start adbd
68    start goldfish-logcat
69
70# allow goldfish-setup to take wake lock
71    chown root system /sys/power/wake_lock
72    chown root system /sys/power/wake_unlock
73
74service ranchu-setup /system/bin/init.ranchu-core.sh
75    class core
76    user root
77    group root
78    oneshot
79
80service ranchu-net /system/bin/init.ranchu-net.sh
81    class late_start
82    user root
83    group root wakelock
84    oneshot
85
86# The qemu-props program is used to set various system
87# properties on boot. It must be run early during the boot
88# process to avoid race conditions with other daemons that
89# might read them (e.g. surface flinger), so define it in
90# class 'core'
91#
92service qemu-props /system/bin/qemu-props
93    class core
94    user root
95    group root
96    oneshot
97
98on property:qemu.logcat=start
99    start goldfish-logcat
100
101# -Q is a special logcat option that forces the
102# program to check wether it runs on the emulator
103# if it does, it redirects its output to the device
104# named by the androidboot.console kernel option
105# if not, is simply exits immediately
106# logd user added to prevent logcat from logging content.
107# log group added to support access to read logs socket.
108service goldfish-logcat /system/bin/logcat -Q
109    user logd
110    group log
111    oneshot
112
113service fingerprintd /system/bin/fingerprintd
114    class late_start
115    user system
116
117service bugreport /system/bin/dumpstate -d -p -B \
118        -o /data/data/com.android.shell/files/bugreports/bugreport
119    class main
120    disabled
121    oneshot
122    keycodes 114 115 116
123