| # Copyright (c) 2014-2015, 2018,2020 The Linux Foundation. All rights reserved. |
| # |
| # Redistribution and use in source and binary forms, with or without |
| # modification, are permitted provided that the following conditions are |
| # met: |
| # * Redistributions of source code must retain the above copyright |
| # notice, this list of conditions and the following disclaimer. |
| # * Redistributions in binary form must reproduce the above |
| # copyright notice, this list of conditions and the following |
| # disclaimer in the documentation and/or other materials provided |
| # with the distribution. |
| # * Neither the name of The Linux Foundation nor the names of its |
| # contributors may be used to endorse or promote products derived |
| # from this software without specific prior written permission. |
| # |
| # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| # |
| # |
| |
| on early-init |
| exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules audio_apr audio_adsp_loader audio_q6_notifier audio_q6 audio_usf audio_native audio_pinctrl_wcd audio_swr audio_platform audio_swr_ctrl audio_hdmi audio_wcd9xxx audio_wcd_core audio_wsa881x_analog audio_wsa881x audio_mbhc audio_stub audio_digital_cdc audio_analog_cdc audio_wcd_cpe audio_cpe_lsm audio_wcd9335 audio_machine_sdm450 audio_machine_ext_sdm450 |
| write /proc/sys/kernel/sched_boost 1 |
| mkdir /firmware 0771 system system |
| mkdir /system 0777 root root |
| mkdir /bt_firmware 0771 system system |
| symlink /data/tombstones /tombstones |
| mkdir /dsp 0771 media media |
| |
| on fs |
| wait /dev/block/platform/soc/${ro.boot.bootdevice} |
| symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice |
| |
| mount_all /vendor/etc/fstab.qcom --early |
| write /proc/sys/vm/swappiness 100 |
| |
| chown root system /mnt/vendor/persist |
| chmod 0771 /mnt/vendor/persist |
| mkdir /mnt/vendor/persist/data 0700 system system |
| mkdir /mnt/vendor/persist/bms 0700 root system |
| restorecon_recursive /mnt/vendor/persist |
| |
| #write /sys/kernel/boot_adsp/boot 1 |
| |
| wait /dev/block/bootdevice/by-name/oem |
| mount ext4 /dev/block/bootdevice/by-name/oem /oem ro nosuid nodev barrier=1 |
| |
| insmod /vendor/lib/modules/texfat.ko |
| |
| on post-fs |
| start vendor.qseecomd |
| exec - system system -- /vendor/bin/init.qti.qseecomd.sh |
| write /dev/ipa 1 |
| |
| on post-fs |
| # set RLIMIT_MEMLOCK to 64MB |
| setrlimit 8 67108864 67108864 |
| |
| on post-fs-data |
| mkdir /data/tombstones 0771 system system |
| mkdir /tombstones/modem 0771 system system |
| mkdir /tombstones/lpass 0771 system system |
| mkdir /tombstones/wcnss 0771 system system |
| mkdir /tombstones/dsps 0771 system system |
| mkdir /persist/data/sfs 0700 system system |
| mkdir /persist/data/tz 0700 system system |
| mkdir /data/misc/dts 0770 media audio |
| mkdir /data/vendor/hbtp 0750 system system |
| |
| on early-boot |
| chown system system /mnt/vendor/persist/sensors |
| chown system system /mnt/vendor/persist/sensors/sns.reg |
| chown system system /mnt/vendor/persist/sensors/sensors_list.txt |
| chown system system /mnt/vendor/persist/sensors/registry |
| chown system system /mnt/vendor/persist/sensors/registry/registry |
| chown system system /mnt/vendor/persist/sensors/registry/registry/sensors_registry |
| chown system system /mnt/vendor/persist/sensors/sensors_settings |
| chown system system /mnt/vendor/persist/sensors/registry/sns_reg_config |
| chown system system /mnt/vendor/persist/sensors/registry/sns_reg_version |
| chown system system /mnt/vendor/persist/sensors/registry/config |
| chmod 0664 /mnt/vendor/persist/sensors/sensors_settings |
| |
| #Create folder for mm-qcamera-daemon |
| mkdir /data/vendor/camera 0770 camera camera |
| |
| on late-fs |
| mount_all /vendor/etc/fstab.qcom --late |
| |
| #start camera server as daemon |
| service qcamerasvr /system/vendor/bin/mm-qcamera-daemon |
| class late_start |
| user camera |
| group camera system inet input graphics |
| |
| on init |
| write /dev/stune/foreground/schedtune.sched_boost_no_override 1 |
| write /dev/stune/top-app/schedtune.sched_boost_no_override 1 |
| write /dev/stune/schedtune.colocate 0 |
| write /dev/stune/background/schedtune.colocate 0 |
| write /dev/stune/foreground/schedtune.colocate 0 |
| write /dev/stune/top-app/schedtune.colocate 1 |
| write /sys/module/qpnp_rtc/parameters/poweron_alarm 1 |
| |
| service qfp-daemon /system/vendor/bin/qfp-daemon |
| class late_start |
| user system |
| group system drmrpc |
| |
| service qrngp /system/bin/qrngp -f |
| class main |
| user root |
| group root |
| oneshot |
| disabled |
| |
| on property:sys.boot_completed=1 |
| start qrngp |
| |
| service vendor.qseecomd /vendor/bin/qseecomd |
| class core |
| user root |
| group root |
| |
| service thermal-engine /system/vendor/bin/thermal-engine |
| class main |
| user root |
| socket thermal-send-client stream 0666 system system |
| socket thermal-recv-client stream 0660 system system |
| socket thermal-recv-passive-client stream 0666 system system |
| socket thermal-send-rule stream 0660 system system |
| group root |
| |
| service audiod /system/vendor/bin/audiod |
| class late_start |
| user system |
| group system |
| |
| on boot |
| start vendor.rmt_storage |
| insmod /system/lib/modules/adsprpc.ko |
| # access permission for secure touch |
| chmod 0660 /sys/devices/soc.0/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch_enable |
| chmod 0440 /sys/devices/soc.0/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch |
| chmod 0660 /sys/devices/soc.0/78b8000.i2c/i2c-4/4-0020/input/input0/secure_touch_enable |
| chmod 0440 /sys/devices/soc.0/78b8000.i2c/i2c-4/4-0020/input/input0/secure_touch |
| chown system drmrpc /sys/devices/soc.0/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch_enable |
| chown system drmrpc /sys/devices/soc.0/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch |
| chown system drmrpc /sys/devices/soc.0/78b8000.i2c/i2c-4/4-0020/input/input0/secure_touch_enable |
| chown system drmrpc /sys/devices/soc.0/78b8000.i2c/i2c-4/4-0020/input/input0/secure_touch |
| chown system system /sys/kernel/hbtp/display_pwr |
| |
| # Add a cpuset for the camera daemon |
| # We want all cores for camera |
| mkdir /dev/cpuset/camera-daemon |
| write /dev/cpuset/camera-daemon/cpus 0-3 |
| write /dev/cpuset/camera-daemon/mems 0 |
| chown cameraserver cameraserver /dev/cpuset/camera-daemon |
| chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks |
| chmod 0660 /dev/cpuset/camera-daemon/tasks |
| |
| ####Regionalization config and prop files#### |
| chmod 0644 /persist/speccfg/spec |
| chmod 0644 /persist/speccfg/devicetype |
| chmod 0644 /persist/speccfg/mbnversion |
| chmod 0644 /persist/speccfg/.not_triggered |
| chmod 0644 /persist/speccfg/vendor_ro.prop |
| chmod 0644 /persist/speccfg/vendor_persist.prop |
| chmod 0644 /persist/speccfg/submask |
| chmod 0644 /persist/speccfg/partition |
| chown system system /persist/speccfg/spec |
| chown system system /persist/speccfg/devicetype |
| chown system system /persist/speccfg/mbnversion |
| chown system system /persist/speccfg/.not_triggered |
| chown system system /persist/speccfg/vendor_ro.prop |
| chown system system /persist/speccfg/vendor_persist.prop |
| chown system system /persist/speccfg/submask |
| chown system system /persist/speccfg/partition |
| |
| # access permission for wlan |
| chown system system /mnt/vendor/persist/WCNSS_qcom_wlan_nv.bin |
| |
| #USB controller configuration |
| write /sys/module/g_android/parameters/mtp_tx_req_len 131072 |
| write /sys/module/g_android/parameters/mtp_rx_req_len 131072 |
| write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports BAM2BAM_IPA |
| setprop vendor.usb.rndis.func.name "rndis_bam" |
| setprop vendor.usb.rmnet.func.name "rmnet_bam" |
| setprop vendor.usb.rmnet.inst.name "rmnet" |
| setprop vendor.usb.dpl.inst.name "dpl" |
| |
| service wcnss-service /system/vendor/bin/wcnss_service |
| class main |
| user system |
| group system wifi radio |
| oneshot |
| |
| service vendor-sensor-sh /vendor/bin/init.qcom.sensors.sh |
| class core |
| user root |
| oneshot |
| |
| service ppd /system/vendor/bin/mm-pp-dpps |
| class late_start |
| disabled |
| user system |
| socket pps stream 0660 system system |
| group system graphics |
| |
| on property:init.svc.surfaceflinger=stopped |
| stop ppd |
| |
| on property:init.svc.surfaceflinger=running |
| start ppd |
| |
| on property:init.svc.surfaceflinger=restarting |
| stop ppd |
| |
| on property:init.svc.zygote=stopped |
| stop ppd |
| |
| on property:init.svc.zygote=running |
| start ppd |
| |
| on property:init.svc.zygote=restarting |
| stop ppd |
| |
| on charger |
| wait /dev/block/bootdevice/by-name/system |
| mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1 |
| setprop sys.usb.configfs 1 |
| start qcom-post-boot |
| setprop persist.sys.usb.config mass_storage,adb |
| start vendor.hvdcp_opti |
| |
| service vendor.hvdcp_opti /system/vendor/bin/hvdcp_opti |
| class main |
| user root |
| group system wakelock |
| |
| service vendor.per_mgr /system/vendor/bin/pm-service |
| class core |
| user system |
| group system net_raw |
| |
| service vendor.per_proxy /system/vendor/bin/pm-proxy |
| class core |
| user system |
| group system |
| disabled |
| |
| on property:init.svc.vendor.per_mgr=running |
| start vendor.per_proxy |
| |
| on property:sys.shutdown.requested=* |
| stop vendor.per_proxy |
| |
| service energy-awareness /system/vendor/bin/energy-awareness |
| class main |
| user root |
| group system |
| oneshot |
| |
| service mdtpd /system/vendor/bin/mdtpd |
| class late_start |
| user root |
| group system radio drmrpc |
| |
| service vendor.sensors.qti /vendor/bin/sensors.qti |
| class core |
| user system |
| group system |
| disabled |
| |
| on boot |
| write /sys/devices/soc.0/78b8000.i2c/i2c-4/4-0020/input/input0/fw_name PR1702898-s3528t_00260005_00380008.img |
| write /sys/devices/soc.0/78b8000.i2c/i2c-4/4-0020/input/input0/update_fw 1 |
| |
| on boot |
| chown system system /sys/class/leds/red/blink |
| chown system system /sys/class/leds/red/breath |
| chown system system /sys/class/leds/red/delay_on |
| chown system system /sys/class/leds/red/delay_off |
| chown system system /sys/class/leds/green/blink |
| chown system system /sys/class/leds/green/breath |
| chown system system /sys/class/leds/green/delay_on |
| chown system system /sys/class/leds/green/delay_off |
| chown system system /sys/class/leds/blue/blink |
| chown system system /sys/class/leds/blue/breath |
| chown system system /sys/class/leds/blue/delay_on |
| chown system system /sys/class/leds/blue/delay_off |
| |
| service remosaic_daemon /vendor/bin/remosaic_daemon |
| class late_start |
| user camera |
| group camera |