mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_sky
synced 2026-01-27 21:37:59 +00:00
282 lines
11 KiB
Plaintext
282 lines
11 KiB
Plaintext
|
|
# Copyright (c) 2019-2021, 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.
|
|
#
|
|
#
|
|
|
|
import /vendor/etc/init/hw/init.qti.kernel.rc
|
|
|
|
on early-init
|
|
write /proc/sys/kernel/printk_devkmsg ratelimited
|
|
export MEMTAG_OPTIONS off
|
|
|
|
on init
|
|
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
|
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
|
|
chown system system /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
|
|
chmod 0660 /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
|
|
start logd
|
|
# for mount rescue
|
|
mkdir /mnt/rescue 0755 root root
|
|
|
|
on early-fs
|
|
start vold
|
|
|
|
on fs
|
|
start hwservicemanager
|
|
mount_all --early
|
|
chown root system /mnt/vendor/persist
|
|
chmod 0771 /mnt/vendor/persist
|
|
restorecon_recursive /mnt/vendor/persist
|
|
mkdir /mnt/vendor/persist/data 0700 system system
|
|
# mount rescue
|
|
mount ext4 /dev/block/bootdevice/by-name/rescue /mnt/rescue noatime
|
|
mkdir /dev/logfs 0771 system system
|
|
mount vfat /dev/block/bootdevice/by-name/logfs /dev/logfs noatime umask=006,uid=1000,gid=1000
|
|
|
|
on fs && property:ro.boot.product.vendor.sku=taro
|
|
mkdir /mnt/vendor/spunvm 0660 system system
|
|
wait /dev/block/bootdevice/by-name/spunvm
|
|
mount vfat /dev/block/bootdevice/by-name/spunvm /mnt/vendor/spunvm rw noatime shortname=lower,uid=1000,gid=1000,dmask=007,fmask=007,context=u:object_r:vendor_spunvm_file:s0
|
|
|
|
on post-fs
|
|
# set RLIMIT_MEMLOCK to 64MB
|
|
setrlimit 8 67108864 67108864
|
|
# for rescue
|
|
restorecon_recursive /mnt/rescue
|
|
|
|
on late-fs
|
|
mount_all --late
|
|
|
|
on post-fs-data
|
|
mkdir /vendor/data/tombstones 0771 system system
|
|
# Enable WLAN cold boot calibration
|
|
write /sys/kernel/cnss/fs_ready 1
|
|
# creat thermal config
|
|
mkdir /data/vendor/.tp/ 0775 system system
|
|
mkdir /data/vendor/thermal 0771 root system
|
|
mkdir /data/vendor/thermal/config 0771 root system
|
|
|
|
#QCC mode configuration
|
|
setprop vendor.qti.qcc.oper.mode 3
|
|
|
|
# gaea1.0
|
|
chmod 0666 /dev/metis
|
|
restorecon /dev/metis
|
|
|
|
chmod 0666 /sys/module/gaea/parameters/mi_gaea_enable
|
|
restorecon /sys/module/gaea/parameters/mi_gaea_enable
|
|
|
|
on early-boot
|
|
start vendor.sensors
|
|
verity_update_state
|
|
|
|
on boot
|
|
write /dev/cpuset/audio-app/cpus 1-2
|
|
# 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-7
|
|
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
|
|
chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable
|
|
chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable
|
|
chown system /sys/devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_enable
|
|
chmod 0660 /sys/devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_enable
|
|
chown system /sys/devices/system/cpu/hyp_core_ctl/enable
|
|
chown system /sys/devices/system/cpu/hyp_core_ctl/hcc_min_freq
|
|
#USB controller configuration
|
|
setprop vendor.usb.controller a600000.dwc3
|
|
chown system system /sys/class/thermal/thermal_message/sconfig
|
|
chown cameraserver cameraserver /sys/class/thermal/thermal_message/flash_state
|
|
chown system system /sys/class/thermal/thermal_message/boost
|
|
chmod 0664 /sys/class/thermal/thermal_message/boost
|
|
chown system system /sys/class/thermal/thermal_message/balance_mode
|
|
|
|
chown system system /sys/class/drm/card0-DSI-1/disp_param
|
|
chmod 0664 /sys/class/drm/card0-DSI-1/disp_param
|
|
|
|
chown system system /sys/class/drm/card0-DSI-1/panel_info
|
|
chmod 0664 /sys/class/drm/card0-DSI-1/panel_info
|
|
|
|
chown cameraserver cameraserver /sys/class/qvga/qvga/rear_qvga
|
|
chmod 0666 /sys/class/qvga/qvga/rear_qvga
|
|
|
|
#hardwareinfo
|
|
chmod 0660 /dev/hardwareinfo
|
|
chown root system /dev/hardwareinfo
|
|
|
|
#For fingerprint
|
|
mkdir /data/vendor_de/0/goodix 0770 system system
|
|
chown system system /sys/bus/platform/devices/soc:fpc1020/hw_reset
|
|
chown system system /sys/bus/platform/devices/soc:fpc1020/irq
|
|
chown system system /sys/bus/platform/devices/soc:fpc1020/wakeup_enable
|
|
chown system system /sys/bus/platform/devices/soc:fpc1020/regulator_enable
|
|
chown system system /sys/bus/platform/devices/soc:fpc1020/compatible_all
|
|
chown system system /sys/bus/platform/devices/soc:fpc1020/fingerdown_wait
|
|
chown system system /sys/bus/platform/devices/soc:fpc1020/device_prepare
|
|
chown system system /sys/bus/platform/devices/soc:fpc1020/power_ctrl
|
|
chown system system /sys/bus/platform/devices/soc:fpc1020/screen
|
|
chmod 0644 /sys/bus/platform/devices/soc:fpc1020/hw_reset
|
|
chmod 0644 /sys/bus/platform/devices/soc:fpc1020/irq
|
|
chmod 0644 /sys/bus/platform/devices/soc:fpc1020/wakeup_enable
|
|
chmod 0644 /sys/bus/platform/devices/soc:fpc1020/regulator_enable
|
|
chmod 0644 /sys/bus/platform/devices/soc:fpc1020/compatible_all
|
|
chmod 0644 /sys/bus/platform/devices/soc:fpc1020/fingerdown_wait
|
|
chmod 0644 /sys/bus/platform/devices/soc:fpc1020/device_prepare
|
|
chmod 0644 /sys/bus/platform/devices/soc:fpc1020/power_ctrl
|
|
chmod 0644 /sys/bus/platform/devices/soc:fpc1020/screen
|
|
chmod 0666 /dev/goodix_fp
|
|
|
|
#For TP
|
|
chown system system /sys/class/touch/touch_dev/palm_sensor
|
|
chown system system /proc/touchscreen/proximity_switch
|
|
chown system system /proc/touchscreen/store_data_proximity
|
|
chmod 0664 /sys/class/touch/touch_dev/palm_sensor
|
|
chmod 0664 /proc/touchscreen/proximity_switch
|
|
chmod 0664 /proc/touchscreen/store_data_proximity
|
|
#TouchPad nvt settings for tp_grip_area
|
|
on property:sys.tp.grip_enable=0
|
|
write /proc/nvt_edge_reject_switch 1
|
|
on property:sys.tp.grip_enable=90
|
|
write /proc/nvt_edge_reject_switch 3
|
|
on property:sys.tp.grip_enable=270
|
|
write /proc/nvt_edge_reject_switch 2
|
|
# TouchPad fts settings for tp_grip_area
|
|
on property:sys.tp.grip_enable=0
|
|
write /sys/devices/platform/soc/a84000.spi/spi_master/spi0/spi0.0/fts_edge_mode 0
|
|
on property:sys.tp.grip_enable=90
|
|
write /sys/devices/platform/soc/a84000.spi/spi_master/spi0/spi0.0/fts_edge_mode 1
|
|
on property:sys.tp.grip_enable=270
|
|
write /sys/devices/platform/soc/a84000.spi/spi_master/spi0/spi0.0/fts_edge_mode 2
|
|
|
|
on property:vendor.display.lcd_density=560
|
|
setprop dalvik.vm.heapgrowthlimit 256m
|
|
|
|
on property:vendor.display.lcd_density=640
|
|
setprop dalvik.vm.heapgrowthlimit 512m
|
|
|
|
on property:sys.boot_completed=1
|
|
write /sys/class/thermal/thermal_message/sconfig 500
|
|
|
|
#+ExtR HONGMI-168554, p-wangpeng39, 20230330, add, for gt_tg configuration single card requirements
|
|
on property:ro.boot.multisim=*
|
|
setprop persist.radio.multisim.config ${ro.boot.multisim}
|
|
|
|
on property:ro.miui.customized.region=lm_cr
|
|
setprop persist.radio.multisim.config ssss
|
|
#-ExtR HONGMI-168554, p-wangpeng39, 20230330, add, for gt_tg configuration single card requirements
|
|
|
|
#Chk148653,wt-wangpeng6,add,2023.04.13,clear imei2 on single sim version. begin
|
|
on property:persist.radio.multisim.config=ssss
|
|
setprop persist.vendor.radio.imei2 ""
|
|
#Chk148653,wt-wangpeng6,add,2023.04.13,clear imei2 on single sim version. end
|
|
|
|
on init && property:ro.boot.mode=charger
|
|
wait_for_prop vendor.all.modules.ready 1
|
|
mount_all /vendor/etc/charger_fw_fstab.qti --early
|
|
wait /sys/kernel/boot_adsp/boot
|
|
write /sys/kernel/boot_adsp/boot 1
|
|
|
|
on charger
|
|
start vendor.power_off_alarm
|
|
setprop sys.usb.controller a600000.dwc3
|
|
wait /sys/class/udc/${sys.usb.controller}
|
|
#mi_thermald
|
|
start mi_thermald
|
|
|
|
#service vendor.lowi /vendor/bin/sscrpcd
|
|
# class core
|
|
# user system
|
|
# group system wakelock
|
|
# capabilities BLOCK_SUSPEND
|
|
|
|
#pd-mapper
|
|
service vendor.pd_mapper /vendor/bin/pd-mapper
|
|
class core
|
|
user system
|
|
group system
|
|
|
|
#Peripheral manager
|
|
service vendor.per_mgr /vendor/bin/pm-service
|
|
class core
|
|
user system
|
|
group system
|
|
ioprio rt 4
|
|
|
|
service vendor.per_proxy /vendor/bin/pm-proxy
|
|
class core
|
|
user system
|
|
group system
|
|
disabled
|
|
|
|
#service vendor.mdm_helper /vendor/bin/mdm_helper
|
|
# class core
|
|
# group system wakelock
|
|
# disabled
|
|
|
|
service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh
|
|
class core
|
|
oneshot
|
|
|
|
on property:init.svc.vendor.per_mgr=running
|
|
start vendor.per_proxy
|
|
|
|
on property:sys.shutdown.requested=*
|
|
write /sys/kernel/qcom_rproc/shutdown_in_progress 1
|
|
stop vendor.per_proxy
|
|
|
|
on property:vold.decrypt=trigger_restart_framework
|
|
start vendor.cnss_diag
|
|
|
|
# wcnssr enable
|
|
write /sys/class/remoteproc/remoteproc2/recovery enabled
|
|
# write /sys/bus/msm_subsys/devices/subsys2/restart_level related
|
|
|
|
service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
|
|
class main
|
|
user system
|
|
group system wifi inet sdcard_rw media_rw diag
|
|
oneshot
|
|
|
|
on early-boot && property:persist.vendor.pcie.boot_option=*
|
|
write /sys/bus/platform/devices/1c00000.qcom,pcie/debug/boot_option ${persist.vendor.pcie.boot_option}
|
|
write /sys/bus/platform/devices/1c08000.qcom,pcie/debug/boot_option ${persist.vendor.pcie.boot_option}
|
|
|
|
on property:sys.boot_completed=1
|
|
enable vendor.qvirtmgr
|
|
start vendor.qvirtmgr
|
|
setprop vendor.powerhal.init 1
|
|
|
|
service mi_thermald /system/vendor/bin/mi_thermald
|
|
class main
|
|
user root
|
|
group system
|
|
seclabel u:r:mi_thermald:s0
|