blob: 94985f392b75532cf49ed641306bc87a853609b0 [file] [log] [blame]
merothh32be6882022-01-03 01:54:57 +05301# Copyright (c) 2009-2012, 2014-2021, The Linux Foundation. All rights reserved.
2#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are met:
5# * Redistributions of source code must retain the above copyright
6# notice, this list of conditions and the following disclaimer.
7# * Redistributions in binary form must reproduce the above copyright
8# notice, this list of conditions and the following disclaimer in the
9# documentation and/or other materials provided with the distribution.
10# * Neither the name of The Linux Foundation nor
11# the names of its contributors may be used to endorse or promote
12# products derived from this software without specific prior written
13# permission.
14#
15# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
19# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26#
27
28import /vendor/etc/init/hw/init.qti.ufs.rc
29import /vendor/etc/init/hw/init.qcom.usb.rc
30import /vendor/etc/init/hw/init.qcom.test.rc
31import /vendor/etc/init/hw/init.target.rc
32import /vendor/etc/init/hw/init.qcom.factory.rc
33
34on early-init
35 mount debugfs debugfs /sys/kernel/debug
36 chmod 0755 /sys/kernel/debug
37 mount tracefs tracefs /sys/kernel/tracing
38 chmod 0755 /sys/kernel/tracing
39
40 # create symlink for vendor mount points
41 symlink /vendor/firmware_mnt /firmware
42 symlink /vendor/bt_firmware /bt_firmware
43 symlink /vendor/dsp /dsp
44
45 # Change ownership of hw_recovery related nodes
46 chown system graphics /sys/kernel/debug/dri/0/debug/dump
47 chown system graphics /sys/kernel/debug/dri/0/debug/recovery_reg
48 chown system graphics /sys/kernel/debug/dri/0/debug/recovery_dbgbus
49 chown system graphics /sys/kernel/debug/dri/0/debug/recovery_vbif_dbgbus
50 chown system graphics /sys/kernel/debug/dri/0/debug/recovery_dsi_dbgbus
51
52 # Change ownership of sysfs power control node
53 chown system graphics /sys/class/drm/card0/device/power/control
54
55 # Change ownership of sw_sync node
56 chown system graphics /sys/kernel/debug/sync/sw_sync
57 chmod 0666 /sys/kernel/debug/sync/sw_sync
58
59 #Disable UFS clock scaling
60 write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 0
61
62 chown root system /dev/kmsg
63 chmod 0620 /dev/kmsg
64 # Load WIGIG platform driver
65 exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules msm_11ad_proxy
66
67on init
68
69 # Support legacy paths
70 symlink /sdcard /mnt/sdcard
71 symlink /sdcard /storage/sdcard0
72
73 # Create cgroup mount point for memory
74 mkdir /sys/fs/cgroup/memory/bg 0750 root system
75 write /sys/fs/cgroup/memory/bg/memory.swappiness 140
76 write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1
77 chown root system /sys/fs/cgroup/memory/bg/tasks
78 write /sys/kernel/icnss/wpss_boot 1
79 chmod 0660 /sys/fs/cgroup/memory/bg/tasks
80
81on post-fs
82 chmod 0755 /sys/kernel/debug/tracing
83
84on early-boot
85 # set RLIMIT_MEMLOCK to 64MB
86 setrlimit 8 67108864 67108864
87 # Allow subsystem (modem etc) debugging
88 write /sys/kernel/boot_adsp/boot 1
89 write /sys/kernel/boot_cdsp/boot 1
90 write /sys/devices/virtual/npu/msm_npu/boot 1
91 write /sys/devices/virtual/cvp/cvp/boot 1
92 exec u:r:vendor_qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh
93 exec u:r:vendor_qti_init_shell:s0 -- /vendor/bin/init.qti.can.sh
94 setprop ro.sf.lcd_density ${vendor.display.lcd_density}
95
96 chown system system /mnt/vendor/persist/data/pfm/licenses
97 chmod 0775 /mnt/vendor/persist/data/pfm/licenses
98 chown system system /mnt/vendor/persist/data/pfm/licenses/store_0
99 chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_0
100 chown system system /mnt/vendor/persist/data/pfm/licenses/store_1
101 chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_1
102 chown system system /mnt/vendor/persist/data/pfm/licenses/store_2
103 chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_2
104 chown system system /mnt/vendor/persist/data/pfm/licenses/store_3
105 chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_3
106 chown system system /mnt/vendor/persist/data/pfm/licenses/store_4
107 chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_4
108
109on boot
110 chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
111 chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
112 chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
113 chown bluetooth bluetooth /proc/bluetooth/sleep/proto
114 chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
115 chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
116 chown system system /sys/module/sco/parameters/disable_esco
117 chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
118 chown system system /sys/module/msm_core/parameters/polling_interval
119 chown system system /sys/module/msm_core/parameters/disabled
120 chown system system /sys/kernel/debug/msm_core/enable
121 chown system system /sys/kernel/debug/msm_core/ptable
122 chown system system /sys/kernel/boot_slpi/ssr
123 chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
124 chmod 0660 /sys/module/bluetooth_power/parameters/power
125 chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
126 chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set
127 chmod 0660 /sys/class/rfkill/rfkill0/state
128 chmod 0660 /proc/bluetooth/sleep/proto
129 chown bluetooth net_bt /dev/ttyHS0
130 chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
131 chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
132 chmod 0660 /dev/ttyHS0
133 chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
134 chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
135
136 chmod 0660 /dev/ttyHS2
137 chown bluetooth bluetooth /dev/ttyHS2
138
139 chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
140 chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
141
142 # This location is used by QCRIL to host UNIX domain
143 # socket files used for internal IPC within QCRIL
144 # modules
145 mkdir /dev/socket/qmux_radio 0770 radio radio
146 chmod 2770 /dev/socket/qmux_radio
147
148 mkdir /persist/drm 0770 system system
149 mkdir /persist/bluetooth 0770 bluetooth bluetooth
150 mkdir /persist/misc 0770 system system
151 mkdir /persist/alarm 0770 system system
152 mkdir /mnt/vendor/persist/time 0770 system system
153 mkdir /mnt/vendor/persist/secnvm 0770 system system
154 mkdir /mnt/vendor/persist/iar_db 0770 system system
155 mkdir /mnt/vendor/spunvm 0770 system system
156
157 #Create WIGIG socket area
158 mkdir /dev/socket/wigig 0770 wifi wifi
159
160 setprop wifi.interface wlan0
161
162 setprop ro.telephony.call_ring.multiple false
163
164 #Remove SUID bit for iproute2 ip tool
165 chmod 0755 /system/bin/ip
166
167
168 chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
169
170 setprop net.tcp.2g_init_rwnd 10
171
172 # To prevent out of order acknowledgements from making
173 # connection tracking to treat them as not belonging to
174 # the connection they belong to.
175 # Otherwise, a weird issue happens in which some long
176 # connections on high-throughput links get dropped when
177 # an ack packet comes out of order
178 write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
179
180 # Set the console loglevel to < KERN_WARN
181 # Set the default message loglevel to KERN_INFO
182 write /proc/sys/kernel/printk "4 6 1 7"
183
184 # Allow access for CCID command/response timeout configuration
185 chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
186
187 # bond0 used by FST Manager
188 chown wifi wifi /sys/class/net/bond0/bonding/queue_id
189
190 # Allow access to emmc rawdump block partition and dload sysfs node
191 chown root system /dev/block/bootdevice/by-name/rawdump
192 chmod 0660 /dev/block/bootdevice/by-name/rawdump
193 chown root system /sys/kernel/dload/emmc_dload
194 chmod 0660 /sys/kernel/dload/emmc_dload
195 chown root system /dev/block/bootdevice/by-name/ramdump
196 chmod 0660 /dev/block/bootdevice/by-name/ramdump
197 chown root system /sys/kernel/dload/dload_mode
198 chmod 0660 /sys/kernel/dload/dload_mode
199
200 chown system system /sys/class/backlight/panel0-backlight/brightness
201 chown system system /sys/class/backlight/panel0-backlight/max_brightness
202 chown system system /sys/class/backlight/panel1-backlight/brightness
203 chown system system /sys/class/backlight/panel1-backlight/max_brightness
204
205 # Allow access to sensors device attributes
206 chown system system /sys/class/sensors/MPU6050-accel/enable
207 chown system system /sys/class/sensors/MPU6050-accel/poll_delay
208 chown system system /sys/class/sensors/MPU6050-gyro/enable
209 chown system system /sys/class/sensors/MPU6050-gyro/poll_delay
210 chown system system /sys/class/sensors/apds9930-light/enable
211 chown system system /sys/class/sensors/apds9930-light/poll_delay
212 chown system system /sys/class/sensors/apds9930-proximity/enable
213 chown system system /sys/class/sensors/apds9930-proximity/poll_delay
214
215 # Create directory used for display
216 # for backward compatibility
217 mkdir /persist/display 0770 system graphics
218 mkdir /mnt/vendor/persist/display 0770 system graphics
219
220 # Create vpp directory
221 mkdir /mnt/vendor/persist/vpp 0770 media media
222
223
224 # Create hvdcp_opti directory
225 mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system
226
227 # limit discard size to 128MB in order to avoid long IO latency
228 write /sys/block/sda/queue/discard_max_bytes 134217728
229
230# msm specific files that need to be created on /data
231on post-fs-data
232 mkdir /data/vendor/misc 01771 system system
233
234 # Create directory used for dump collection
235 mkdir /data/vendor/ssrdump 0770 root system
236
237 # Create directory used by display clients
238 mkdir /data/vendor/display 0770 system graphics
239
240 # Change lm related dirs
241 mkdir /data/vendor/lm 0700 root root
242
243 # Create directory used by powermodule
244 mkdir /data/vendor/pwr 0700 root root
245
246 # Create directory used by media clients
247 mkdir /data/vendor/media 0770 mediacodec media
248
249 # Create /data/vendor/tzstorage directory for SFS listener
250 mkdir /data/vendor/tzstorage 0770 system system
251
252 # Create directory for apps access via QTEEConnector
253 mkdir /data/vendor/qtee 0770 system system
254
255 #Create folder of camera
256 mkdir /data/vendor/camera 0770 camera camera
257
258
259 #Create directory for tftp
260 mkdir /data/vendor/tombstones 0771 system system
261 mkdir /data/vendor/tombstones/rfs 0771 system system
262
263 mkdir /data/vendor/ramdump 0771 root system
264 mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth
265 mkdir /data/vendor/ramdump/bluetooth 0770 bluetooth bluetooth
266
267 # Create the directories used by the Wireless subsystem
268 mkdir /data/vendor/wifi 0770 wifi wifi
269 mkdir /data/vendor/wifi/sockets 0770 wifi wifi
270 mkdir /data/vendor/wifi/hostapd 0770 wifi wifi
271 mkdir /data/vendor/wifi/hostapd/ctrl 0770 wifi wifi
272 mkdir /data/vendor/wifi/wpa_supplicant 0770 wifi wifi
273 mkdir /data/vendor/wifi/wigig_hostapd 0770 wifi wifi
274 mkdir /data/vendor/wifi/wpa 0770 wifi wifi
275 mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
276
277 # Create the directories used by WiGig Sensing
278 mkdir /data/vendor/sensing 0770 system wifi
279
280 # Create the directories used by CnE subsystem
281 mkdir /data/vendor/connectivity 0771 radio radio
282 chown radio radio /data/vendor/connectivity
283
284 # Create directory used by audio subsystem
285 mkdir /data/vendor/audio 0770 audio audio
286
287 # Create directory for audio delta files
288 mkdir /data/vendor/audio/acdbdata 0770 media audio
289 mkdir /data/vendor/audio/acdbdata/delta 0770 media audio
290
291 # Create directory for radio
292 mkdir /data/vendor/radio 0770 system radio
293 rm /data/vendor/radio/shmbus
294
295 # Create directory for modem_config
296 mkdir /data/vendor/modem_config 0570 radio root
297
298 # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
299 # We chown/chmod /persist again so because mount is run as root + defaults
300 chown root system /persist
301 chmod 0771 /persist
302 chown system system /persist/WCNSS_qcom_wlan_nv.bin
303 chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
304 chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
305 chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
306 chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
307
308 # Chown polling nodes as needed from UI running on system server
309 chown system system /sys/devices/platform/msm_sdcc.1/polling
310 chown system system /sys/devices/platform/msm_sdcc.2/polling
311 chown system system /sys/devices/platform/msm_sdcc.3/polling
312 chown system system /sys/devices/platform/msm_sdcc.4/polling
313
314 #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
315 #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
316
317 #Create directories for Location services
318 mkdir /data/vendor/location 0770 gps gps
319 mkdir /data/vendor/location/mq 0770 gps gps
320 mkdir /data/vendor/location/xtwifi 0770 gps gps
321 mkdir /dev/socket/location 0770 gps gps
322 mkdir /dev/socket/location/mq 0770 gps gps
323 mkdir /dev/socket/location/xtra 0770 gps gps
324 mkdir /dev/socket/location/dgnss 0770 gps gps
325
326 #Create directories for wifihal services
327 mkdir /dev/socket/wifihal 0770 wifi wifi
328 chmod 2770 /dev/socket/wifihal
329
330 # Create /data/time folder for time-services
331 mkdir /data/vendor/time/ 0700 system system
332
333 setprop vold.post_fs_data_done 1
334
335 #Create a folder for SRS to be able to create a usercfg file
336 #mkdir /data/data/media 0770 media media
337
338 #Create FM dir for patchdownloader
339 mkdir /data/vendor/fm 0770 system system
340 chmod 0770 /data/vendor/fm
341
342 #Create PERFD deamon related dirs
343 mkdir /data/vendor/perfd 0770 root system
344 chmod 2770 /data/vendor/perfd
345 rm /data/vendor/perfd/default_values
346
347 mkdir /data/vendor/secure_element 0777 system system
348
349 #Create IOP deamon related dirs
350 mkdir /data/vendor/iop 0700 root system
351
352 # Mark the copy complete flag to not completed
353 write /data/vendor/radio/copy_complete 0
354 chown radio radio /data/vendor/radio/copy_complete
355 chmod 0660 /data/vendor/radio/copy_complete
356
357 # copy prebuilt qcril.db files always
358 copy /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db
359 chown radio radio /data/vendor/radio/qcril_prebuilt.db
360 chmod 0660 /data/vendor/radio/qcril_prebuilt.db
361 copy /vendor/radio/qcril_database/qcrilNr.db /data/vendor/radio/qcrilNr_prebuilt.db
362 copy /vendor/etc/qcril_database/qcrilNr.db /data/vendor/radio/qcrilNr_prebuilt.db
363 chown radio radio /data/vendor/radio/qcrilNr_prebuilt.db
364 chmod 0660 /data/vendor/radio/qcrilNr_prebuilt.db
365
366 # File flags for prebuilt ril db file
367 write /data/vendor/radio/prebuilt_db_support 1
368 chown radio radio /data/vendor/radio/prebuilt_db_support
369 chmod 0400 /data/vendor/radio/prebuilt_db_support
370 write /data/vendor/radio/db_check_done 0
371 chown radio radio /data/vendor/radio/db_check_done
372 chmod 0660 /data/vendor/radio/db_check_done
373
374 # qti-logkit data
375 mkdir /data/vendor/qti-logkit/ 0771 system system
376 mkdir /data/vendor/qti-logkit/shared-privileged/ 2770 system system
377 mkdir /data/vendor/qti-logkit/shared-public/ 2770 system diag
378 mkdir /data/vendor/qti-logkit/socket-privileged/ 2770 system system
379 mkdir /data/vendor/qti-logkit/socket-public/ 2750 system diag
380 mkdir /data/vendor/qti-logkit/logdata/ 2750 system shell
381
382 #Create SWAP related dirs
383 mkdir /data/vendor/swap 0770 root system
384 chmod 2770 /data/vendor/swap
385
386 # set aggressive read ahead for dm-0 and dm-1 during boot up
387 write /sys/block/dm-0/queue/read_ahead_kb 2048
388 write /sys/block/dm-1/queue/read_ahead_kb 2048
389 write /sys/block/dm-2/queue/read_ahead_kb 2048
390
391 # Create vpp directory
392 mkdir /data/vendor/vpp 0770 media media
393
394 #Create dir for TUI
395 mkdir /data/vendor/tui 0700 system drmrpc
396
397service nqnfcinfo /system/vendor/bin/nqnfcinfo
398 class late_start
399 group nfc
400 user system
401 oneshot
402
403service iop /system/vendor/bin/iop
404 class main
405 user root
406 group root
407 disabled
408 socket iop seqpacket 0666 root system
409
410service qcomsysd /system/vendor/bin/qcom-system-daemon
411 class main
412 user root
413 group root diag oem_2901
414 disabled
415
416on property:persist.vendor.qcomsysd.enabled=1
417 enable qcomsysd
418
419on property:persist.vendor.qcomsysd.enabled=0
420 stop qcomsysd
421
422service vendor.ssr_setup /system/vendor/bin/ssr_setup
423 oneshot
424 disabled
425
426service vendor.ss_ramdump /system/vendor/bin/subsystem_ramdump
427 class main
428 user system
429 group system
430 ioprio rt 4
431 disabled
432
433on property:ro.vendor.iocgrp.config=1
434 mkdir /dev/blkio
435 mount cgroup none /dev/blkio blkio
436 chown system system /dev/blkio
437 chown system system /dev/blkio/tasks
438 chmod 0664 /dev/blkio/tasks
439 mkdir /dev/blkio/bg 0755 system system
440 chown system system /dev/blkio/bg/tasks
441 chmod 0664 /dev/blkio/bg/tasks
442 write /dev/blkio/blkio.weight 1000
443 write /dev/blkio/bg/blkio.weight 100
444
445on property:persist.sys.ssr.enable_debug=*
446 write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
447
448on property:persist.sys.mba_boot_timeout=*
449 write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
450
451on property:persist.sys.modem_auth_timeout=*
452 write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
453
454on property:persist.sys.pil_proxy_timeout=*
455 write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
456
457on property:persist.vendor.ssr.restart_level=*
458 start vendor.ssr_setup
459
460on property:persist.vendor.ssr.enable_ramdumps=1
461 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
462 mkdir /data/vendor/ramdump_ssr 770 system system
463 start vendor.ss_ramdump
464
465on property:persist.vendor.ssr.enable_ramdumps=0
466 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
467
468on property:persist.vendor.sys.rawdump_copy=1
469 write /sys/kernel/dload/emmc_dload 1
470
471on property:persist.vendor.sys.rawdump_copy=0
472 write /sys/kernel/dload/emmc_dload 0
473
474on property:sys.boot_completed=1
475 write /dev/kmsg "Boot completed "
476 #Enable UFS clock scaling back
477 write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 1
478 #Reset read ahead for dm-0 and dm-1 to 512kb
479 write /sys/block/dm-0/queue/read_ahead_kb 512
480 write /sys/block/dm-1/queue/read_ahead_kb 512
481 #WDSP FW boot sysfs node used by STHAL
482 chown media audio /sys/kernel/wdsp0/boot
483 chown media audio /sys/kernel/wcd_cpe0/fw_name
484 #Reinit lmkd to reconfigure lmkd properties
485 setprop lmkd.reinit 1
486
487on property:persist.vendor.radio.atfwd.start=false
488 stop vendor.atfwd
489
490on property:vendor.radio.atfwd.start=false
491 stop vendor.atfwd
492
493# corefile limit
494on property:persist.debug.trace=1
495 mkdir /data/core 0777 root root
496 write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
497
498on property:vendor.media.target.version=*
499 setprop vendor.sys.media.target.version ${vendor.media.target.version}
500
501on property:vendor.netflix.bsp_rev=*
502 setprop ro.netflix.bsp_rev ${vendor.netflix.bsp_rev}
503
504on property:vendor.media.target_variant=*
505 setprop ro.media.xml_variant.codecs ${vendor.media.target_variant}
506 setprop ro.media.xml_variant.codecs_performance ${vendor.media.target_variant}
507
508service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh
509 class core
510 user root
511 oneshot
512
513service qcom-c_main-sh /vendor/bin/init.class_main.sh
514 class main
515 user root
516 group root system
517 oneshot
518
519on property:vold.decrypt=trigger_restart_framework
520 start qcom-c_main-sh
521 start wcnss-service
522
523service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
524 class core
525 user vendor_qrtr
526 group vendor_qrtr
527 capabilities NET_BIND_SERVICE
528
529service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
530 class core
531 user root
532 oneshot
533
534service qmiproxy /system/bin/qmiproxy
535 class main
536 user radio
537 group radio diag
538 disabled
539
540service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
541 -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
542 -g@android:vendor_wpa_wlan0
543# we will start as root and wpa_supplicant will switch to user wifi
544# after setting up the capabilities required for WEXT
545# user wifi
546# group wifi inet keystore
547 interface android.hardware.wifi.supplicant@1.0::ISupplicant default
548 interface android.hardware.wifi.supplicant@1.1::ISupplicant default
549 interface android.hardware.wifi.supplicant@1.2::ISupplicant default
550 interface android.hardware.wifi.supplicant@1.3::ISupplicant default
551 interface vendor.qti.hardware.wifi.supplicant@2.0::ISupplicantVendor default
552 interface vendor.qti.hardware.wifi.supplicant@2.1::ISupplicantVendor default
553 interface vendor.qti.hardware.wifi.supplicant@2.2::ISupplicantVendor default
554 class main
555 socket vendor_wpa_wlan0 dgram 660 wifi wifi
556 disabled
557 oneshot
558
559service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \
560 -iwigig0 -Dnl80211 -c/data/vendor/wifi/wigig_supplicant.conf \
561 -m/data/vendor/wifi/wigig_p2p_supplicant.conf \
562 -O/data/vendor/wifi/wigig_sockets -dd \
563 -e/data/vendor/wifi/wigig_entropy.bin -g@android:wigig/wpa_wigig0 \
564 -S wigigsvc
565 # we will start as root and wpa_supplicant will switch to user wifi
566 # after setting up the capabilities required for WEXT
567 # user wifi
568 # group wifi inet keystore
569 class main
570 socket wigig/wpa_wigig0 dgram 660 wifi wifi
571 disabled
572 oneshot
573
574# Data Migration
575service vendor.move_wifi_data /system/bin/move_wifi_data.sh
576 class main
577 user wifi
578 group wifi
579 disabled
580 oneshot
581
582service wigignpt /vendor/bin/wigignpt
583 interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default
584 class hal
585 socket wigig/wigignpt stream 660 system wifi
586 user system
587 group wifi
588 capabilities NET_ADMIN
589 disabled
590
591on property:persist.vendor.wigig.npt.enable=1
592 start wigignpt
593
594service vendor.sensingdaemon /vendor/bin/sensingdaemon
595 class hal
596 socket wigig/sensingdaemon stream 660 system wifi
597 user system
598 group wifi
599 disabled
600
601service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
602 class late_start
603 disabled
604 oneshot
605
606service dhcpcd_bond0 /system/bin/dhcpcd -ABKLG
607 class late_start
608 disabled
609 oneshot
610
611service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
612 class late_start
613 disabled
614 oneshot
615
616service dhcpcd_wigig0 /system/bin/dhcpcd -ABKLG
617 class late_start
618 disabled
619 oneshot
620
621service iprenew_wlan0 /system/bin/dhcpcd -n
622 class late_start
623 disabled
624 oneshot
625
626service iprenew_bond0 /system/bin/dhcpcd -n
627 class late_start
628 disabled
629 oneshot
630
631service iprenew_p2p /system/bin/dhcpcd -n
632 class late_start
633 disabled
634 oneshot
635
636service iprenew_wigig0 /system/bin/dhcpcd -n
637 class late_start
638 disabled
639 oneshot
640
641service ptt_socket_app /system/vendor/bin/ptt_socket_app -d
642 class main
643 user wifi
644 group wifi system inet net_admin
645 capabilities NET_ADMIN
646 oneshot
647
648service ptt_ffbm /system/vendor/bin/ptt_socket_app -f -d
649 user root
650 group root
651 disabled
652 oneshot
653
654service wifi_ftmd /system/vendor/bin/wifi_ftmd
655 user system
656 group system inet net_admin
657 socket wififtmd_server dgram 0660 system system
658 disabled
659 oneshot
660
661on property:vendor.wifi.ftmd.load=true
662 insmod /system/lib/modules/pronto/pronto_wlan.ko con_mode=5
663
664service cnss-daemon /system/vendor/bin/cnss-daemon -n -l
665 class late_start
666 user system
667 group system inet net_admin wifi
668 capabilities NET_ADMIN
669
670on property:sys.shutdown.requested=*
671 write /sys/kernel/shutdown_wlan/shutdown 1
672 stop cnss-daemon
673
674service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
675 class late_start
676 disabled
677 oneshot
678
679service iprenew_bt-pan /system/bin/dhcpcd -n
680 class late_start
681 disabled
682 oneshot
683
684service ssgqmigd /vendor/bin/ssgqmigd
685 class late_start
686 user radio
687 group radio gps system
688 socket ssgqmig seqpacket 0660 radio inet
689
690service mlid /vendor/bin/mlid
691 class late_start
692 user gps
693 group gps
694 socket mlid stream 0666 gps gps
695
696service loc_launcher /system/vendor/bin/loc_launcher
697 class late_start
698 user gps
699 group gps
700
701service qcom-sh /vendor/bin/init.qcom.sh
702 class late_start
703 user root
704 group root system radio
705 oneshot
706# Remove since is deprecated but throws AVC denial.
707# service crashdata-sh /vendor/bin/init.qcom.crashdata.sh
708# class late_start
709# user root
710# oneshot
711
712service qcom-post-boot /vendor/bin/init.qcom.post_boot.sh
713 class late_start
714 user root
715 group root system wakelock graphics
716 disabled
717 oneshot
718
719service qti-testscripts /system/bin/sh /product/etc/init.qcom.testscripts.sh
720 class late_start
721 user root
722 disabled
723 oneshot
724 seclabel u:r:qti-testscripts:s0
725
726service wifi-sdio-on /vendor/bin/init.qcom.sdio.sh
727 class late_start
728 group wifi inet
729 disabled
730 oneshot
731
732service wifi-crda /vendor/bin/init.crda.sh
733 class late_start
734 user root
735 disabled
736 oneshot
737
738on property:sys.boot_completed=1
739 start qcom-post-boot
740 start qti-testscripts
741
742on property:ro.vendor.ril.mbn_copy_completed=1
743 write /data/vendor/radio/copy_complete 1
744
745service qvop-daemon /vendor/bin/qvop-daemon
746 class late_start
747 user system
748 group system drmrpc
749
750service vendor.atfwd /vendor/bin/ATFWD-daemon
751 class late_start
752 user system
753 group system radio
754
755service hostapd_fst /vendor/bin/hw/hostapd -dd -g /data/vendor/wifi/hostapd/global
756 class main
757 capabilities NET_ADMIN NET_RAW
758 user wifi
759 group wifi
760 disabled
761 oneshot
762
763service battery_monitor /system/bin/battery_monitor
764 user system
765 group system
766 disabled
767
768service vendor.ril-daemon2 /vendor/bin/hw/rild -c 2
769 class main
770 user radio
771 disabled
772 group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log
773 capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
774
775service vendor.ril-daemon3 /vendor/bin/hw/rild -c 3
776 class main
777 user radio
778 disabled
779 group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log
780 capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
781
782service profiler_daemon /system/bin/profiler_daemon
783 class late_start
784 user root
785 group root
786 disabled
787
788service charger /system/bin/charger
789 class charger
790 user system
791 group system graphics input
792 capabilities SYS_BOOT
793 seclabel u:r:charger:s0
794
795service vendor.ssr_diag /system/vendor/bin/ssr_diag
796 class late_start
797 user system
798 group system
799 disabled
800
801service diag_mdlog_start /system/vendor/bin/diag_mdlog
802 class late_start
803 user shell
804 group system oem_2901 sdcard_rw sdcard_r media_rw
805 disabled
806 oneshot
807
808service diag_mdlog_stop /system/vendor/bin/diag_mdlog -k
809 class late_start
810 user shell
811 group system oem_2901 sdcard_rw sdcard_r media_rw
812 disabled
813 oneshot
814
815service qlogd /system/xbin/qlogd
816 socket qlogd stream 0662 system system
817 class main
818 disabled
819on property:persist.sys.qlogd=1
820 start qlogd
821on property:persist.sys.qlogd=0
822 stop qlogd
823
824service vm_bms /vendor/bin/vm_bms
825 class main
826 user root
827 group system wakelock
828
829service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
830 class core
831 user root
832 group root
833 disabled
834
835service vendor.msm_irqbal_lb /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_little_big.conf
836 class core
837 user root
838 group root
839 disabled
840
841service vendor.msm_irqbl_sdm630 /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_sdm630.conf
842 class core
843 user root
844 group root
845 disabled
846
847# service for USERDEBUG
848service vendor.LKCore-dbg /vendor/bin/LKCore
849 class late_start
850 oneshot
851 disabled
852 user root
853 group root system log diag net_raw
854
855# service for USER
856service vendor.LKCore-rel /vendor/bin/LKCore
857 class late_start
858 oneshot
859 disabled
860 user system
861 group system log diag
862
863service qseeproxydaemon /system/vendor/bin/qseeproxydaemon
864 class late_start
865 user system
866 group system
867
868service esepmdaemon /system/vendor/bin/esepmdaemon
869 class core
870 user system
871 group nfc
872
873on charger
874 setprop persist.sys.usb.config mass_storage
875 start qcom-post-boot
876
877#add poweroffhandler
878service poweroffhandler /system/vendor/bin/poweroffhandler
879 class core
880 user media
881 group graphics audio
882 disabled
883 oneshot
884
885service time_daemon /vendor/bin/time_daemon
886 class main
887 user system
888 group system
889 capabilities SYS_TIME
890
891# Set vendor-ril lib path based on Meta version
892on property:vendor.rild.libpath=*
893 setprop rild.libpath ${vendor.rild.libpath}
894
895on property:ro.vendor.radio.noril=*
896 setprop ro.radio.noril ${ro.vendor.radio.noril}
897
898service vendor.power_off_alarm /vendor/bin/power_off_alarm
899 class core
900 group system
901 disabled
902 oneshot
903
904service vendor.hbtp /vendor/bin/hbtp_daemon
905 class main
906 user system
907 group system
908 capabilities SYS_NICE
909 disabled
910
911service chre /vendor/bin/chre
912 class late_start
913 user system
914 group system
915 socket chre seqpacket 0660 root system
916 shutdown critical
917
918on property:vendor.chre.enabled=0
919 stop chre
920
921service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
922 class main
923 disabled
924 oneshot
925 keycodes 114 115 116
926
927#Set GPU Opengles version
928on property:vendor.opengles.version=*
929 setprop ro.opengles.version ${vendor.opengles.version}
930
931#Set gpu available frequencies property
932on property:vendor.gpu.available_frequencies=*
933 setprop ro.vendor.gpu.available_frequencies ${vendor.gpu.available_frequencies}
934
935service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service
936 override
937 class hal
938 user audioserver
939 # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
940 group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock
941 capabilities BLOCK_SUSPEND
942 ioprio rt 4
943 writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
944 onrestart restart audioserver