blob: 4925c5d39545fe841afe12f8ec59ab5a6e5ab002 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
on early-init
# loglevel 8
setprop ro.hw_timeout_multiplier ${ro.boot.hw_timeout_multiplier}
setprop hypervisor.memory_reclaim.supported ${ro.boot.hypervisor.vm.supported}
start metrics_helper
# start module load in the background
start vendor.dlkm_loader
# specially load zram as it is a "leaf" GKI module
exec u:r:modprobe:s0 -- /system/bin/modprobe -a -d /system/lib/modules zram.ko
on init
# ZRAM setup
write /sys/block/zram0/comp_algorithm lz4
# EAS uclamp interfaces
mkdir /dev/cpuctl/foreground
mkdir /dev/cpuctl/background
mkdir /dev/cpuctl/top-app
mkdir /dev/cpuctl/rt
chown system system /dev/cpuctl
chown system system /dev/cpuctl/foreground
chown system system /dev/cpuctl/background
chown system system /dev/cpuctl/top-app
chown system system /dev/cpuctl/rt
chown system system /dev/cpuctl/tasks
chown system system /dev/cpuctl/foreground/tasks
chown system system /dev/cpuctl/background/tasks
chown system system /dev/cpuctl/top-app/tasks
chown system system /dev/cpuctl/rt/tasks
chmod 0664 /dev/cpuctl/tasks
chmod 0664 /dev/cpuctl/foreground/tasks
chmod 0664 /dev/cpuctl/background/tasks
chmod 0664 /dev/cpuctl/top-app/tasks
chmod 0664 /dev/cpuctl/rt/tasks
on fs
mkdir /mnt/vendor/shared 0770 system system
# Mount everything that does not require fsck
mount_all --early
# So GceBootReporter can print to kmsg
chmod 622 /dev/kmsg
on post-fs-data && property:ro.vendor.disable_rename_eth0=
# works around framework netiface enumeration issue
# TODO(b/202731768): Add this `start rename_eth0` command to the init.rc for rename_netiface
start rename_eth0
on post-fs-data && property:ro.vendor.wifi_impl=virt_wifi
# TODO(b/202731768): Add this `start setup_wifi` command to the init.rc for setup_wifi
start setup_wifi
on post-fs-data
mkdir /data/vendor/modem_dump 0777 system system
mkdir /data/vendor/radio 0777 system system
on late-fs
# Mount RW partitions which need run fsck
mount_all --late
write /dev/kmsg "GUEST_BUILD_FINGERPRINT: ${ro.build.fingerprint}"
on post-fs-data && property:ro.vendor.wifi_impl=mac80211_hwsim_virtio
mkdir /data/vendor/wifi 0770 wifi wifi
mkdir /data/vendor/wifi/hostapd 0770 wifi wifi
mkdir /data/vendor/wifi/hostapd/sockets 0770 wifi wifi
start init_wifi_sh
on boot
chmod 0770 /dev/cpuctl
mkdir /data/vendor/wifi 0770 wifi wifi
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
start socket_vsock_proxy
setprop ro.hardware.audio.primary goldfish
symlink /dev/hvc6 /dev/gnss0
symlink /dev/hvc7 /dev/gnss1
on property:sys.boot_completed=1
trigger sys-boot-completed-set
mkdir /mnt/vendor/custom 0755 root root
mount ext2 /dev/block/by-name/custom /mnt/vendor/custom loop rw sync
# We want one opportunity per boot to enable zram, so we
# use a trigger we fire from the above stanza. If
# persist.sys.zram_enabled becomes true after boot,
# we don't want to run swapon_all at that time.
on sys-boot-completed-set && property:persist.sys.zram_enabled=1
swapon_all
service vendor.dlkm_loader /vendor/bin/dlkm_loader
class main
user root
group root system
disabled
oneshot
service metrics_helper /vendor/bin/metrics_helper
group system
user root
service socket_vsock_proxy /vendor/bin/socket_vsock_proxy -server_type=vsock -server_vsock_port=6520 -client_type=tcp -client_tcp_host=0.0.0.0 -client_tcp_port=5555
user root
service bugreport /system/bin/dumpstate -d -p -z
class main
user root
disabled
oneshot
keycodes 30 48
# TODO: disable this service once cuttlefish implements system suspend
service suspend_blocker /vendor/bin/suspend_blocker
class early_hal # Start together with system_suspend HAL
group system
user root
on early-init
setprop ro.setupwizard.mode ${ro.boot.setupwizard_mode}
on early-init && property:ro.boot.enable_bootanimation=0
setprop debug.sf.nobootanimation 1
|