blob: c64ece75c647d02e06938cb497c793c0c9c5fea0 [file] [log] [blame]
David 'Digit' Turnerd0fead32014-08-21 10:41:24 +02001on fs
Isaac Chenbacbda62018-03-21 10:46:57 +08002 mount_all /vendor/etc/fstab.ranchu
David 'Digit' Turnerd0fead32014-08-21 10:41:24 +02003
4on early-init
Joshua Lang2ac3d362016-05-06 14:33:39 -07005 mount debugfs debugfs /sys/kernel/debug mode=755
David 'Digit' Turnerd0fead32014-08-21 10:41:24 +02006
7on init
David 'Digit' Turnerd0fead32014-08-21 10:41:24 +02008
David 'Digit' Turnere3e68652014-09-24 00:35:08 +02009 symlink /dev/goldfish_pipe /dev/android_pipe
10 symlink /dev/goldfish_pipe /dev/qemu_pipe
David 'Digit' Turnerd0fead32014-08-21 10:41:24 +020011
Lingfeng Yang60b53d42019-04-05 12:08:25 -070012 write /sys/block/zram0/comp_algorithm lz4
13 write /proc/sys/vm/page-cluster 0
14
bohu03191742017-04-24 20:36:25 -070015on post-fs-data
16 setprop vold.post_fs_data_done 1
Bjoern Johanssonb1839e92018-03-19 11:18:30 -070017 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
bohub7cfb882017-08-29 12:21:07 -070020
Bjoern Johansson836f41d2018-06-13 10:57:09 -070021on 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' Turnerd0fead32014-08-21 10:41:24 +020027on boot
Lingfeng Yangbd425882018-04-23 13:58:17 -070028 setprop debug.hwui.renderer opengl
29 setprop debug.hwui.renderer ${ro.kernel.qemu.uirenderer}
bohudda8a162018-02-23 09:09:54 -080030 setprop ro.opengles.version ${ro.kernel.qemu.opengles.version}
bohudcf92012018-05-21 09:19:55 -070031 setprop dalvik.vm.heapsize 192m
huans4c8a39f2018-05-11 11:21:47 -070032 setprop dalvik.vm.heapsize ${ro.kernel.qemu.dalvik.vm.heapsize}
bohuf1fa5912017-12-14 21:03:50 -080033 chown root system /sys/power/wake_lock
34 chown root system /sys/power/wake_unlock
Yu Ning0657d892015-04-02 16:59:47 +080035 setprop ro.hardware.audio.primary goldfish
Yurii Zubrytskyi6fc69c72016-05-13 14:13:32 -070036
Bjoern Johansson00455fa2017-02-09 22:37:51 -080037 setprop wifi.interface wlan0
Bjoern Johansson836f41d2018-06-13 10:57:09 -070038 setprop wifi.direct.interface p2p-dev-wlan0
Miroslav Tisma0668c612015-06-04 15:23:19 +020039
bohu317e1622018-06-07 12:48:03 -070040 start goldfish-logcat
41
Kenneth Magic9bd45e62018-08-08 12:31:32 -070042 # Create a dummy USB gadget to allow sysfs testing
43 mkdir /config/usb_gadget/g1 0770 root root
David 'Digit' Turnerd0fead32014-08-21 10:41:24 +020044
bohue34269e2017-07-03 22:03:15 -070045service ranchu-setup /vendor/bin/init.ranchu-core.sh
bohu03191742017-04-24 20:36:25 -070046 class core
47 user root
48 group root
49 oneshot
50
bohu317e1622018-06-07 12:48:03 -070051on property:vendor.qemu.timezone=*
52 setprop persist.sys.timezone ${vendor.qemu.timezone}
Weilun Du1a678f52018-02-20 18:00:55 -080053
bohuaa953672018-06-06 15:00:41 -070054on property:vendor.qemu.android.bootanim=0
huans58ea3df2018-05-25 10:51:17 -070055 setprop debug.sf.nobootanimation 1
56
bohu317e1622018-06-07 12:48:03 -070057on property:dev.bootcomplete=1
58 setprop vendor.qemu.dev.bootcomplete 1
59
bohue34269e2017-07-03 22:03:15 -070060service ranchu-net /vendor/bin/init.ranchu-net.sh
bohu03191742017-04-24 20:36:25 -070061 class late_start
Yu Ning2cfff052015-05-19 14:43:55 +080062 user root
Bjoern Johansson873eee62018-09-06 15:39:12 -070063 group root wakelock wifi
Yu Ning2cfff052015-05-19 14:43:55 +080064 oneshot
65
Bjoern Johanssond154a212017-08-31 13:48:45 -070066service ipv6proxy /vendor/bin/execns router /vendor/bin/ipv6proxy -o eth0 -i wlan1,radio0-peer
Bjoern Johansson00455fa2017-02-09 22:37:51 -080067 user root
68 group root
69 disabled
70
Roman Kiryanov63783d82018-10-30 14:35:19 -070071service emu_hostapd /vendor/bin/execns router /vendor/bin/hostapd_nohidl /data/vendor/wifi/hostapd/hostapd.conf
Bjoern Johansson00455fa2017-02-09 22:37:51 -080072 user root
Bjoern Johansson880e7082018-05-15 15:04:53 -070073 group root wifi net_raw net_admin
Bjoern Johansson00455fa2017-02-09 22:37:51 -080074 disabled
75
Bjoern Johanssonf52fc122018-09-06 15:29:22 -070076service dhcpserver /vendor/bin/execns router /vendor/bin/dhcpserver --exclude-interface eth0
Bjoern Johanssonbf93db32017-07-14 15:47:19 -070077 user root
78 group root
79 disabled
80
Bjoern Johansson873eee62018-09-06 15:39:12 -070081service 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 Johanssond154a212017-08-31 13:48:45 -070086service dhcpclient_rtr /vendor/bin/execns router /vendor/bin/dhcpclient -i eth0
Bjoern Johanssonbf93db32017-07-14 15:47:19 -070087 user root
88 group root
89 disabled
90
Bjoern Johanssond154a212017-08-31 13:48:45 -070091service dhcpclient_def /vendor/bin/dhcpclient -i eth0
Bjoern Johansson00455fa2017-02-09 22:37:51 -080092 user root
93 group root
94 disabled
95
Miroslav Tismab104c442015-09-23 18:32:27 +020096# 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#
bohub7cfb882017-08-29 12:21:07 -0700102service qemu-props /vendor/bin/qemu-props
Miroslav Tismab104c442015-09-23 18:32:27 +0200103 class core
104 user root
105 group root
106 oneshot
107
Yu Ning2cfff052015-05-19 14:43:55 +0800108# -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
bohu7197f732017-03-07 14:10:50 -0800113# logd user added to prevent logcat from logging content.
114# log group added to support access to read logs socket.
Yu Ning2cfff052015-05-19 14:43:55 +0800115service goldfish-logcat /system/bin/logcat -Q
bohu7197f732017-03-07 14:10:50 -0800116 user logd
117 group log
Yu Ning2cfff052015-05-19 14:43:55 +0800118 oneshot
bohu2a107262015-11-30 17:26:30 -0800119
Weilun Du197ae932018-03-01 21:05:02 -0800120service bugreport /system/bin/dumpstate -d -p -B -z \
bohub7cfb882017-08-29 12:21:07 -0700121 -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
bohu03191742017-04-24 20:36:25 -0700122 class main
123 disabled
124 oneshot
125 keycodes 114 115 116
Bjoern Johansson00455fa2017-02-09 22:37:51 -0800126
Bjoern Johanssond154a212017-08-31 13:48:45 -0700127service wpa_supplicant /vendor/bin/hw/wpa_supplicant -Dnl80211 -iwlan0 -c/vendor/etc/wifi/wpa_supplicant.conf -g@android:wpa_wlan0
Bjoern Johansson00455fa2017-02-09 22:37:51 -0800128 socket wpa_wlan0 dgram 660 wifi wifi
129 group system wifi inet
130 oneshot
131 disabled
Lingfeng Yang60b53d42019-04-05 12:08:25 -0700132
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
140on property:sys.boot_completed=1
141 trigger sys-boot-completed-set
142
143on sys-boot-completed-set && property:persist.sys.zram_enabled=1
144 swapon_all /vendor/etc/fstab.${ro.hardware}