1 on charger 2 write /sys/devices/system/cpu/cpu2/online 0 3 write /sys/devices/system/cpu/cpu3/online 0 4 write /sys/module/lpm_levels/parameters/sleep_disabled 0 5 wait /dev/block/platform/soc/624000.ufshc 6 # Enable UFS powersaving 7 write /sys/devices/soc/624000.ufshc/clkgate_enable 1 8 write /sys/devices/soc/624000.ufshc/624000.ufshc:ufs_variant/pm_qos_enable 1 9 write /sys/module/lpm_levels/parameters/sleep_disabled N 10 11 service vendor.charger /charger 12 class charger 13 seclabel u:r:charger:s0 14 15 on early-init 16 mount debugfs debugfs /sys/kernel/debug 17 chmod 0755 /sys/kernel/debug 18 19 on init 20 # Disable UFS powersaving 21 write /sys/devices/soc/624000.ufshc/clkgate_enable 0 22 write /sys/devices/soc/624000.ufshc/624000.ufshc:ufs_variant/pm_qos_enable 0 23 write /sys/module/lpm_levels/parameters/sleep_disabled Y 24 25 # QSEE rpmb listener need symlink for bootdevice 26 wait /dev/block/platform/soc/${ro.boot.bootdevice} 27 symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice 28 29 # We have vendor/ as early mount so we can start qseecomd earlier 30 # early mount partions e.g. vendor/ will be mounted in init first stage 31 # see b/27805372 32 start vendor.qseecomd 33 34 # Support legacy paths 35 symlink /sdcard /mnt/sdcard 36 symlink /sdcard /storage/sdcard0 37 38 # Setup cpusets used by the VR services. 39 mkdir /dev/cpuset/kernel 0750 root system 40 write /dev/cpuset/kernel/cpus 0 41 write /dev/cpuset/kernel/mems 0 42 chown system system /dev/cpuset/kernel/tasks 43 chmod 0660 /dev/cpuset/kernel/tasks 44 45 mkdir /dev/cpuset/system 0750 root system 46 write /dev/cpuset/system/cpus 0 47 write /dev/cpuset/system/mems 0 48 chown system system /dev/cpuset/system/tasks 49 chmod 0660 /dev/cpuset/system/tasks 50 51 mkdir /dev/cpuset/system/performance 0750 root system 52 write /dev/cpuset/system/performance/cpus 0 53 write /dev/cpuset/system/performance/mems 0 54 chown system system /dev/cpuset/system/performance/tasks 55 chmod 0660 /dev/cpuset/system/performance/tasks 56 57 mkdir /dev/cpuset/system/background 0750 root system 58 write /dev/cpuset/system/background/cpus 0 59 write /dev/cpuset/system/background/mems 0 60 chown system system /dev/cpuset/system/background/tasks 61 chmod 0660 /dev/cpuset/system/background/tasks 62 63 mkdir /dev/cpuset/application 0750 root system 64 write /dev/cpuset/application/cpus 0 65 write /dev/cpuset/application/mems 0 66 chown system system /dev/cpuset/application/tasks 67 chmod 0660 /dev/cpuset/application/tasks 68 69 mkdir /dev/cpuset/application/performance 0750 root system 70 write /dev/cpuset/application/performance/cpus 0 71 write /dev/cpuset/application/performance/mems 0 72 chown system system /dev/cpuset/application/performance/tasks 73 chmod 0660 /dev/cpuset/application/performance/tasks 74 75 mkdir /dev/cpuset/application/background 0750 root system 76 write /dev/cpuset/application/background/cpus 0 77 write /dev/cpuset/application/background/mems 0 78 chown system system /dev/cpuset/application/background/tasks 79 chmod 0660 /dev/cpuset/application/background/tasks 80 81 # set default schedTune value for foreground/top-app (only affects EAS) 82 write /dev/stune/foreground/schedtune.prefer_idle 1 83 write /dev/stune/top-app/schedtune.boost 10 84 write /dev/stune/top-app/schedtune.prefer_idle 1 85 write /dev/stune/rt/schedtune.boost 30 86 write /dev/stune/rt/schedtune.prefer_idle 1 87 88 # Create UDS structure for base VR services. 89 mkdir /dev/socket/pdx 0775 system system 90 mkdir /dev/socket/pdx/system 0775 system system 91 mkdir /dev/socket/pdx/system/buffer_hub 0775 system system 92 mkdir /dev/socket/pdx/system/performance 0775 system system 93 mkdir /dev/socket/pdx/system/vr 0775 system system 94 mkdir /dev/socket/pdx/system/vr/display 0775 system system 95 mkdir /dev/socket/pdx/system/vr/pose 0775 system system 96 mkdir /dev/socket/pdx/system/vr/sensors 0775 system system 97 98 # ZRAM setup 99 write /sys/block/zram0/comp_algorithm lz4 100 write /proc/sys/vm/page-cluster 0 101 102 on fs 103 mount_all /vendor/etc/fstab.${ro.hardware} --early 104 105 # Keeping following partitions outside fstab file. As user may not have 106 # these partition flashed on the device. Failure to mount any partition in fstab file 107 # results in failure to launch late-start class. 108 109 wait /dev/block/platform/soc/624000.ufshc/sda18 110 mount ext4 /dev/block/platform/soc/624000.ufshc/by-name/cache /cache nosuid nodev noatime barrier=1 111 112 restorecon_recursive /persist 113 mkdir /persist/data 0700 system system 114 115 # for android.hardware.health (a] 2.0-service.marlin cycle count backup 116 mkdir /persist/battery 0700 system system 117 118 on post-fs 119 symlink /dev/block/platform/soc.0/f9824900.sdhci /dev/block/bootdevice 120 # Wait qseecomd started 121 wait_for_prop sys.listeners.registered true 122 123 on late-fs 124 # Start devices by sysfs trigger 125 start vendor.devstart_sh 126 127 # Start services for bootanim 128 start surfaceflinger 129 start bootanim 130 start vendor.hwcomposer-2-1 131 start vendor.configstore-hal 132 start vendor.gralloc-2-0 133 134 # Wait for hwservicemanager ready since fsck might be triggered in mount_all --late 135 # In such case, init won't responce the property_set from hwservicemanager and then 136 # cause services for bootanim not running. 137 wait_for_prop hwservicemanager.ready true 138 # Mount RW partitions which need run fsck 139 mount_all /vendor/etc/fstab.${ro.hardware} --late 140 141 # boot time fs tune 142 write /sys/block/sda/queue/iostats 0 143 write /sys/block/sda/queue/scheduler cfq 144 write /sys/block/sda/queue/iosched/slice_idle 0 145 write /sys/block/sda/queue/read_ahead_kb 2048 146 write /sys/block/sda/queue/nr_requests 256 147 write /sys/block/dm-0/queue/read_ahead_kb 2048 148 write /sys/block/dm-1/queue/read_ahead_kb 2048 149 150 # Start time daemon early so that the system time can be set early 151 start vendor.time_daemon 152 153 on post-fs-data 154 # We can start netd here before in is launched in common init.rc on zygote-start 155 start netd 156 # Set sku property 157 start vendor.mid_sh 158 # Wait until the system time is set 159 wait_for_prop sys.time.set true 160 161 # b/36601397 Setup debug folders for camera 162 mkdir /data/vendor/camera 0770 camera camera 163 164 # zygote need to be started after otapreopt which will be done on post-fs-data 165 on zygote-start 166 # zygote is started in common init.rc 167 # and now we can continue initialize /data/ 168 mkdir /data/tombstones 0771 system system 169 mkdir /tombstones/modem 0771 system system 170 mkdir /tombstones/lpass 0771 system system 171 mkdir /tombstones/wcnss 0771 system system 172 mkdir /tombstones/dsps 0771 system system 173 mkdir /persist/data/sfs 0700 system system 174 mkdir /persist/data/tz 0700 system system 175 mkdir /data/misc/dts 0770 media audio 176 mkdir /data/misc/tloc/ 0700 system drmrpc 177 mkdir /data/misc/qvop 0660 system system 178 mkdir /data/misc/audio_pp 0771 media audio 179 mkdir /data/preloads 0775 system system 180 mkdir /data/preloads/media 0775 system system 181 mkdir /data/preloads/demo 0775 system system 182 mkdir /data/misc/netmgr 0770 system radio 183 184 # Disable verbosity for sensorhub 185 write /d/sps/debug_level_option 4 186 write /d/sps/log_level_sel 4 187 # Write to the base address of BAM pipe 188 write /d/sps/bam_addr 122961920 189 190 # Create directory for TZ Apps 191 mkdir /data/misc/qsee 0770 system system 192 193 mkdir /data/media 0770 media_rw media_rw 194 chown media_rw media_rw /data/media 195 196 mkdir /data/misc/ipa 0700 net_admin net_admin 197 198 # Create the directories used by the Wireless subsystem 199 mkdir /data/misc/wifi 0770 wifi wifi 200 mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi 201 mkdir /data/vendor/wifi 0771 wifi wifi 202 mkdir /data/vendor/wifi/wpa 0770 wifi wifi 203 mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi 204 mkdir /data/misc/dhcp 0770 dhcp dhcp 205 chown dhcp dhcp /data/misc/dhcp 206 207 # Create port-bridge log dir 208 mkdir /data/misc/port_bridge 0770 radio radio 209 chmod 0770 /data/misc/port_bridge 210 211 # Create the directories used by CnE subsystem 212 mkdir /data/connectivity 0771 system system 213 chown system system /data/connectivity 214 215 # Create the directories used by DPM subsystem 216 mkdir /data/dpm 0771 system system 217 chown system system /data/dpm 218 219 mkdir /data/dpm/nsrm 0771 system system 220 chown system system /data/dpm/nsrm 221 222 # Create directory used by audio subsystem 223 mkdir /data/vendor/audio 0770 audio audio 224 225 # Create directory for audio delta files 226 mkdir /data/vendor/audio/acdbdata 0770 media audio 227 mkdir /data/vendor/audio/acdbdata/delta 0770 media audio 228 229 # Create directory used by the DASH client 230 mkdir /data/misc/dash 0770 media audio 231 232 # Create directory used by display clients 233 mkdir /data/misc/display 0770 system graphics 234 mkdir /persist/display 0770 system graphics 235 236 # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections 237 # We chown/chmod /persist again so because mount is run as root + defaults 238 chown system system /persist 239 chmod 0771 /persist 240 chmod 0664 /sys/devices/platform/msm_sdcc.1/polling 241 chmod 0664 /sys/devices/platform/msm_sdcc.2/polling 242 chmod 0664 /sys/devices/platform/msm_sdcc.3/polling 243 chmod 0664 /sys/devices/platform/msm_sdcc.4/polling 244 245 # Chown polling nodes as needed from UI running on system server 246 chown system system /sys/devices/platform/msm_sdcc.1/polling 247 chown system system /sys/devices/platform/msm_sdcc.2/polling 248 chown system system /sys/devices/platform/msm_sdcc.3/polling 249 chown system system /sys/devices/platform/msm_sdcc.4/polling 250 251 # Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant 252 mkdir /data/system 0775 system system 253 254 # Create directories for Location services 255 mkdir /data/misc/location 0770 gps gps 256 mkdir /data/misc/location/mq 0770 gps gps 257 mkdir /data/misc/location/xtwifi 0770 gps gps 258 mkdir /data/misc/location/gpsone_d 0770 system gps 259 mkdir /data/misc/location/quipc 0770 gps system 260 mkdir /data/misc/location/gsiff 0770 gps gps 261 262 # migrating the GNSS hal to vendor requires this to be relabeled; the 263 # directory itself is created by /vendor/bin/xtra-daemon 264 chown gps gps /data/misc/location/xtra 265 chmod 0750 /data/misc/location/xtra 266 chown gps gps /data/misc/location/xtra/socket_hal_xtra 267 chmod 0660 /data/misc/location/xtra/socket_hal_xtra 268 chown gps gps /data/misc/location/xtra/xtra.sqlite 269 270 # Create directory from IMS services 271 mkdir /data/shared 0755 272 chown system system /data/shared 273 274 # Create directory for FOTA 275 mkdir /data/fota 0771 276 chown system system /data/fota 277 278 # Create /data/time folder for time-services 279 mkdir /data/time/ 0700 system system 280 281 mkdir /data/audio/ 0770 media audio 282 283 # Create a folder for audio delta files 284 mkdir /data/audio/acdbdata 0770 media audio 285 mkdir /data/audio/acdbdata/delta 0770 media audio 286 287 setprop vold.post_fs_data_done 1 288 289 # Create FM dir for patchdownloader 290 mkdir /data/misc/fm 0770 system system 291 chmod 0770 /data/misc/fm 292 293 # RIDL data 294 mkdir /data/misc/SelfHost/ 0710 system shell 295 mkdir /data/misc/SelfHost/QCLogs/ 2750 system shell 296 mkdir /data/misc/SelfHost/QCLogs/temp/ 0700 system shell 297 mkdir /data/misc/SelfHost/storage/ 0700 system shell 298 mkdir /data/misc/SelfHost/Running/ 2750 system shell 299 mkdir /data/misc/SelfHost/socket/ 2770 system system 300 301 # Create PERFD deamon related dirs 302 setprop ro.min_freq_0 384000 303 mkdir /data/misc/perfd 0755 root system 304 chmod 2755 /data/misc/perfd 305 mkdir /data/system/perfd 0770 root system 306 rm /data/system/perfd/default_values 307 chmod 2770 /data/system/perfd 308 309 # NFC local data and nfcee xml storage 310 mkdir /data/vendor/nfc 0770 nfc nfc 311 312 # Create IOP deamon related dirs 313 mkdir /data/misc/iop 0770 root system 314 315 # Mark the copy complete flag to not completed 316 write /data/misc/radio/copy_complete 0 317 chown radio radio /data/misc/radio/copy_complete 318 chmod 0660 /data/misc/radio/copy_complete 319 320 # File flags for prebuilt ril db file 321 write /data/misc/radio/prebuilt_db_support 1 322 chown radio radio /data/misc/radio/prebuilt_db_support 323 chmod 0400 /data/misc/radio/prebuilt_db_support 324 write /data/misc/radio/db_check_done 0 325 chown radio radio /data/misc/radio/db_check_done 326 chmod 0660 /data/misc/radio/db_check_done 327 328 chown system system /sys/class/kgsl/kgsl-3d0/devfreq/max_freq 329 chmod 0660 /sys/class/kgsl/kgsl-3d0/devfreq/max_freq 330 chown system system /sys/class/kgsl/kgsl-3d0/devfreq/min_freq 331 chmod 0660 /sys/class/kgsl/kgsl-3d0/devfreq/min_freq 332 chown system system /sys/class/devfreq/soc:qcom,gpubw/min_freq 333 chmod 0660 /sys/class/devfreq/soc:qcom,gpubw/min_freq 334 335 on early-boot 336 # set RLIMIT_MEMLOCK to 64MB 337 setrlimit 8 67108864 67108864 338 # Allow subsystem (modem etc) debugging 339 write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug} 340 write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout} 341 write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout} 342 write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout} 343 # Update dm-verity state and set partition.*.verified properties 344 verity_update_state 345 346 # access permission for secure touch 347 chmod 0660 /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch_enable 348 chmod 0440 /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch 349 350 chmod 0664 /sys/devices/virtual/graphics/fb0/msm_cmd_autorefresh_en 351 chown system graphics /sys/devices/virtual/graphics/fb0/msm_cmd_autorefresh_en 352 353 chown system drmrpc /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch_enable 354 chown system drmrpc /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch 355 356 # Permission for laser sensor driver 357 chown camera camera /sys/class/htc_laser/laser/enable_ps_sensor 358 359 # Permission for LED driver 360 chown system system /sys/class/leds/red/on_off_ms 361 chown system system /sys/class/leds/green/on_off_ms 362 chown system system /sys/class/leds/blue/on_off_ms 363 chown system system /sys/class/leds/red/rgb_start 364 chown system system /sys/class/leds/green/rgb_start 365 chown system system /sys/class/leds/blue/rgb_start 366 chown system system /sys/class/leds/lcd-backlight/low_persistence 367 368 # Permission for vibrator amplitude 369 chown system system /sys/class/timed_output/vibrator/voltage_level 370 371 # wait for devices 372 wait_for_prop sys.qcom.devup 1 373 374 # vendor.health-hal needs to be able to RW 375 chown system system /sys/devices/soc/qpnp-fg-17/cycle_counts_bins 376 # HardwareInfo needs to be able to read CC bins 377 chmod 644 /sys/devices/soc/qpnp-fg-17/cycle_counts_bins 378 379 # dumpstate needs to read, vendor.health-hal needs to be able to RW 380 chown system system /sys/devices/soc/qpnp-fg-17/power_supply/bms/charge_full 381 # HardwareInfo needs to be able to read charge_full 382 chmod 644 /sys/devices/soc/qpnp-fg-17/power_supply/bms/charge_full 383 384 on boot 385 # from init.power.sh 386 # disable thermal hotplug to switch governor 387 write /sys/module/msm_thermal/core_control/enabled 0 388 389 # bring back main cores CPU 0,2 390 write /sys/devices/system/cpu/cpu0/online 1 391 write /sys/devices/system/cpu/cpu2/online 1 392 393 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000 394 395 # EAS: Capping the max frequency of silver core to 1.6GHz 396 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1593600 397 398 write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000 399 400 # if EAS is present, switch to sched governor (no effect if not EAS) 401 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "sched" 402 write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "sched" 403 404 # re-enable thermal hotplug 405 write /sys/module/msm_thermal/core_control/enabled 1 406 407 # Setting b.L scheduler parameters 408 write /proc/sys/kernel/sched_migration_fixup 1 409 write /proc/sys/kernel/sched_upmigrate 95 410 write /proc/sys/kernel/sched_downmigrate 90 411 write /proc/sys/kernel/sched_freq_inc_notify 400000 412 write /proc/sys/kernel/sched_freq_dec_notify 400000 413 write /proc/sys/kernel/sched_spill_nr_run 3 414 write /proc/sys/kernel/sched_init_task_load 100 415 416 # Exec init.foreground.sh in background 417 start vendor.foreground_sh 418 # add a cpuset for the camera daemon 419 # we want all cores for camera 420 mkdir /dev/cpuset/camera-daemon 421 write /dev/cpuset/camera-daemon/cpus 0-3 422 write /dev/cpuset/camera-daemon/mems 0 423 chown system system /dev/cpuset/camera-daemon 424 chown system system /dev/cpuset/camera-daemon/tasks 425 chmod 0664 /dev/cpuset/camera-daemon/tasks 426 427 # Update DVR cpusets to boot-time values. 428 write /dev/cpuset/kernel/cpus 0-3 429 write /dev/cpuset/system/cpus 0-3 430 write /dev/cpuset/system/performance/cpus 0-3 431 write /dev/cpuset/system/background/cpus 0-3 432 write /dev/cpuset/system/cpus 0-3 433 write /dev/cpuset/application/cpus 0-3 434 write /dev/cpuset/application/performance/cpus 0-3 435 write /dev/cpuset/application/background/cpus 0-3 436 write /dev/cpuset/application/cpus 0-3 437 438 # Bluetooth 439 chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power 440 chown bluetooth net_bt /sys/class/rfkill/rfkill0/type 441 chown bluetooth net_bt /sys/class/rfkill/rfkill0/state 442 chown bluetooth bluetooth /proc/bluetooth/sleep/proto 443 chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm 444 chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite 445 chown system system /sys/module/sco/parameters/disable_esco 446 chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set 447 chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set 448 chmod 0660 /sys/module/bluetooth_power/parameters/power 449 chmod 0660 /sys/module/hci_smd/parameters/hcismd_set 450 chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set 451 chmod 0660 /sys/class/rfkill/rfkill0/state 452 chmod 0660 /proc/bluetooth/sleep/proto 453 chown bluetooth net_bt /dev/ttyHS0 454 chmod 0660 /sys/module/hci_uart/parameters/ath_lpm 455 chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite 456 chmod 0660 /dev/ttyHS0 457 chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock 458 chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock 459 460 chmod 0660 /dev/ttyHS2 461 chown bluetooth bluetooth /dev/ttyHS2 462 463 chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo 464 chmod 0660 /sys/class/rfkill/rfkill0/device/extldo 465 466 # Create QMUX deamon socket area 467 mkdir /dev/socket/qmux_radio 0770 radio radio 468 chmod 2770 /dev/socket/qmux_radio 469 mkdir /dev/socket/qmux_audio 0770 media audio 470 chmod 2770 /dev/socket/qmux_audio 471 mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth 472 chmod 2770 /dev/socket/qmux_bluetooth 473 mkdir /dev/socket/qmux_gps 0770 gps gps 474 chmod 2770 /dev/socket/qmux_gps 475 476 mkdir /persist/drm 0770 system system 477 478 # Create NETMGR daemon socket area 479 mkdir /dev/socket/netmgr 0750 radio radio 480 481 setprop wifi.interface wlan0 482 483 setprop ro.telephony.call_ring.multiple false 484 485 # Remove SUID bit for iproute2 ip tool 486 chmod 0755 /system/bin/ip 487 488 chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state 489 490 # For bridgemgr daemon to inform the USB driver of the correct transport 491 chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport 492 493 # For port-bridge daemon 494 chown radio radio /dev/at_mdm0 495 chown radio radio /dev/at_usb0 496 497 setprop net.tcp.2g_init_rwnd 10 498 499 # Assign TCP buffer thresholds to be ceiling value of technology maximums 500 # Increased technology maximums should be reflected here. 501 write /proc/sys/net/core/rmem_max 8388608 502 write /proc/sys/net/core/wmem_max 8388608 503 504 # To prevent out of order acknowledgements from making 505 # connection tracking to treat them as not belonging to 506 # the connection they belong to. 507 # Otherwise, a weird issue happens in which some long 508 # connections on high-throughput links get dropped when 509 # an ack packet comes out of order 510 write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1 511 512 # Allow access for CCID command/response timeout configuration 513 chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout 514 515 # bond0 used by FST Manager 516 chown wifi wifi /sys/class/net/bond0/bonding/queue_id 517 518 write /proc/sys/net/ipv6/conf/default/accept_ra_defrtr 1 519 520 # bluetooth init 521 setprop ro.qualcomm.bluetooth.opp true 522 setprop ro.qualcomm.bluetooth.hfp true 523 setprop ro.qualcomm.bluetooth.hsp true 524 setprop ro.qualcomm.bluetooth.pbap true 525 setprop ro.qualcomm.bluetooth.ftp true 526 setprop ro.qualcomm.bluetooth.nap true 527 setprop ro.bluetooth.sap true 528 setprop ro.bluetooth.dun true 529 setprop ro.qualcomm.bluetooth.map true 530 setprop ro.bluetooth.hfp.ver 1.6 531 532 # Wifi firmware reload path 533 chown wifi wifi /sys/module/wlan/parameters/fwpath 534 535 # QCOM FG SRAM dump for dumpstate 536 chown system system /d/fg_memif/data 537 chown system system /d/fg_memif/count 538 chown system system /d/fg_memif/address 539 540 on property:wc_transport.start_hci=true 541 start vendor.start_hci_filter 542 543 on property:wc_transport.start_hci=false 544 stop vendor.start_hci_filter 545 546 on property:wc_transport.start_root=true 547 start vendor.hci_filter_root 548 549 on property:wc_transport.start_root=false 550 stop vendor.hci_filter_root 551 552 service vendor.per_mgr /vendor/bin/pm-service 553 class core 554 user system 555 group system 556 ioprio rt 4 557 558 service vendor.per_proxy /vendor/bin/pm-proxy 559 class core 560 user system 561 group system 562 disabled 563 564 on property:ro.build.type=userdebug 565 write /sys/class/uio/uio1/device/rtel/rtel 1 566 567 on property:init.svc.vendor.per_mgr=running 568 start vendor.per_proxy 569 570 on property:sys.uidcpupower=* 571 write /proc/uid_cpupower/enable 1 572 573 on property:sys.uidcpupower=0 574 write /proc/uid_cpupower/enable 0 575 576 on property:sys.shutdown.requested=* 577 stop vendor.per_proxy 578 # Disable subsystem restart 579 write /sys/module/subsystem_restart/parameters/disable_restart_work 0x9889deed 580 581 service vendor.qseecomd /vendor/bin/qseecomd 582 class core 583 user root 584 group root 585 586 service vendor.thermal-engine /vendor/bin/thermal-engine -c ${sys.qcom.thermalcfg:-/vendor/etc/thermal-engine.conf} 587 class hal 588 user root 589 group root system diag 590 socket thermal-send-client stream 0666 system system 591 socket thermal-recv-client stream 0660 system system 592 socket thermal-recv-passive-client stream 0666 system system 593 594 service vendor.time_daemon /vendor/bin/time_daemon 595 class core 596 user root 597 group root 598 599 service vendor.adsprpcd /vendor/bin/adsprpcd 600 class main 601 user media 602 group media 603 604 service vendor.imsqmidaemon /vendor/bin/imsqmidaemon 605 class main 606 user system 607 socket ims_qmid stream 0660 system radio 608 group radio log diag 609 610 service vendor.imsdatadaemon /vendor/bin/imsdatadaemon 611 class main 612 user system 613 socket ims_datad stream 0660 system radio 614 group system wifi radio inet log diag 615 disabled 616 617 on property:sys.ims.QMI_DAEMON_STATUS=1 618 start vendor.imsdatadaemon 619 620 service vendor.ims_rtp_daemon /vendor/bin/ims_rtp_daemon 621 class main 622 user system 623 socket ims_rtpd stream 0660 system radio 624 group radio diag inet log 625 disabled 626 627 628 on property:sys.ims.DATA_DAEMON_STATUS=1 629 start vendor.ims_rtp_daemon 630 631 service vendor.ssr_setup /vendor/bin/ssr_setup 632 class main 633 user root 634 group root system 635 oneshot 636 637 service vendor.ss_ramdump /vendor/bin/subsystem_ramdump 638 class main 639 user root 640 group root system 641 disabled 642 643 on property:persist.sys.ssr.enable_ramdumps=1 644 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1 645 mkdir /data/vendor/ramdump 761 root system 646 mkdir /data/vendor/ssrdump 771 root system 647 start vendor.ss_ramdump 648 649 on property:persist.sys.ssr.enable_ramdumps=0 650 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0 651 652 service iop /system/bin/iop 653 class main 654 user root 655 group root 656 disabled 657 658 service vendor.cnd /vendor/bin/cnd 659 user root 660 group root inet wakelock 661 class late_start 662 socket cnd stream 660 root inet 663 664 service vendor.irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config" 665 class core 666 user root 667 oneshot 668 669 service vendor.rmt_storage /vendor/bin/rmt_storage 670 class core 671 user root 672 group root system wakelock 673 ioprio rt 0 674 shutdown critical 675 676 service vendor.port-bridge /vendor/bin/port-bridge 677 class main 678 user radio 679 group radio system inet 680 oneshot 681 682 service vendor.qmiproxy /vendor/bin/qmiproxy 683 class main 684 user radio 685 group radio diag 686 disabled 687 688 service vendor.netmgrd /vendor/bin/netmgrd 689 class main 690 user root 691 group root wifi wakelock radio inet 692 693 service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ 694 -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 \ 695 -g@android:wpa_wlan0 696 # we will start as root and wpa_supplicant will switch to user wifi 697 # after setting up the capabilities required for WEXT 698 # user wifi 699 # group wifi inet keystore 700 interface android.hardware.wifi.supplicant (a] 1.0::ISupplicant default 701 interface android.hardware.wifi.supplicant (a] 1.1::ISupplicant default 702 class main 703 socket wpa_wlan0 dgram 660 wifi wifi 704 disabled 705 oneshot 706 707 service vendor.cnss-daemon /vendor/bin/cnss-daemon -n -l 708 class late_start 709 user system 710 group system inet wifi 711 712 service vendor.loc_launcher /vendor/bin/loc_launcher 713 #loc_launcher will start as root and set its uid to gps 714 class late_start 715 group gps inet diag wifi 716 717 service vendor.init-radio-sh /vendor/bin/init.radio.sh 718 class late_start 719 user radio 720 group root radio 721 oneshot 722 723 service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance.conf 724 socket msm_irqbalance seqpacket 660 root system 725 class core 726 user root 727 group root 728 writepid /dev/cpuset/system-background/tasks 729 730 service vendor.atfwd /vendor/bin/ATFWD-daemon 731 class late_start 732 user system 733 group system radio 734 disabled 735 736 service vendor.ssr_diag /vendor/bin/ssr_diag 737 class late_start 738 user system 739 group system 740 disabled 741 742 service vendor.diag_mdlog_start /vendor/bin/diag_mdlog 743 class late_start 744 user shell 745 group system diag sdcard_rw sdcard_r media_rw 746 disabled 747 oneshot 748 749 service vendor.diag_mdlog_stop /vendor/bin/diag_mdlog -k 750 class late_start 751 user shell 752 group system diag sdcard_rw sdcard_r media_rw 753 disabled 754 oneshot 755 756 service vendor.perfd /vendor/bin/perfd 757 class main 758 user root 759 group root system 760 writepid /dev/cpuset/system-background/tasks 761 disabled 762 763 # bugreport is triggered by holding down volume down, volume up and power 764 service bugreport /system/bin/dumpstate -d -p -B -z \ 765 -o /data/user_de/0/com.android.shell/files/bugreports/bugreport 766 class main 767 disabled 768 oneshot 769 keycodes 114 115 116 770 771 on property:sys.post_boot.parsed=1 772 start vendor.perfd 773 774 on property:sys.boot_completed=1 775 start vendor.power_sh 776 777 # Enable UFS powersaving 778 write /sys/devices/soc/624000.ufshc/clkgate_enable 1 779 write /sys/devices/soc/624000.ufshc/624000.ufshc:ufs_variant/pm_qos_enable 1 780 write /sys/module/lpm_levels/parameters/sleep_disabled N 781 782 # update cpusets now that boot is complete and we want better load balancing 783 write /dev/cpuset/top-app/cpus 0-3 784 write /dev/cpuset/foreground/cpus 0-2 785 write /dev/cpuset/background/cpus 0 786 write /dev/cpuset/system-background/cpus 0-2 787 write /dev/cpuset/restricted/cpus 0-1 788 789 # Update DVR cpusets to runtime values. 790 write /dev/cpuset/kernel/cpus 0,1 791 write /dev/cpuset/system/performance/cpus 2 792 write /dev/cpuset/system/background/cpus 0 793 write /dev/cpuset/system/cpus 0,2 794 write /dev/cpuset/application/performance/cpus 3 795 write /dev/cpuset/application/background/cpus 1 796 write /dev/cpuset/application/cpus 1,3 797 798 # end boot time fs tune 799 write /sys/block/sda/queue/read_ahead_kb 128 800 write /sys/block/sda/queue/nr_requests 128 801 write /sys/block/dm-0/queue/read_ahead_kb 128 802 write /sys/block/dm-1/queue/read_ahead_kb 128 803 write /sys/block/sda/queue/iostats 1 804 805 # UFS health 806 chmod 755 /sys/kernel/debug/ufshcd0 807 chmod 644 /sys/kernel/debug/ufshcd0/err_state 808 chmod 644 /sys/kernel/debug/ufshcd0/power_mode 809 chmod 644 /sys/kernel/debug/ufshcd0/host_regs 810 chmod 644 /sys/kernel/debug/ufshcd0/show_hba 811 chmod 644 /sys/kernel/debug/ufshcd0/dump_device_desc 812 chmod 755 /sys/kernel/debug/ufshcd0/stats 813 chmod 644 /sys/kernel/debug/ufshcd0/stats/req_stats 814 chmod 644 /sys/kernel/debug/ufshcd0/stats/query_stats 815 chmod 644 /sys/kernel/debug/ufshcd0/stats/err_stats 816 817 # Used immediately below 818 trigger sys-boot-completed-set 819 820 # We want one opportunity per boot to enable zram, so we 821 # use a trigger we fire from the above stanza. If 822 # persist.sys.zram_enabled becomes true after boot, 823 # we don't want to run swapon_all at that time. 824 on sys-boot-completed-set && property:persist.sys.zram_enabled=1 825 swapon_all /vendor/etc/fstab.${ro.hardware} 826 827 on property:sys.boot_completed=1 && property:ro.build.type=user 828 write /proc/sys/kernel/modules_disabled 1 829 830 ## charger driver exposes now finer grain control, map demo mode to those properties 831 # demo mode can only be exited by wiping data which will also reset the persist properties 832 on property:sys.retaildemo.enabled=1 833 setprop persist.vendor.charge.stop.level 35 834 setprop persist.vendor.charge.start.level 30 835 836 on property:persist.vendor.charge.stop.level=* 837 write /sys/module/htc_battery/parameters/charge_stop_level ${persist.vendor.charge.stop.level} 838 839 on property:persist.vendor.charge.start.level=* 840 write /sys/module/htc_battery/parameters/charge_start_level ${persist.vendor.charge.start.level} 841 842 service vendor.devstart_sh /vendor/bin/init.qcom.devstart.sh 843 class main 844 user root 845 group root system 846 disabled 847 oneshot 848 849 service vendor.foreground_sh /vendor/bin/init.foreground.sh 850 class main 851 user root 852 group root system readproc 853 disabled 854 oneshot 855 856 service vendor.power_sh /vendor/bin/init.power.sh 857 class main 858 user root 859 group root system 860 disabled 861 oneshot 862 863 service vendor.mid_sh /vendor/bin/init.mid.sh 864 class main 865 user root 866 group root system 867 disabled 868 oneshot 869 870 # reset thermal-engine when framework dies in VR mode 871 on property:init.svc.zygote=restarting && property:sys.qcom.thermalcfg=/vendor/etc/thermal-engine-vr.conf 872 setprop sys.qcom.thermalcfg "/vendor/etc/thermal-engine.conf" 873 restart vendor.thermal-engine 874 875 # b/70518189 vDSO experiments 876 on property:sys.vdso=* 877 write /sys/module/vdso/parameters/enable_32 1 878 write /sys/module/vdso/parameters/enable_64 1 879 880 on property:sys.vdso=false 881 write /sys/module/vdso/parameters/enable_32 0 882 write /sys/module/vdso/parameters/enable_64 0 883 884 on property:sys.vdso=64 885 write /sys/module/vdso/parameters/enable_32 0 886 887 on property:sys.vdso=32 888 write /sys/module/vdso/parameters/enable_64 0 889 890 # Write the dark theme magic (`theme-dark`, or 0x7468656d652d6461726b in hex string) to /misc 891 # partition. Offset 10814 in vendor space is effectively offset 12862 in /misc partition. 892 service vendor.darkboot /vendor/bin/misc_writer --vendor-space-offset 10814 --hex-string 0x7468656d652d6461726b 893 disabled 894 oneshot 895 896 # Clear the 10-byte dark theme magic in /misc partition. Offset 10814 in vendor space is effectively 897 # offset 12862 in /misc partition. 898 service vendor.darkboot_clear /vendor/bin/misc_writer --vendor-space-offset 10814 --hex-string 0x00000000000000000000 899 disabled 900 oneshot 901 902 # Set the dark boot flag on dark mode (UiModeManager.MODE_NIGHT_YES == 2). 903 on property:persist.sys.theme=2 904 start vendor.darkboot 905 906 # Clear the dark theme flag on light mode (UiModeManager.MODE_NIGHT_NO == 1) or auto mode 907 # (UiModeManager.MODE_NIGHT_AUTO == 0). 908 on property:persist.sys.theme=1 909 start vendor.darkboot_clear 910 911 on property:persist.sys.theme=0 912 start vendor.darkboot_clear 913