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