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