David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 1 | on fs |
Isaac Chen | bacbda6 | 2018-03-21 10:46:57 +0800 | [diff] [blame] | 2 | mount_all /vendor/etc/fstab.ranchu |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 3 | |
| 4 | on early-init |
Joshua Lang | 2ac3d36 | 2016-05-06 14:33:39 -0700 | [diff] [blame] | 5 | mount debugfs debugfs /sys/kernel/debug mode=755 |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 6 | |
| 7 | on init |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 8 | |
David 'Digit' Turner | e3e6865 | 2014-09-24 00:35:08 +0200 | [diff] [blame] | 9 | symlink /dev/goldfish_pipe /dev/android_pipe |
| 10 | symlink /dev/goldfish_pipe /dev/qemu_pipe |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 11 | |
Lingfeng Yang | 60b53d4 | 2019-04-05 12:08:25 -0700 | [diff] [blame] | 12 | write /sys/block/zram0/comp_algorithm lz4 |
| 13 | write /proc/sys/vm/page-cluster 0 |
| 14 | |
bohu | 0319174 | 2017-04-24 20:36:25 -0700 | [diff] [blame] | 15 | on post-fs-data |
| 16 | setprop vold.post_fs_data_done 1 |
Bjoern Johansson | b1839e9 | 2018-03-19 11:18:30 -0700 | [diff] [blame] | 17 | mkdir /data/vendor/var 0755 root root |
| 18 | mkdir /data/vendor/var/run 0755 root root |
| 19 | mkdir /data/vendor/var/run/netns 0755 root root |
bohu | b7cfb88 | 2017-08-29 12:21:07 -0700 | [diff] [blame] | 20 | |
Bjoern Johansson | 836f41d | 2018-06-13 10:57:09 -0700 | [diff] [blame] | 21 | on zygote-start |
| 22 | # Create the directories used by the Wireless subsystem |
| 23 | mkdir /data/vendor/wifi 0771 wifi wifi |
| 24 | mkdir /data/vendor/wifi/wpa 0770 wifi wifi |
| 25 | mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi |
| 26 | |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 27 | on boot |
Lingfeng Yang | bd42588 | 2018-04-23 13:58:17 -0700 | [diff] [blame] | 28 | setprop debug.hwui.renderer opengl |
| 29 | setprop debug.hwui.renderer ${ro.kernel.qemu.uirenderer} |
bohu | dda8a16 | 2018-02-23 09:09:54 -0800 | [diff] [blame] | 30 | setprop ro.opengles.version ${ro.kernel.qemu.opengles.version} |
bohu | dcf9201 | 2018-05-21 09:19:55 -0700 | [diff] [blame] | 31 | setprop dalvik.vm.heapsize 192m |
huans | 4c8a39f | 2018-05-11 11:21:47 -0700 | [diff] [blame] | 32 | setprop dalvik.vm.heapsize ${ro.kernel.qemu.dalvik.vm.heapsize} |
bohu | f1fa591 | 2017-12-14 21:03:50 -0800 | [diff] [blame] | 33 | chown root system /sys/power/wake_lock |
| 34 | chown root system /sys/power/wake_unlock |
Yu Ning | 0657d89 | 2015-04-02 16:59:47 +0800 | [diff] [blame] | 35 | setprop ro.hardware.audio.primary goldfish |
Yurii Zubrytskyi | 6fc69c7 | 2016-05-13 14:13:32 -0700 | [diff] [blame] | 36 | |
Bjoern Johansson | 00455fa | 2017-02-09 22:37:51 -0800 | [diff] [blame] | 37 | setprop wifi.interface wlan0 |
Bjoern Johansson | 836f41d | 2018-06-13 10:57:09 -0700 | [diff] [blame] | 38 | setprop wifi.direct.interface p2p-dev-wlan0 |
Miroslav Tisma | 0668c61 | 2015-06-04 15:23:19 +0200 | [diff] [blame] | 39 | |
bohu | 317e162 | 2018-06-07 12:48:03 -0700 | [diff] [blame] | 40 | start goldfish-logcat |
| 41 | |
Kenneth Magic | 9bd45e6 | 2018-08-08 12:31:32 -0700 | [diff] [blame] | 42 | # Create a dummy USB gadget to allow sysfs testing |
| 43 | mkdir /config/usb_gadget/g1 0770 root root |
David 'Digit' Turner | d0fead3 | 2014-08-21 10:41:24 +0200 | [diff] [blame] | 44 | |
bohu | e34269e | 2017-07-03 22:03:15 -0700 | [diff] [blame] | 45 | service ranchu-setup /vendor/bin/init.ranchu-core.sh |
bohu | 0319174 | 2017-04-24 20:36:25 -0700 | [diff] [blame] | 46 | class core |
| 47 | user root |
| 48 | group root |
| 49 | oneshot |
| 50 | |
bohu | 317e162 | 2018-06-07 12:48:03 -0700 | [diff] [blame] | 51 | on property:vendor.qemu.timezone=* |
| 52 | setprop persist.sys.timezone ${vendor.qemu.timezone} |
Weilun Du | 1a678f5 | 2018-02-20 18:00:55 -0800 | [diff] [blame] | 53 | |
bohu | aa95367 | 2018-06-06 15:00:41 -0700 | [diff] [blame] | 54 | on property:vendor.qemu.android.bootanim=0 |
huans | 58ea3df | 2018-05-25 10:51:17 -0700 | [diff] [blame] | 55 | setprop debug.sf.nobootanimation 1 |
| 56 | |
bohu | 317e162 | 2018-06-07 12:48:03 -0700 | [diff] [blame] | 57 | on property:dev.bootcomplete=1 |
| 58 | setprop vendor.qemu.dev.bootcomplete 1 |
| 59 | |
bohu | e34269e | 2017-07-03 22:03:15 -0700 | [diff] [blame] | 60 | service ranchu-net /vendor/bin/init.ranchu-net.sh |
bohu | 0319174 | 2017-04-24 20:36:25 -0700 | [diff] [blame] | 61 | class late_start |
Yu Ning | 2cfff05 | 2015-05-19 14:43:55 +0800 | [diff] [blame] | 62 | user root |
Bjoern Johansson | 873eee6 | 2018-09-06 15:39:12 -0700 | [diff] [blame] | 63 | group root wakelock wifi |
Yu Ning | 2cfff05 | 2015-05-19 14:43:55 +0800 | [diff] [blame] | 64 | oneshot |
| 65 | |
Bjoern Johansson | d154a21 | 2017-08-31 13:48:45 -0700 | [diff] [blame] | 66 | service ipv6proxy /vendor/bin/execns router /vendor/bin/ipv6proxy -o eth0 -i wlan1,radio0-peer |
Bjoern Johansson | 00455fa | 2017-02-09 22:37:51 -0800 | [diff] [blame] | 67 | user root |
| 68 | group root |
| 69 | disabled |
| 70 | |
Roman Kiryanov | 63783d8 | 2018-10-30 14:35:19 -0700 | [diff] [blame] | 71 | service emu_hostapd /vendor/bin/execns router /vendor/bin/hostapd_nohidl /data/vendor/wifi/hostapd/hostapd.conf |
Bjoern Johansson | 00455fa | 2017-02-09 22:37:51 -0800 | [diff] [blame] | 72 | user root |
Bjoern Johansson | 880e708 | 2018-05-15 15:04:53 -0700 | [diff] [blame] | 73 | group root wifi net_raw net_admin |
Bjoern Johansson | 00455fa | 2017-02-09 22:37:51 -0800 | [diff] [blame] | 74 | disabled |
| 75 | |
Bjoern Johansson | f52fc12 | 2018-09-06 15:29:22 -0700 | [diff] [blame] | 76 | service dhcpserver /vendor/bin/execns router /vendor/bin/dhcpserver --exclude-interface eth0 |
Bjoern Johansson | bf93db3 | 2017-07-14 15:47:19 -0700 | [diff] [blame] | 77 | user root |
| 78 | group root |
| 79 | disabled |
| 80 | |
Bjoern Johansson | 873eee6 | 2018-09-06 15:39:12 -0700 | [diff] [blame] | 81 | service netmgr /vendor/bin/execns router /vendor/bin/netmgr --if-prefix wlan1_ --network 192.168.232.9/29 |
| 82 | user root |
| 83 | group root wifi |
| 84 | disabled |
| 85 | |
Bjoern Johansson | d154a21 | 2017-08-31 13:48:45 -0700 | [diff] [blame] | 86 | service dhcpclient_rtr /vendor/bin/execns router /vendor/bin/dhcpclient -i eth0 |
Bjoern Johansson | bf93db3 | 2017-07-14 15:47:19 -0700 | [diff] [blame] | 87 | user root |
| 88 | group root |
| 89 | disabled |
| 90 | |
Bjoern Johansson | d154a21 | 2017-08-31 13:48:45 -0700 | [diff] [blame] | 91 | service dhcpclient_def /vendor/bin/dhcpclient -i eth0 |
Bjoern Johansson | 00455fa | 2017-02-09 22:37:51 -0800 | [diff] [blame] | 92 | user root |
| 93 | group root |
| 94 | disabled |
| 95 | |
Miroslav Tisma | b104c44 | 2015-09-23 18:32:27 +0200 | [diff] [blame] | 96 | # The qemu-props program is used to set various system |
| 97 | # properties on boot. It must be run early during the boot |
| 98 | # process to avoid race conditions with other daemons that |
| 99 | # might read them (e.g. surface flinger), so define it in |
| 100 | # class 'core' |
| 101 | # |
bohu | b7cfb88 | 2017-08-29 12:21:07 -0700 | [diff] [blame] | 102 | service qemu-props /vendor/bin/qemu-props |
Miroslav Tisma | b104c44 | 2015-09-23 18:32:27 +0200 | [diff] [blame] | 103 | class core |
| 104 | user root |
| 105 | group root |
| 106 | oneshot |
| 107 | |
Yu Ning | 2cfff05 | 2015-05-19 14:43:55 +0800 | [diff] [blame] | 108 | # -Q is a special logcat option that forces the |
| 109 | # program to check wether it runs on the emulator |
| 110 | # if it does, it redirects its output to the device |
| 111 | # named by the androidboot.console kernel option |
| 112 | # if not, is simply exits immediately |
bohu | 7197f73 | 2017-03-07 14:10:50 -0800 | [diff] [blame] | 113 | # logd user added to prevent logcat from logging content. |
| 114 | # log group added to support access to read logs socket. |
Yu Ning | 2cfff05 | 2015-05-19 14:43:55 +0800 | [diff] [blame] | 115 | service goldfish-logcat /system/bin/logcat -Q |
bohu | 7197f73 | 2017-03-07 14:10:50 -0800 | [diff] [blame] | 116 | user logd |
| 117 | group log |
Yu Ning | 2cfff05 | 2015-05-19 14:43:55 +0800 | [diff] [blame] | 118 | oneshot |
bohu | 2a10726 | 2015-11-30 17:26:30 -0800 | [diff] [blame] | 119 | |
Weilun Du | 197ae93 | 2018-03-01 21:05:02 -0800 | [diff] [blame] | 120 | service bugreport /system/bin/dumpstate -d -p -B -z \ |
bohu | b7cfb88 | 2017-08-29 12:21:07 -0700 | [diff] [blame] | 121 | -o /data/user_de/0/com.android.shell/files/bugreports/bugreport |
bohu | 0319174 | 2017-04-24 20:36:25 -0700 | [diff] [blame] | 122 | class main |
| 123 | disabled |
| 124 | oneshot |
| 125 | keycodes 114 115 116 |
Bjoern Johansson | 00455fa | 2017-02-09 22:37:51 -0800 | [diff] [blame] | 126 | |
Bjoern Johansson | d154a21 | 2017-08-31 13:48:45 -0700 | [diff] [blame] | 127 | service wpa_supplicant /vendor/bin/hw/wpa_supplicant -Dnl80211 -iwlan0 -c/vendor/etc/wifi/wpa_supplicant.conf -g@android:wpa_wlan0 |
Bjoern Johansson | 00455fa | 2017-02-09 22:37:51 -0800 | [diff] [blame] | 128 | socket wpa_wlan0 dgram 660 wifi wifi |
| 129 | group system wifi inet |
| 130 | oneshot |
| 131 | disabled |
Lingfeng Yang | 60b53d4 | 2019-04-05 12:08:25 -0700 | [diff] [blame] | 132 | |
| 133 | # Enable zram only once per boot. From: |
| 134 | |
| 135 | # We want one opportunity per boot to enable zram, so we |
| 136 | # use a trigger we fire from the above stanza. If |
| 137 | # persist.sys.zram_enabled becomes true after boot, |
| 138 | # we don't want to run swapon_all at that time. |
| 139 | |
| 140 | on property:sys.boot_completed=1 |
| 141 | trigger sys-boot-completed-set |
| 142 | |
| 143 | on sys-boot-completed-set && property:persist.sys.zram_enabled=1 |
| 144 | swapon_all /vendor/etc/fstab.${ro.hardware} |