1on fs 2 mount_all /vendor/etc/fstab.ranchu 3 4on early-init 5 mount debugfs debugfs /sys/kernel/debug mode=755 6 mount proc proc /proc remount hidepid=2,gid=3009 7 8on init 9 # set RLIMIT_MEMLOCK to 8MB for BPF network statistics 10 setrlimit memlock 8388608 8388608 11 12 symlink /dev/goldfish_pipe /dev/android_pipe 13 symlink /dev/goldfish_pipe /dev/qemu_pipe 14 15 write /sys/block/zram0/comp_algorithm lz4 16 write /proc/sys/vm/page-cluster 0 17 18on post-fs-data 19 setprop vold.post_fs_data_done 1 20 mkdir /data/vendor/var 0755 root root 21 mkdir /data/vendor/var/run 0755 root root 22 mkdir /data/vendor/var/run/netns 0755 root root 23 24on zygote-start 25 # Create the directories used by the Wireless subsystem 26 mkdir /data/vendor/wifi 0771 wifi wifi 27 mkdir /data/vendor/wifi/wpa 0770 wifi wifi 28 mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi 29 30on boot 31 setprop ro.hardware.egl emulation 32 setprop debug.hwui.renderer opengl 33 setprop debug.hwui.renderer ${ro.kernel.qemu.uirenderer} 34 setprop ro.opengles.version ${ro.kernel.qemu.opengles.version} 35 setprop ro.zygote.disable_gl_preload 1 36 setprop dalvik.vm.heapsize 192m 37 setprop dalvik.vm.heapsize ${ro.kernel.qemu.dalvik.vm.heapsize} 38 chown root system /sys/power/wake_lock 39 chown root system /sys/power/wake_unlock 40 setprop ro.hardware.audio.primary goldfish 41 42 setprop wifi.interface wlan0 43 setprop wifi.direct.interface p2p-dev-wlan0 44 45 start goldfish-logcat 46 47 # Create a dummy USB gadget to allow sysfs testing 48 mkdir /config/usb_gadget/g1 0770 root root 49 50service ranchu-setup /vendor/bin/init.ranchu-core.sh 51 class core 52 user root 53 group root 54 oneshot 55 56on property:vendor.qemu.timezone=* 57 setprop persist.sys.timezone ${vendor.qemu.timezone} 58 59on property:vendor.qemu.android.bootanim=0 60 setprop debug.sf.nobootanimation 1 61 62on property:dev.bootcomplete=1 63 setprop vendor.qemu.dev.bootcomplete 1 64 65service ranchu-net /vendor/bin/init.ranchu-net.sh 66 class late_start 67 user root 68 group root wakelock wifi 69 oneshot 70 71service ipv6proxy /vendor/bin/execns router /vendor/bin/ipv6proxy -o eth0 -i wlan1,radio0-peer 72 user root 73 group root 74 disabled 75 76service emu_hostapd /vendor/bin/execns router /vendor/bin/hostapd_nohidl /data/vendor/wifi/hostapd/hostapd.conf 77 user root 78 group root wifi net_raw net_admin 79 disabled 80 81service dhcpserver /vendor/bin/execns router /vendor/bin/dhcpserver --exclude-interface eth0 82 user root 83 group root 84 disabled 85 86service netmgr /vendor/bin/execns router /vendor/bin/netmgr --if-prefix wlan1_ --network 192.168.232.9/29 87 user root 88 group root wifi 89 disabled 90 91service dhcpclient_rtr /vendor/bin/execns router /vendor/bin/dhcpclient -i eth0 92 user root 93 group root 94 disabled 95 96service dhcpclient_def /vendor/bin/dhcpclient -i eth0 97 user root 98 group root 99 disabled 100 101# The qemu-props program is used to set various system 102# properties on boot. It must be run early during the boot 103# process to avoid race conditions with other daemons that 104# might read them (e.g. surface flinger), so define it in 105# class 'core' 106# 107service qemu-props /vendor/bin/qemu-props 108 class core 109 user root 110 group root 111 oneshot 112 113# -Q is a special logcat option that forces the 114# program to check wether it runs on the emulator 115# if it does, it redirects its output to the device 116# named by the androidboot.console kernel option 117# if not, is simply exits immediately 118# logd user added to prevent logcat from logging content. 119# log group added to support access to read logs socket. 120service goldfish-logcat /system/bin/logcat -Q 121 user logd 122 group log 123 oneshot 124 125service bugreport /system/bin/dumpstate -d -p -B -z \ 126 -o /data/user_de/0/com.android.shell/files/bugreports/bugreport 127 class main 128 disabled 129 oneshot 130 keycodes 114 115 116 131 132service wpa_supplicant /vendor/bin/hw/wpa_supplicant -Dnl80211 -iwlan0 -c/vendor/etc/wifi/wpa_supplicant.conf -g@android:wpa_wlan0 133 socket wpa_wlan0 dgram 660 wifi wifi 134 group system wifi inet 135 oneshot 136 disabled 137 138# Enable zram only once per boot. From: 139 140# We want one opportunity per boot to enable zram, so we 141# use a trigger we fire from the above stanza. If 142# persist.sys.zram_enabled becomes true after boot, 143# we don't want to run swapon_all at that time. 144 145on property:sys.boot_completed=1 146 trigger sys-boot-completed-set 147 148on sys-boot-completed-set && property:persist.sys.zram_enabled=1 149 swapon_all /vendor/etc/fstab.${ro.hardware} 150