blob: d935553104f856bac77cf957b2eb26cdaf5b30ff [file] [log] [blame]
Chris Friesdc2b50d2017-06-27 12:02:00 -05001#
2# Copyright (C) 2016 The Android Open-Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
Robb Glasser30ecafe2017-11-17 15:19:30 -080017import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.power.rc
Oleg Matcovschib32aa0f2017-10-23 15:15:16 -050018import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.usb.rc
Badhri Jagan Sridharan814c4f12017-11-22 14:16:33 -080019import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.diag.rc
Shawn Yang5f198892017-11-30 14:10:15 -080020import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.logging.rc
Shawn Yang35683542018-02-01 10:38:26 -080021import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.mpssrfs.rc
Shawn Yang5f198892017-11-30 14:10:15 -080022
Chris Friesdc2b50d2017-06-27 12:02:00 -050023
Thierry Strudel9e51f272018-05-30 22:22:44 -070024on property:init.svc.vendor.charger=running
Thierry Strudel9e51f272018-05-30 22:22:44 -070025 # keep one LITTLE and one big
Wei Wangee78ac92018-01-24 11:15:47 -080026 write /sys/devices/system/cpu/cpu1/online 0
Chris Friesdc2b50d2017-06-27 12:02:00 -050027 write /sys/devices/system/cpu/cpu2/online 0
28 write /sys/devices/system/cpu/cpu3/online 0
Chris Friesdc2b50d2017-06-27 12:02:00 -050029 write /sys/devices/system/cpu/cpu5/online 0
30 write /sys/devices/system/cpu/cpu6/online 0
31 write /sys/devices/system/cpu/cpu7/online 0
Wei Wang90f3d652018-03-15 13:35:37 -070032 # Enable UFS powersaving
Wei Wang90f3d652018-03-15 13:35:37 -070033 write /sys/devices/platform/soc/${ro.boot.bootdevice}/clkgate_enable 1
34 write /sys/devices/platform/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 1
Kyle Tso643c6b12018-05-18 14:09:37 +080035 write /sys/class/typec/port0/port_type sink
Robb Glasser30ecafe2017-11-17 15:19:30 -080036 write /sys/module/lpm_levels/parameters/sleep_disabled 0
Wei Wangf46b4952018-05-24 14:32:00 -070037 # Disable sched_boost
38 write /proc/sys/kernel/sched_boost 0
davidchao443ba672018-05-25 18:05:16 +080039 # Enable thermal mitigation
40 write /sys/devices/virtual/thermal/tz-by-name/backup-charge/mode enabled
Thierry Strudel901f4872018-06-25 22:42:21 -070041 # Ensure 100% reporting is sticky
42 write /sys/class/power_supply/maxfg/offmode_charger 1
Chris Friesdc2b50d2017-06-27 12:02:00 -050043
Yifan Honge4a85f22019-10-16 17:37:01 -070044service vendor.charger /system/bin/charger
Chris Friesdc2b50d2017-06-27 12:02:00 -050045 class charger
46 seclabel u:r:charger:s0
Yifan Hongfed86092019-04-05 13:31:25 -070047 user system
48 group system wakelock input
49 capabilities SYS_BOOT
50 file /dev/kmsg w
51 file /sys/fs/pstore/console-ramoops-0 r
52 file /sys/fs/pstore/console-ramoops r
53 file /proc/last_kmsg r
Chris Friesdc2b50d2017-06-27 12:02:00 -050054
55on early-init
56 mount debugfs debugfs /sys/kernel/debug
57 chmod 0755 /sys/kernel/debug
Wei Wangf46b4952018-05-24 14:32:00 -070058 # Enable sched_boost
59 write /proc/sys/kernel/sched_boost 1
Chris Friesabdc5222018-07-26 13:57:58 -050060 mount_all /vendor/etc/fstab.persist --early
Chris Friesdc2b50d2017-06-27 12:02:00 -050061
Wei Wang119118b2018-06-29 12:00:51 -070062# Skip init trigger for charger mode
63on early-init && property:ro.boot.mode=charger
64 setprop vendor.skip.init 1
65
Paul Crowleyca524db2018-02-01 15:53:31 -080066# We need vold early for metadata encryption
67on early-fs
68 start vold
69
Wei Wang119118b2018-06-29 12:00:51 -070070on init && property:vendor.skip.init=0
Tom Cherry04db8fa2018-06-05 10:17:43 -070071 start logd
72
Wei Wang90f3d652018-03-15 13:35:37 -070073 # QSEE rpmb listener need symlink for bootdevice
74 wait /dev/block/platform/soc/${ro.boot.bootdevice}
75 symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
76
77 # start qseecomd early as we mount system/ vendor/ early
78 # vold needs keymaster that needs qseecomd
Daniel Mentzaab747b2018-05-17 19:13:51 -070079 start vendor.qseecomd
Wei Wang1b0b0102018-05-15 15:51:22 -070080 start keymaster-4-0
Wei Wang90f3d652018-03-15 13:35:37 -070081
Shawn Willden9ff2c612018-06-28 18:40:17 +000082 # start Citadel keymaster (StrongBox) early
dybertwange89b0872018-08-31 19:43:49 +080083 start vendor.citadeld
nagendra modadugu6a405032020-01-23 14:48:29 -080084 start vendor.keymaster-4-1-citadel
Shawn Willden9ff2c612018-06-28 18:40:17 +000085
Jaegeuk Kim1fb9c392019-03-11 23:17:48 +000086 # Boot time fs tune
87 write /sys/block/sda/queue/iostats 0
88 write /sys/block/sda/queue/scheduler cfq
89 write /sys/block/sda/queue/iosched/slice_idle 0
Jaegeuk Kim1fb9c392019-03-11 23:17:48 +000090 write /sys/block/sda/queue/nr_requests 256
91 write /sys/block/sdf/queue/iostats 0
92 write /sys/block/sdf/queue/scheduler cfq
93 write /sys/block/sdf/queue/iosched/slice_idle 0
Jaegeuk Kim1fb9c392019-03-11 23:17:48 +000094 write /sys/block/sdf/queue/nr_requests 256
Jaegeuk Kim1fb9c392019-03-11 23:17:48 +000095
Wei Wang90f3d652018-03-15 13:35:37 -070096 # Disable UFS powersaving
Wei Wang90f3d652018-03-15 13:35:37 -070097 write /sys/devices/platform/soc/${ro.boot.bootdevice}/clkgate_enable 0
98 write /sys/devices/platform/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 0
99
Chris Friesdc2b50d2017-06-27 12:02:00 -0500100 # Loading kernel modules in background
101 start insmod_sh
102
103 # Support legacy paths
104 symlink /sdcard /mnt/sdcard
105 symlink /sdcard /storage/sdcard0
106
Robb Glasser30ecafe2017-11-17 15:19:30 -0800107 # bring back all cores
108 write /sys/devices/system/cpu/cpu0/online 1
109 write /sys/devices/system/cpu/cpu1/online 1
110 write /sys/devices/system/cpu/cpu2/online 1
111 write /sys/devices/system/cpu/cpu3/online 1
112 write /sys/devices/system/cpu/cpu4/online 1
113 write /sys/devices/system/cpu/cpu5/online 1
114 write /sys/devices/system/cpu/cpu6/online 1
115 write /sys/devices/system/cpu/cpu7/online 1
116
117 # configure governor settings for little cluster
118 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor schedutil
Connor O'Brien5aa6fe02018-02-21 10:13:10 -0800119 write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us 500
120 write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us 20000
Robb Glasser30ecafe2017-11-17 15:19:30 -0800121
122 # configure governor settings for big cluster
123 write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor schedutil
Connor O'Brien5aa6fe02018-02-21 10:13:10 -0800124 write /sys/devices/system/cpu/cpu4/cpufreq/schedutil/up_rate_limit_us 500
125 write /sys/devices/system/cpu/cpu4/cpufreq/schedutil/down_rate_limit_us 20000
Chris Friesdc2b50d2017-06-27 12:02:00 -0500126
127 # set default schedTune value for foreground/top-app
128 write /dev/stune/foreground/schedtune.prefer_idle 1
129 write /dev/stune/top-app/schedtune.boost 10
130 write /dev/stune/top-app/schedtune.prefer_idle 1
131
Rick Yiu6600cdd2020-12-07 22:52:22 +0800132 # set default schedTune value for camera-daemon
133 write /dev/stune/camera-daemon/schedtune.prefer_idle 1
134 write /dev/stune/camera-daemon/schedtune.boost 0
Alexey Polyudov2efbcb92017-10-10 14:50:10 -0700135
Chris Friesdc2b50d2017-06-27 12:02:00 -0500136 # b/37682684 Enable suspend clock reporting
137 write /sys/kernel/debug/clk/debug_suspend 1
138
139 # ZRAM setup
140 write /sys/block/zram0/comp_algorithm lz4
141 write /proc/sys/vm/page-cluster 0
142
143 # Some user code relies on ro.boot.hardware.revision
144 setprop ro.boot.hardware.revision ${ro.revision}
145
Andrew Sappersteinb50c88c2018-04-27 12:19:30 -0700146 # Allow PAI targeting per hardware SKU
147 setprop ro.oem.key1 ${ro.boot.hardware.sku}
148
Ruchi Kandoic78d86c2018-06-04 13:40:46 -0700149 # Property used by vintf for sku specific manifests
150 setprop ro.boot.product.hardware.sku ${ro.boot.hardware.sku}
151
Wei Wang15201c62018-06-06 14:11:24 -0700152 # Property used by pointing to thermal-engine config file
153 setprop vendor.thermal.vr_mode -novr
154 setprop vendor.thermal.hw_mode -prod
155
Stephane Lee5f7e5e62019-12-02 18:16:58 -0800156 # Battery Defender
157 chown system system /sys/devices/platform/soc/soc:google,charger/charge_stop_level
158 chown system system /sys/devices/platform/soc/soc:google,charger/charge_start_level
Ted Lind17cf6b2020-12-02 20:17:11 +0800159 chown system system /sys/devices/platform/soc/soc:google,charger/bd_drainto_soc
160 chown system system /sys/devices/platform/soc/soc:google,charger/bd_recharge_soc
161 chown system system /sys/devices/platform/soc/soc:google,charger/bd_recharge_voltage
162 chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_abs_temp
163 chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_soc
164 chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_temp
165 chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_time
166 chown system system /sys/devices/platform/soc/soc:google,charger/bd_trigger_temp
167 chown system system /sys/devices/platform/soc/soc:google,charger/bd_trigger_time
168 chown system system /sys/devices/platform/soc/soc:google,charger/bd_trigger_voltage
169 chown system system /sys/devices/platform/soc/soc:google,charger/bd_temp_enable
Stephane Lee16c8d442021-07-09 17:15:30 -0700170 chown system system /sys/devices/platform/soc/soc:google,charger/bd_clear
Stephane Lee59aa8cb2021-04-09 18:55:02 -0700171 chown system system /sys/class/power_supply/wireless/device/mitigate_threshold
Stephane Lee5f7e5e62019-12-02 18:16:58 -0800172
TeYuan Wange27e39d2018-05-15 03:09:11 +0800173on late-init
YiHo Cheng6cac2f42021-01-13 23:22:27 +0800174 write /sys/devices/virtual/thermal/tz-by-name/quiet-therm-adc/mode enabled
175 chown system system /sys/devices/virtual/thermal/tz-by-name/quiet-therm-monitor/trip_point_0_temp
176 chown system system /sys/devices/virtual/thermal/tz-by-name/quiet-therm-monitor/trip_point_0_hyst
Miguel de Diosc93aea82018-06-25 12:36:58 -0700177 write /sys/devices/virtual/thermal/tz-by-name/fps-therm-adc/mode enabled
TeYuan Wang482ff292019-03-12 17:09:46 +0800178 chown system system /sys/devices/virtual/thermal/tz-by-name/fps-therm-monitor/trip_point_0_temp
179 chown system system /sys/devices/virtual/thermal/tz-by-name/fps-therm-monitor/trip_point_0_hyst
180 chown system system /sys/devices/virtual/thermal/tz-by-name/usbc-therm-monitor/trip_point_0_temp
181 chown system system /sys/devices/virtual/thermal/tz-by-name/usbc-therm-monitor/trip_point_0_hyst
George Lee31d26f22019-06-04 11:07:32 -0700182 chown system system /sys/devices/virtual/thermal/tz-by-name/soc/mode
TeYuan Wange27e39d2018-05-15 03:09:11 +0800183
Chris Friesdc2b50d2017-06-27 12:02:00 -0500184on fs
Oleg Matcovschib32aa0f2017-10-23 15:15:16 -0500185 mount_all /vendor/etc/fstab.${ro.boot.hardware.platform} --early
Chris Friesdc2b50d2017-06-27 12:02:00 -0500186
187 mkdir /persist/data 0700 system system
188 mkdir /persist/display 0770 system graphics
189 mkdir /persist/rfs 0770 root system
190 mkdir /persist/hlos_rfs 0770 root system
191 chmod 0770 /persist/rfs
Joel Galensonb716ec32018-02-26 14:40:47 -0800192 chmod 0770 /persist/rfs/shared
193 chmod 0770 /persist/rfs/msm
194 chmod 0770 /persist/rfs/msm/adsp
195 chmod 0770 /persist/rfs/msm/mpss
196 chmod 0770 /persist/rfs/msm/slpi
197 chmod 0770 /persist/rfs/mdm
198 chmod 0770 /persist/rfs/mdm/adsp
199 chmod 0770 /persist/rfs/mdm/mpss
200 chmod 0770 /persist/rfs/mdm/slpi
201 chmod 0770 /persist/rfs/mdm/tn
202 chmod 0770 /persist/rfs/apq
203 chmod 0770 /persist/rfs/apq/gnss
Chris Friesdc2b50d2017-06-27 12:02:00 -0500204 chmod 0770 /persist/hlos_rfs
Thierry Strudel8d38aaf2018-07-03 17:03:50 -0700205 # for cycle count backup
206 mkdir /persist/battery 0700 system system
Maggie White02042692019-05-02 13:59:59 -0700207 restorecon_recursive /mnt/vendor/persist
Chris Friesdc2b50d2017-06-27 12:02:00 -0500208
Chris Friesdc2b50d2017-06-27 12:02:00 -0500209on late-fs
Chris Friesdc2b50d2017-06-27 12:02:00 -0500210 start devstart_sh
Erik Staatsaecb61a2018-04-19 12:09:24 -0700211
Chris Friesdc2b50d2017-06-27 12:02:00 -0500212 # Start services for bootanim
Wei Wangcc733622020-03-23 13:37:59 -0700213 start vendor.power-hal-1-3
Chris Friesdc2b50d2017-06-27 12:02:00 -0500214 start surfaceflinger
215 start bootanim
Kevin DuBois0ba18992018-09-26 15:19:58 -0700216 start vendor.hwcomposer-2-3
Hung-ying Tyan19d02fd2018-05-24 00:10:36 +0800217 start vendor.configstore-hal
Wei Wang0f8b6302018-06-20 11:07:09 -0700218 start vendor.qti.hardware.display.allocator
Chris Lufb2784e2019-05-16 12:01:36 +0800219 start vendor.light-1-0
Chris Friesdc2b50d2017-06-27 12:02:00 -0500220
Wei Wangaad43c92018-04-04 14:26:23 -0700221 # Wait for hwservicemanager ready since fsck might be triggered in mount_all --late
222 # In such case, init won't responce the property_set from hwservicemanager and then
223 # cause services for bootanim not running.
224 wait_for_prop hwservicemanager.ready true
Wei Wang19a550e2018-05-15 16:14:30 -0700225
Shawn Willden9ff2c612018-06-28 18:40:17 +0000226 # Wait for keymaster HALs (TEE and StrongBox)
227 exec_start wait_for_strongbox
Wei Wang19a550e2018-05-15 16:14:30 -0700228
Chris Friesdc2b50d2017-06-27 12:02:00 -0500229 # Mount RW partitions which need run fsck
Oleg Matcovschib32aa0f2017-10-23 15:15:16 -0500230 mount_all /vendor/etc/fstab.${ro.boot.hardware.platform} --late
Chris Friesdc2b50d2017-06-27 12:02:00 -0500231
Wei Wang0b75d942017-06-30 09:49:45 -0700232 # Required for time_daemon
233 mkdir /persist/time 0770 system system
234
Chris Friesdc2b50d2017-06-27 12:02:00 -0500235 # Start time daemon early so that the system time can be set early
236 start time_daemon
237
Woody Lin99417f92021-03-15 17:36:12 +0800238 # Write build info to kdebuginfo.
239 write /sys/module/kdebuginfo/parameters/build_info "${ro.product.name}-${ro.build.type} ${ro.build.version.incremental}"
240
Chris Friesdc2b50d2017-06-27 12:02:00 -0500241on post-fs
Wei Wangb6fdf0b2018-04-24 22:56:02 -0700242 # Disable sched autogroup
243 write /proc/sys/kernel/sched_autogroup_enabled 0
244
Chris Friesdc2b50d2017-06-27 12:02:00 -0500245 # set RLIMIT_MEMLOCK to 64MB
246 setrlimit 8 67108864 67108864
247
248 chmod 0664 /sys/devices/virtual/graphics/fb0/idle_time
249 chown system graphics /sys/devices/virtual/graphics/fb0/idle_time
250 write /sys/devices/virtual/graphics/fb0/idle_time 100
251
Adrian Salidoa28dc2a2018-05-02 13:26:37 -0700252 # turn off vblank irq immediately after turning off
253 write /sys/module/drm/parameters/vblankoffdelay -1
254
Chris Friesdc2b50d2017-06-27 12:02:00 -0500255on post-fs-data
256 # We can start netd here before in is launched in common init.rc on zygote-start
257 start netd
258
Chris Friesdc2b50d2017-06-27 12:02:00 -0500259 # b/38048356 Setup debug folders for camera
260 mkdir /data/vendor/camera 0770 camera camera
261
262 # b/38496103 Setup debug folders for display
263 mkdir /data/vendor/display 0770 system graphics
264
SalmaxChang08328d32018-05-09 13:14:34 +0800265 # Setup folder for modem fdr
266 mkdir /data/vendor/modem_fdr 0700 root system
267
Kenny Rootdb16c772020-05-31 17:08:20 -0700268 # Resume-on-Reboot after we have the data dir and keymaster
269 mkdir /data/vendor/rebootescrow 0770 hsm hsm
270 start vendor.rebootescrow-citadel
271
Chris Friesdc2b50d2017-06-27 12:02:00 -0500272 # keep that at the end of on post-fs-data
273 # Set indication (checked by vold) that we have finished this action
274 setprop vold.post_fs_data_done 1
275
276 # Wait until the system time is set
Wei Wang0b75d942017-06-30 09:49:45 -0700277 wait_for_prop vendor.qcom.time.set true
Chris Friesdc2b50d2017-06-27 12:02:00 -0500278
Wei Wang90f3d652018-03-15 13:35:37 -0700279 # Wait qseecomd started
Daniel Mentzaab747b2018-05-17 19:13:51 -0700280 wait_for_prop vendor.sys.listeners.registered true
Wei Wang90f3d652018-03-15 13:35:37 -0700281
Jaekyun Seok0497eb52018-04-06 07:42:23 +0900282 # load IPA FWs
Daniel Mentzaab747b2018-05-17 19:13:51 -0700283 # This must be started when vendor.sys.listeners.registered is true
Jaekyun Seok0497eb52018-04-06 07:42:23 +0900284 start ipastart_sh
285
ChengYou Hoa0d99972018-06-05 20:02:27 +0800286 mkdir /data/vendor/nnhal 0700 system system
287
Chris Friesdc2b50d2017-06-27 12:02:00 -0500288# zygote need to be started after otapreopt which will be done on post-fs-data
289on zygote-start
290 # zygote is started in common init.rc
291 # and now we can continue initialize /data/
Chris Friesdc2b50d2017-06-27 12:02:00 -0500292 mkdir /data/vendor/ipa 0770 radio radio
293 chown radio radio /data/vendor/ipa
294
295 # Create the directories used by the Wireless subsystem
Ecco Park6d557a62018-02-20 14:32:20 -0800296 mkdir /data/vendor/wifi 0771 wifi wifi
Jeff Vander Stoepd25aa402018-01-24 08:57:13 -0800297 mkdir /data/vendor/wifi/wpa 0770 wifi wifi
298 mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
Chris Friesdc2b50d2017-06-27 12:02:00 -0500299
Chris Friesdc2b50d2017-06-27 12:02:00 -0500300 chown system system /persist/WCNSS_qcom_wlan_nv.bin
301
Chris Friesdc2b50d2017-06-27 12:02:00 -0500302 # Trigger WLAN driver load
303 write /sys/kernel/boot_wlan/boot_wlan 1
304
Chris Friesdc2b50d2017-06-27 12:02:00 -0500305 #create netmgr log dir
306 mkdir /data/vendor/netmgr 0771 radio radio
307 chmod 0771 /data/vendor/netmgr
308
Cyan_Hsieh831e4df2018-05-18 17:44:50 +0800309 # Create netmgr recovery folder
310 mkdir /data/vendor/netmgr/recovery 0700 radio radio
311 chmod 0770 /data/vendor/netmgr/recovery
312 write /data/vendor/netmgr/recovery/recovery_info ""
313 chown radio radio /data/vendor/netmgr/recovery/recovery_info
314
Chris Friesdc2b50d2017-06-27 12:02:00 -0500315 # Create directory used by audio subsystem
Jasmine Cha3f9a4852018-04-27 17:20:50 +0800316 mkdir /data/vendor/audio 0770 audio audio
Chris Friesdc2b50d2017-06-27 12:02:00 -0500317
318 # Create directory for audio delta files
Jasmine Cha3f9a4852018-04-27 17:20:50 +0800319 mkdir /data/vendor/audio/acdbdata 0770 media audio
320 mkdir /data/vendor/audio/acdbdata/delta 0770 media audio
Chris Friesdc2b50d2017-06-27 12:02:00 -0500321
Chris Friesdc2b50d2017-06-27 12:02:00 -0500322 # Create directory for radio
vagdevi5be24142018-08-03 13:22:15 -0700323 mkdir /data/vendor/radio 0773 system radio
Jie Song15d7bf92018-05-13 14:41:11 -0700324 mkdir /data/vendor/modem_stat 0771 system radio
325 write /data/vendor/modem_stat/debug.txt ""
326 chown system radio /data/vendor/modem_stat/debug.txt
327 chmod 0664 /data/vendor/modem_stat/debug.txt
Chris Friesdc2b50d2017-06-27 12:02:00 -0500328
Erik Staats4d855e92018-03-29 12:56:17 -0700329 # Set up sensors-related directories and permissions
Andrew Lehmer464f7ab2018-02-20 15:44:07 -0800330 chmod 775 /persist/sensors
331 chmod 664 /persist/sensors/sensors_settings
Erik Staats4d855e92018-03-29 12:56:17 -0700332 chown root system /persist/sensors/registry
333 chmod 775 /persist/sensors/registry
334 chown root system /persist/sensors/registry/registry
335 chmod 775 /persist/sensors/registry/registry
336
Andrew Lehmer464f7ab2018-02-20 15:44:07 -0800337 chown system root /persist/sensors/sensors_settings
Joel Galensonb716ec32018-02-26 14:40:47 -0800338 chown root root /persist/sensors/registry/registry/sensors_settings
Andrew Lehmer464f7ab2018-02-20 15:44:07 -0800339
Meng-hsuan Chung103da642018-02-14 15:38:44 -0800340 mkdir /data/vendor/sensors 0770
341 chown system system /data/vendor/sensors
Rick Chenf8e1dc32019-03-29 10:48:15 +0800342 mkdir /data/vendor/sensors/log 0770
343 chown system system /data/vendor/sensors/log
Meng-hsuan Chung103da642018-02-14 15:38:44 -0800344
emilchung78c578a2020-10-13 10:51:52 +0800345 # Restore SeLinux Context for preventing temp.json with
346 # incorrect security context
347 restorecon /mnt/vendor/persist/sensors/registry/temp.json
348
David Lin23c2dd72018-03-21 18:05:54 -0700349 chmod 770 /persist/audio
350 chmod 660 /persist/audio/audio.cal
351 chown media audio /persist/audio
352 chown audioserver audio /persist/audio/audio.cal
353
354 chmod 770 /persist/haptics
355 chmod 440 /persist/haptics/cs40l20.cal
356 chown system system /persist/haptics
357 chown system system /persist/haptics/cs40l20.cal
358
Chris Friesdc2b50d2017-06-27 12:02:00 -0500359 # Mark the copy complete flag to not completed
360 write /data/vendor/radio/copy_complete 0
361 chown radio radio /data/vendor/radio/copy_complete
362 chmod 0660 /data/vendor/radio/copy_complete
363
364 # File flags for prebuilt ril db file
365 write /data/vendor/radio/prebuilt_db_support 1
366 chown radio radio /data/vendor/radio/prebuilt_db_support
367 chmod 0400 /data/vendor/radio/prebuilt_db_support
368 write /data/vendor/radio/db_check_done 0
369 chown radio radio /data/vendor/radio/db_check_done
370 chmod 0660 /data/vendor/radio/db_check_done
371
372 # Create directories for Location services
373 mkdir /data/vendor/location 0770 gps gps
374 mkdir /data/vendor/location/mq 0770 gps gps
375 mkdir /data/vendor/location/xtwifi 0770 gps gps
Edwin Tungf146e862018-04-17 09:34:04 +0800376 mkdir /dev/socket/location 0770 gps gps
377 mkdir /dev/socket/location/mq 0770 gps gps
378 mkdir /dev/socket/location/xtra 0770 gps gps
Chris Friesdc2b50d2017-06-27 12:02:00 -0500379
380 # NFC local data and nfcee xml storage
Chris Friesdc2b50d2017-06-27 12:02:00 -0500381 mkdir /data/vendor/nfc 0770 nfc nfc
382
Ruchi Kandoi776c7b62018-03-08 12:49:27 -0800383 # Secure Element directory for loader service functionality
384 mkdir /data/vendor/secure_element 0770 secure_element secure_element
385
Chris Friesdc2b50d2017-06-27 12:02:00 -0500386on early-boot
387 # wait for devices
Wei Wang90f3d652018-03-15 13:35:37 -0700388 wait_for_prop vendor.qcom.devup 1
Chris Friesdc2b50d2017-06-27 12:02:00 -0500389
Wei Wangf54009f2018-03-16 13:29:08 -0700390 # wait for insmod_sh to finish all modules
391 wait_for_prop vendor.all.modules.ready 1
392
David Lin5de1faa2018-02-23 16:39:14 -0800393 write /sys/kernel/boot_adsp/boot 1
Chris Fries256600f2018-04-03 17:01:47 -0500394 write /sys/kernel/boot_cdsp/boot 1
David Lin5de1faa2018-02-23 16:39:14 -0800395
Chris Friesdc2b50d2017-06-27 12:02:00 -0500396 # Update dm-verity state and set partition.*.verified properties
397 verity_update_state
398
Xu Han52588a12017-11-06 10:09:03 -0800399 # Permission for rainbow sensor
Xu Hanc1bf5042018-03-05 15:31:08 -0800400 chown cameraserver camera /sys/devices/platform/soc/ac4a000.qcom,cci/ac4a000.qcom,cci:qcom,rainbow@20/rainbow_enable
401 chmod 0660 /sys/devices/platform/soc/ac4a000.qcom,cci/ac4a000.qcom,cci:qcom,rainbow@20/rainbow_enable
402 chown cameraserver camera /sys/devices/platform/soc/ac4a000.qcom,cci/ac4a000.qcom,cci:qcom,rainbow@20/rainbow_read_byte
403 chmod 0660 /sys/devices/platform/soc/ac4a000.qcom,cci/ac4a000.qcom,cci:qcom,rainbow@20/rainbow_read_byte
404 chown cameraserver camera /sys/devices/platform/soc/ac4a000.qcom,cci/ac4a000.qcom,cci:qcom,rainbow@20/rainbow_write_byte
405 chmod 0660 /sys/devices/platform/soc/ac4a000.qcom,cci/ac4a000.qcom,cci:qcom,rainbow@20/rainbow_write_byte
Xu Han7f6bc0c2018-03-16 13:48:40 -0700406 chown cameraserver camera /dev/vd6281
407 chmod 0660 /dev/vd6281
Chris Friesdc2b50d2017-06-27 12:02:00 -0500408
409 # Permission for Vibrator
Harpreet "Eli" Sangha4b2d22c2018-12-21 13:14:52 +0900410 chown system system /sys/class/leds/vibrator/device/comp_enable
411 chown system system /sys/class/leds/vibrator/device/cp_dig_scale
David Linc2521e22018-03-06 19:58:13 -0800412 chown system system /sys/class/leds/vibrator/device/cp_trigger_index
David Lin31f87672018-05-23 16:09:20 -0700413 chown system system /sys/class/leds/vibrator/device/cp_trigger_queue
David Lin8c3b3012018-03-20 16:28:15 -0700414 chown system system /sys/class/leds/vibrator/device/dig_scale
David Lin90af3c72018-03-21 16:18:25 -0700415 chown system system /sys/class/leds/vibrator/device/f0_stored
Harpreet "Eli" Sangha4b2d22c2018-12-21 13:14:52 +0900416 chown system system /sys/class/leds/vibrator/device/heartbeat
417 chown system system /sys/class/leds/vibrator/device/num_waves
David Lin90af3c72018-03-21 16:18:25 -0700418 chown system system /sys/class/leds/vibrator/device/redc_stored
Harpreet "Eli" Sangha4b2d22c2018-12-21 13:14:52 +0900419 chown system system /sys/class/leds/vibrator/device/standby_timeout
Chris Friesdc2b50d2017-06-27 12:02:00 -0500420
421 # Permission for LED driver
422 chown system system /sys/class/leds/red/on_off_ms
423 chown system system /sys/class/leds/green/on_off_ms
424 chown system system /sys/class/leds/blue/on_off_ms
425 chown system system /sys/class/leds/red/rgb_start
426 chown system system /sys/class/leds/green/rgb_start
427 chown system system /sys/class/leds/blue/rgb_start
Chris Friesa9094da2017-07-18 11:16:46 -0500428 chown system system /sys/class/backlight/panel0-backlight/brightness
Sean Callanana77bd422018-04-09 12:17:31 -0700429 chown system system /sys/class/backlight/panel0-backlight/vr_mode
linpeterd8f8cd32018-07-13 21:35:44 +0800430 chown system system /sys/class/backlight/panel0-backlight/hbm_mode
Chris Friesdc2b50d2017-06-27 12:02:00 -0500431
Patrick Tjina710d802018-04-28 23:15:01 -0700432 # Permission for Wireless charger
433 chown system system /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/rxdata
434 chown system system /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/txdata
435 chown system system /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/txlen
436 chown system system /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/ccreset
Patrick Tjin9e33c9b2018-06-27 12:10:08 -0700437 chown system system /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/status
438 chown system system /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/version
Thierry Strudel8d38aaf2018-07-03 17:03:50 -0700439 chown system system /sys/class/power_supply/wireless/capacity
440
441 # FG cycle counts read from dumpstate + backup restore from health HAL
442 chown system system /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qpnp,fg/cycle_counts_bins
443 chown system system /sys/devices/platform/soc/a90000.i2c/i2c-4/4-0036/power_supply/maxfg/cycle_counts_bins
444
445 # HardwareInfo needs to be able to read CC bins
446 chmod 644 /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qpnp,fg/cycle_counts_bins
447 chmod 644 /sys/devices/platform/soc/a90000.i2c/i2c-4/4-0036/power_supply/maxfg/cycle_counts_bins
Patrick Tjina710d802018-04-28 23:15:01 -0700448
Andrew Chant5d40a8f2018-06-21 17:30:13 -0700449 # Permission for Pixelstats
Andrew Chant5d40a8f2018-06-21 17:30:13 -0700450 chown system system /sys/class/misc/msm_cirrus_playback/resistance_left_right
451 chown system system /sys/devices/platform/soc/1d84000.ufshc/slowio_read_cnt
452 chown system system /sys/devices/platform/soc/1d84000.ufshc/slowio_write_cnt
453 chown system system /sys/devices/platform/soc/1d84000.ufshc/slowio_unmap_cnt
454 chown system system /sys/devices/platform/soc/1d84000.ufshc/slowio_sync_cnt
Carter Hsuc8685b22019-01-14 13:50:42 +0800455 chown system system /sys/devices/platform/soc/soc:qcom,wcd-dsp-mgr/wdsp_stat
456
Andrew Chant5d40a8f2018-06-21 17:30:13 -0700457
Yifan Honge7972a02018-08-10 13:04:20 -0700458 # Permission for Health Storage HAL
459 chown system system /sys/devices/platform/soc/1d84000.ufshc/manual_gc
460
Chris Friesdc2b50d2017-06-27 12:02:00 -0500461on boot
462 mkdir /dev/socket/qmux_radio 0770 radio radio
463 chmod 2770 /dev/socket/qmux_radio
464 mkdir /dev/socket/qmux_audio 0770 media audio
465 chmod 2770 /dev/socket/qmux_audio
466 mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
467 chmod 2770 /dev/socket/qmux_bluetooth
468 mkdir /dev/socket/qmux_gps 0770 gps gps
469 chmod 2770 /dev/socket/qmux_gps
470
471 # Create NETMGR daemon socket area
472 mkdir /dev/socket/netmgr 0750 radio radio
473
474 setprop wifi.interface wlan0
475
Chris Friesdc2b50d2017-06-27 12:02:00 -0500476 # Assign TCP buffer thresholds to be ceiling value of technology maximums
477 # Increased technology maximums should be reflected here.
478 write /proc/sys/net/core/rmem_max 8388608
Ahmed ElArabawy59c798f2018-03-29 13:10:41 -0700479 write /proc/sys/net/core/wmem_max 8388608
Chris Friesdc2b50d2017-06-27 12:02:00 -0500480
Chris Friesdc2b50d2017-06-27 12:02:00 -0500481 # Bluetooth
482 chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
483 chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
484 chmod 0660 /sys/class/rfkill/rfkill0/state
485 chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
486 chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
487
488 # Wifi firmware reload path
489 chown wifi wifi /sys/module/wlan/parameters/fwpath
490
Chris Friesdc2b50d2017-06-27 12:02:00 -0500491 # default country code
492 setprop ro.boot.wificountrycode 00
493
Maggie White518d1872018-03-14 19:08:18 -0700494 # WLAN debug access
495 chown system system /d/icnss/stats
496
George Chang43cabe52020-06-12 09:52:30 +0800497 # Default enable uicc_se
498 setprop persist.vendor.radio.uicc_se_enabled true
499
Chris Friesdc2b50d2017-06-27 12:02:00 -0500500service init-radio-sh /vendor/bin/init.radio.sh
501 class late_start
502 user radio
503 group root radio
504 oneshot
505
Martin Liu7d321352019-05-04 11:05:19 +0800506# reset thermal-engine when changed profile
507on property:vendor.thermal.vr_mode=*
508 restart vendor.thermal-engine
509
Wei Wang15201c62018-06-06 14:11:24 -0700510service vendor.thermal-engine /vendor/bin/thermal-engine -c /vendor/etc/thermal-engine-${ro.hardware}${vendor.thermal.vr_mode}${vendor.thermal.hw_mode}.conf
Chris Friesdc2b50d2017-06-27 12:02:00 -0500511 class main
512 user root
513 group root system
514 socket thermal-send-client stream 0666 system system
515 socket thermal-recv-client stream 0660 system system
516 socket thermal-recv-passive-client stream 0666 system system
517
Shawn Yang286d4702018-03-20 16:28:12 -0700518on property:persist.vendor.sys.ssr.restart_level=*
Shawn Yange0ba3f42017-11-21 18:46:53 -0800519 start vendor.ssr_setup
Chris Friesdc2b50d2017-06-27 12:02:00 -0500520
Shawn Yange0ba3f42017-11-21 18:46:53 -0800521service vendor.ssr_setup /vendor/bin/ssr_setup
Chris Friesdc2b50d2017-06-27 12:02:00 -0500522 oneshot
523 disabled
524
Shawn Yange0ba3f42017-11-21 18:46:53 -0800525service vendor.ssr_diag /vendor/bin/ssr_diag
Chris Friesdc2b50d2017-06-27 12:02:00 -0500526 class late_start
527 user system
528 group system
529 disabled
530
Jaekyun Seokb809e8c2018-03-12 10:42:44 +0900531service vendor.per_mgr /vendor/bin/pm-service
Chris Friesdc2b50d2017-06-27 12:02:00 -0500532 class core
533 user system
534 group system
535 ioprio rt 4
536
537service per_proxy /vendor/bin/pm-proxy
538 class core
539 user system
540 group system
541 disabled
542
543on property:sys.boot_completed=1
Wei Wang92118bc2018-05-08 13:53:12 -0700544 # Set the default IRQ affinity to the silver cluster.
545 write /proc/irq/default_smp_affinity f
546
Wei Wange828bc62017-12-31 22:14:16 -0800547 # Enable UFS powersaving
Wei Wang90f3d652018-03-15 13:35:37 -0700548 write /sys/devices/platform/soc/${ro.boot.bootdevice}/clkgate_enable 1
549 write /sys/devices/platform/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 1
Wei Wange828bc62017-12-31 22:14:16 -0800550
Chris Friesdc2b50d2017-06-27 12:02:00 -0500551 # Enable ZRAM on boot_complete
Wei Wang599318c2019-09-11 14:24:28 -0700552 rm /data/unencrypted/zram_swap
Oleg Matcovschib32aa0f2017-10-23 15:15:16 -0500553 swapon_all /vendor/etc/fstab.${ro.boot.hardware.platform}
Minchan Kim51edafd2018-10-19 18:12:44 +0900554 write /proc/sys/vm/swappiness 100
Chris Friesdc2b50d2017-06-27 12:02:00 -0500555
Rick Yiu164e81e2019-04-24 16:32:18 +0800556 # Setup final blkio
557 # value for group_idle is us
558 write /dev/blkio/blkio.weight 1000
Rick Yiuc0bc1212019-11-18 19:55:17 +0800559 write /dev/blkio/background/blkio.weight 200
Rick Yiu164e81e2019-04-24 16:32:18 +0800560 write /dev/blkio/blkio.group_idle 2000
561 write /dev/blkio/background/blkio.group_idle 0
562
Chris Friesdc2b50d2017-06-27 12:02:00 -0500563 # Setup final cpuset
564 write /dev/cpuset/top-app/cpus 0-7
565 write /dev/cpuset/foreground/boost/cpus 0-3,6-7
566 write /dev/cpuset/foreground/cpus 0-3,6-7
567 write /dev/cpuset/background/cpus 0-1
568 write /dev/cpuset/system-background/cpus 0-3
Tim Murray0c30c362018-04-13 11:09:04 -0700569 write /dev/cpuset/restricted/cpus 0-3
Chris Friesdc2b50d2017-06-27 12:02:00 -0500570
Jaegeuk Kim1fb9c392019-03-11 23:17:48 +0000571 # Runtime fs tuning: as we have init boottime setting and kernel patch setting
Randall Huang42880602020-12-03 09:25:04 +0800572 # We should adjust the setting upon boot_complete
Jaegeuk Kim1fb9c392019-03-11 23:17:48 +0000573 # for runtime performance
Jaegeuk Kim1fb9c392019-03-11 23:17:48 +0000574 write /sys/block/sda/queue/nr_requests 128
575 write /sys/block/sda/queue/iostats 1
Jaegeuk Kim1fb9c392019-03-11 23:17:48 +0000576 write /sys/block/sdf/queue/nr_requests 128
577 write /sys/block/sdf/queue/iostats 1
Jaegeuk Kim1fb9c392019-03-11 23:17:48 +0000578
Jaegeuk Kimbc64a1a2019-12-05 19:58:14 -0800579 # Block layer tuning: discard chunk size up to 128MB
580 # Otherwise, contiguous discards can be merged
581 write /sys/block/sda/queue/discard_max_bytes 134217728
582
Thierry Strudele8c77d02018-04-10 17:17:01 -0700583 # QCOM FG SRAM dump for dumpstate
584 chown system system /d/fg/sram/data
585 chown system system /d/fg/sram/count
586 chown system system /d/fg/sram/address
587
588 # Maxim FG dump for dumpstate
589 chown system system /d/regmap/4-0036/registers
590 chown system system /d/regmap/4-000b/registers
591
Wei Wang14b4ed42017-10-02 14:48:46 -0700592 # UFS health
593 chmod 755 /sys/kernel/debug/ufshcd0
594 chmod 644 /sys/kernel/debug/ufshcd0/show_hba
595 chmod 644 /sys/kernel/debug/ufshcd0/stats/err_stats
596 chmod 644 /sys/kernel/debug/ufshcd0/stats/io_stats
597 chmod 644 /sys/kernel/debug/ufshcd0/stats/req_stats
598
Wei Wangf46b4952018-05-24 14:32:00 -0700599 # Disable sched_boost
600 write /proc/sys/kernel/sched_boost 0
601
Wei Wang70706372018-05-25 18:22:35 -0700602 # Enable PowerHAL hint processing
603 setprop vendor.powerhal.init 1
604
Chris Friesdc2b50d2017-06-27 12:02:00 -0500605 start per_proxy
606
607on property:sys.shutdown.requested=*
608 stop per_proxy
609
Daniel Mentzaab747b2018-05-17 19:13:51 -0700610service vendor.qseecomd /vendor/bin/qseecomd
Chris Friesdc2b50d2017-06-27 12:02:00 -0500611 class core
612 user root
613 group root
614
Chris Friesdc2b50d2017-06-27 12:02:00 -0500615service ss_ramdump /vendor/bin/subsystem_ramdump
616 class main
617 user root
Shawn Yang5af01772018-02-24 17:36:33 -0800618 group system
Chris Friesdc2b50d2017-06-27 12:02:00 -0500619 disabled
620
Jaekyun Seokb809e8c2018-03-12 10:42:44 +0900621on property:persist.vendor.sys.ssr.enable_ramdumps=1
Chris Friesdc2b50d2017-06-27 12:02:00 -0500622 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
Ecco Park03c6d8a2018-02-26 14:56:04 -0800623 mkdir /data/vendor/wifidump 771 root system
Petri Gynthera14b5262018-01-23 16:55:00 -0800624 mkdir /data/vendor/ramdump 771 root system
625 mkdir /data/vendor/ssrdump 771 root system
SalmaxChang60633b42020-10-15 15:55:12 +0800626 mkdir /data/vendor/ssrlog 775 root system
Chris Friesdc2b50d2017-06-27 12:02:00 -0500627 start ss_ramdump
628
Jaekyun Seokb809e8c2018-03-12 10:42:44 +0900629on property:persist.vendor.sys.ssr.enable_ramdumps=0
Chris Friesdc2b50d2017-06-27 12:02:00 -0500630 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
631
Chris Friesdc2b50d2017-06-27 12:02:00 -0500632service adsprpcd /vendor/bin/adsprpcd
633 class main
634 user media
635 group media
636
c_mtharuc683b8b2017-11-14 12:12:14 +0530637service cdsprpcd /vendor/bin/cdsprpcd
638 class main
639 user system
640 group system
641
Chris Friesdc2b50d2017-06-27 12:02:00 -0500642service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
643 class core
644 user root
645 oneshot
646
647service rmt_storage /vendor/bin/rmt_storage
648 class core
649 user root
SalmaxChang7f883b82018-05-25 17:36:16 +0800650 ioprio rt 0
651 shutdown critical
Chris Friesdc2b50d2017-06-27 12:02:00 -0500652
653service tftp_server /vendor/bin/tftp_server
654 class core
655 user root
656 group root system
657
Hungyen Weng07c1fd22019-03-29 15:07:07 +0800658service modem_svc /vendor/bin/modem_svc -q
SalmaxChang4abdfe22019-02-22 10:36:08 +0800659 class core
660 user root
661 group system
662 capabilities NET_BIND_SERVICE
663
Chris Friesdc2b50d2017-06-27 12:02:00 -0500664service cnss-daemon /vendor/bin/cnss-daemon -n -l
665 class late_start
666 user system
667 group system inet wifi
668
669service imsqmidaemon /vendor/bin/imsqmidaemon
670 class main
671 user system
672 socket ims_qmid stream 0660 system radio
673 group radio log diag
674
675service imsdatadaemon /vendor/bin/imsdatadaemon
676 class main
677 user system
678 socket ims_datad stream 0660 system radio
679 group system wifi radio inet log
680 disabled
681
Jayachandran C5e2ce412018-01-02 18:30:31 -0800682on property:vendor.ims.QMI_DAEMON_STATUS=1
Chris Friesdc2b50d2017-06-27 12:02:00 -0500683 start imsdatadaemon
684
685service ims_rtp_daemon /vendor/bin/ims_rtp_daemon
686 class main
687 user system
688 group radio diag inet log
689 disabled
690
Jayachandran C5e2ce412018-01-02 18:30:31 -0800691service imsrcsservice /vendor/bin/imsrcsd
Chris Friesdc2b50d2017-06-27 12:02:00 -0500692 class main
693 user system
694 group radio diag inet log
695 disabled
696
Jayachandran C5e2ce412018-01-02 18:30:31 -0800697on property:vendor.ims.DATA_DAEMON_STATUS=1
Chris Friesdc2b50d2017-06-27 12:02:00 -0500698 start ims_rtp_daemon
Chris Friesdc2b50d2017-06-27 12:02:00 -0500699 start imsrcsservice
700
Chris Friesdc2b50d2017-06-27 12:02:00 -0500701service cnd /vendor/bin/cnd
702 class main
Jayachandran Cc7707a72018-05-21 14:19:51 -0700703 user radio
Sooraj Sasindran41628e62018-05-18 16:51:51 -0700704 group system wifi inet radio wakelock
Chris Friesdc2b50d2017-06-27 12:02:00 -0500705
706service netmgrd /vendor/bin/netmgrd
707 class main
708 user root
709 group root wifi wakelock radio inet
710
711service port-bridge /vendor/bin/port-bridge
712 class main
713 user radio
714 group radio system inet
715 oneshot
716
717service ipacm /vendor/bin/ipacm
718 class main
719 user radio
720 group radio inet
721
Chris Friesdc2b50d2017-06-27 12:02:00 -0500722service loc_launcher /vendor/bin/loc_launcher
723 class late_start
724 group gps inet diag wifi
725
726service pd_mapper /vendor/bin/pd-mapper
727 class core
728
729# bugreport is triggered by holding down volume down, volume up and power
Abhijeet Kaurb70996f2019-08-02 15:30:07 +0100730service bugreport /system/bin/dumpstate -d -p -z
Chris Friesdc2b50d2017-06-27 12:02:00 -0500731 class main
732 disabled
733 oneshot
734 keycodes 114 115 116
735
Chris Friesdc2b50d2017-06-27 12:02:00 -0500736service devstart_sh /vendor/bin/init.qcom.devstart.sh
737 class main
738 user root
739 group root system
740 disabled
741 oneshot
742
743service ipastart_sh /vendor/bin/init.qcom.ipastart.sh
744 class main
745 user system
746 group net_admin
747 disabled
748 oneshot
749
750service insmod_sh /vendor/bin/init.insmod.sh
751 class main
752 user root
753 group root system
754 disabled
755 oneshot
Mark Salyzyn4371f922018-01-16 09:50:05 -0800756
Wei Wang0a5e1e72018-03-12 11:59:55 -0700757service msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance.conf
758 socket msm_irqbalance seqpacket 660 root system
759 class core
760 user root
761 group root
Suren Baghdasaryand4767482021-06-17 18:42:44 -0700762 task_profiles ServiceCapacityLow
Wei Wang0a5e1e72018-03-12 11:59:55 -0700763
Naseer Ahmed2e3d63d2018-03-16 09:30:55 -0400764service ppd /vendor/bin/mm-pp-dpps
765 class late_start
766 user graphics
767 group graphics
768 socket pps stream 0660 system system
769 disabled
770
Shawn Willden9ff2c612018-06-28 18:40:17 +0000771service wait_for_strongbox /vendor/bin/hw/wait_for_strongbox
772 user root
773 group root system
774 priority -20
775 ioprio rt 0
776
Kevin DuBois0ba18992018-09-26 15:19:58 -0700777on property:init.svc.vendor.hwcomposer-2-3=stopped
Naseer Ahmed2e3d63d2018-03-16 09:30:55 -0400778 stop ppd
779
Kevin DuBois0ba18992018-09-26 15:19:58 -0700780on property:init.svc.vendor.hwcomposer-2-3=running
Naseer Ahmed2e3d63d2018-03-16 09:30:55 -0400781 start ppd
782
Stuart Scott7aef2c22018-05-07 11:22:21 -0700783on property:ro.boot.mode=sota
784 setprop ro.boot.sota enabled
Ruchi Kandoiab31fbc2018-05-08 10:25:36 -0700785
Ruchi Kandoiab31fbc2018-05-08 10:25:36 -0700786on property:ro.boot.hardware.sku=G013B
Jack Yu226c8a52020-02-11 17:11:59 +0800787 start vendor.secure_element_hal_service_1_1
Ruchi Kandoiab31fbc2018-05-08 10:25:36 -0700788on property:ro.boot.hardware.sku=G013D
Jack Yu226c8a52020-02-11 17:11:59 +0800789 start vendor.secure_element_hal_service_1_1
Jack Wu093f89f2018-05-09 13:52:57 +0800790
791# charger driver exposes now finer grain control, map demo mode to those properties
792# demo mode can only be exit wipping data which will also reset the persist properties
793on property:sys.retaildemo.enabled=1
794 setprop persist.vendor.charge.stop.level 35
795 setprop persist.vendor.charge.start.level 30
796
Eino-Ville Talvala6005e322018-06-15 15:26:56 -0700797# For Japan radio builds, always enforce camera shutter sound
798# Since this property is read by the audio server in system service,
799# it should be written by the system init.
800on property:ro.boot.hardware.radio.subtype=1
801 setprop audio.camerasound.force true
Chris Fries838cab22018-07-27 16:45:25 -0500802
803on property:sys.boot_completed=1 && property:ro.boot.mode=firstboot
804 start init-firstboot-sh
805
806service init-firstboot-sh /vendor/bin/init.firstboot.sh
807 user nobody
808 disabled
809 oneshot
emilchunga745aba2018-10-24 08:13:40 +0800810
811# init-fingerprint-sh is for stopping fps_hal after init retry fail serval times
812# It keeps running until max init retry or fps_hal running successfully
813# vendor.fps_hal restarts until max init retry times
814#
815# /vendor/bin/init.fingerprint.sh [max_init_retry_times]
816service init-fingerprint-sh /vendor/bin/init.fingerprint.sh 10
817 group root
818 user root
819 disabled
820 oneshot
821
822on property:sys.boot_completed=1
823 start init-fingerprint-sh
824
825on property:vendor.fps.init.succeed=true && property:init.svc.vendor.fps_hal=stopped
826 start init-fingerprint-sh
Naina Nalluri4acb3ad2018-11-14 14:42:47 -0800827
Jayachandran C112172b2019-04-22 14:42:15 -0700828on boot && property:persist.radio.multisim.config=dsds && property:persist.vendor.radio.multisim_switch_support=true
Naina Nalluri4acb3ad2018-11-14 14:42:47 -0800829 start vendor.qcrild2
Jayachandran C112172b2019-04-22 14:42:15 -0700830
831# Disable DSDS if multisim_switch_support is not enabled
832on boot && property:persist.radio.multisim.config=dsds && property:persist.vendor.radio.multisim_switch_support=false
833 setprop persist.radio.multisim.config ""
834 stop vendor.qcrild2
Tao Baobbae0b52019-05-24 09:21:21 -0700835
Tianjie Xu26cdbef2019-11-11 15:28:17 -0800836# Write the dark theme magic to /misc partition.
837service vendor.theme_set /vendor/bin/misc_writer --set-dark-theme
Tao Baobbae0b52019-05-24 09:21:21 -0700838 disabled
839 oneshot
840
Tianjieb8ded202021-02-27 18:53:00 -0800841# Set dark boot flag when the device is provisioned.
842on property:persist.sys.device_provisioned=1
Tao Bao3e412c32019-06-12 11:09:53 -0700843 start vendor.theme_set
844
Tianjie Xu12f2d872019-11-18 13:32:37 -0800845on init && property:ro.boot.slot_successful=no
846 write /sys/module/msm_poweroff/parameters/warm_reset 1
847
848# Set or clear the warm reset flag upon the change of system property. The flag itself is set
849# by writing a sysfs file; and the file will be read by kernel.
850on property:ota.warm_reset=1
851 write /sys/module/msm_poweroff/parameters/warm_reset 1
852
853on property:ota.warm_reset=0
854 write /sys/module/msm_poweroff/parameters/warm_reset 0