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
15
16on boot
17    chown root system /sys/power/wake_lock
18    chown root system /sys/power/wake_unlock
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
70service ranchu-setup /vendor/bin/init.ranchu-core.sh
71    class core
72    user root
73    group root
74    oneshot
75
76service ranchu-net /vendor/bin/init.ranchu-net.sh
77    class late_start
78    user root
79    group root wakelock
80    oneshot
81
82# The qemu-props program is used to set various system
83# properties on boot. It must be run early during the boot
84# process to avoid race conditions with other daemons that
85# might read them (e.g. surface flinger), so define it in
86# class 'core'
87#
88service qemu-props /vendor/bin/qemu-props
89    class core
90    user root
91    group root
92    oneshot
93
94on property:qemu.logcat=start
95    start goldfish-logcat
96
97# -Q is a special logcat option that forces the
98# program to check wether it runs on the emulator
99# if it does, it redirects its output to the device
100# named by the androidboot.console kernel option
101# if not, is simply exits immediately
102# logd user added to prevent logcat from logging content.
103# log group added to support access to read logs socket.
104service goldfish-logcat /system/bin/logcat -Q
105    user logd
106    group log
107    oneshot
108
109service fingerprintd /system/bin/fingerprintd
110    class late_start
111    user system
112
113service bugreport /system/bin/dumpstate -d -p -B \
114        -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
115    class main
116    disabled
117    oneshot
118    keycodes 114 115 116
119