mirror of
https://github.com/Anything-at-25-00/android_device_tecno_LG8n.git
synced 2024-11-30 01:16:27 -08:00
b41c90c409
If we set 2048KB ra value in the beginning of the boot process, services initialized at this time would keep 2048KB ra value even though we adjust the ra value to 128KB after boot completion. This may cause memory pressure. Bug: 174700194 Signed-off-by: Randall Huang <huangrandall@google.com> Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
1144 lines
38 KiB
Plaintext
1144 lines
38 KiB
Plaintext
# MTK platform .rc configure
|
|
|
|
import /vendor/etc/init/hw/init.connectivity.rc
|
|
import /vendor/etc/init/hw/init.mt6789.usb.rc
|
|
import /vendor/etc/init/hw/init.project.rc
|
|
import /vendor/etc/init/hw/init.aee.rc
|
|
import /vendor/etc/init/hw/init.sensor_2_0.rc
|
|
import /vendor/etc/init/hw/init.cgroup.rc
|
|
|
|
# init.modem.rc must be the LAST rc file because vold.post_fs_data_done is set in it
|
|
import /vendor/etc/init/hw/init.modem.rc
|
|
# *** DO NOT import the new rc file after this line ***
|
|
|
|
on early-init
|
|
write /proc/bootprof "INIT:early-init"
|
|
|
|
# initialize vendor.all.modules.ready to 1 here to prevent NOT GKI project blocked
|
|
setprop vendor.all.modules.ready 1
|
|
|
|
# Keep debugfs mounted in non-user builds
|
|
on early-init && property:ro.build.type=eng
|
|
mount debugfs debugfs /sys/kernel/debug
|
|
chmod 0755 /sys/kernel/debug
|
|
setprop persist.dbg.keep_debugfs_mounted true
|
|
|
|
on early-init && property:ro.build.type=userdebug
|
|
mount debugfs debugfs /sys/kernel/debug
|
|
chmod 0755 /sys/kernel/debug
|
|
setprop persist.dbg.keep_debugfs_mounted true
|
|
|
|
on init
|
|
write /proc/bootprof "INIT:init"
|
|
|
|
# if primary storage is physical, set ro.vold.primary_physical to 1
|
|
# setprop ro.vold.primary_physical 1
|
|
|
|
#MD:add XLQYXLQS-5252 for tranfs by xiaoxiang.xiong 20220404 start
|
|
mkdir /tranfs 0771 system system
|
|
#MD:add XLQYXLQS-5252 for tranfs by xiaoxiang.xiong 20220404 end
|
|
|
|
# change lk_env permission
|
|
chown root system /proc/lk_env
|
|
chmod 0660 /proc/lk_env
|
|
|
|
# increase sysctl_rmem_max and sysctl_wmem_max values to 2M
|
|
write /proc/sys/net/core/wmem_max 8388608
|
|
write /proc/sys/net/core/rmem_max 8388608
|
|
|
|
# update cpus for cpuset cgroup
|
|
write /dev/cpuset/foreground/cpus 0-7
|
|
write /dev/cpuset/foreground/boost/cpus 0-7
|
|
write /dev/cpuset/background/cpus 0-3
|
|
write /dev/cpuset/system-background/cpus 0-3
|
|
write /dev/cpuset/top-app/cpus 0-7
|
|
|
|
# Setup runtime blkio
|
|
write /dev/blkio/blkio.weight 1000
|
|
write /dev/blkio/background/blkio.weight 200
|
|
write /dev/blkio/blkio.group_idle 2000
|
|
write /dev/blkio/background/blkio.group_idle 0
|
|
|
|
on late-init
|
|
write /proc/bootprof "INIT:late-init"
|
|
# enable rcu_expedited
|
|
write /sys/kernel/rcu_expedited 1
|
|
|
|
# mount different fs start
|
|
|
|
on charger
|
|
# Turn backlight on and switch to backlight trigger
|
|
write /sys/class/leds/lcd-backlight/brightness "1000"
|
|
write /sys/class/leds/lcd-backlight/trigger "backlight"
|
|
|
|
chmod 0660 /dev/spm
|
|
chown system system /dev/spm
|
|
start spm_script
|
|
chmod 0666 /dev/kmsg
|
|
chmod 0775 /mnt/vendor
|
|
mkdir /mnt/vendor/nvcfg
|
|
mount ext4 /dev/block/by-name/nvcfg /mnt/vendor/nvcfg rw wait
|
|
chown system system /mnt/vendor/nvcfg
|
|
chmod 0771 /mnt/vendor/nvcfg
|
|
restorecon_recursive /mnt/vendor/nvcfg
|
|
write /sys/devices/platform/battery_meter/FG_daemon_log_level 7
|
|
write /sys/bus/platform/devices/battery/FG_daemon_log_level 7
|
|
# Permissions for System Server and daemons.
|
|
chown system system /sys/power/autosleep
|
|
chown system system /sys/power/state
|
|
chown system system /sys/power/wakeup_count
|
|
chown radio wakelock /sys/power/wake_lock
|
|
chown radio wakelock /sys/power/wake_unlock
|
|
chmod 0660 /sys/power/state
|
|
chmod 0660 /sys/power/wake_lock
|
|
chmod 0660 /sys/power/wake_unlock
|
|
chmod 0660 /sys/power/wakeup_count
|
|
write /sys/power/pm_freeze_timeout 2000
|
|
|
|
start fuelgauged
|
|
start fuelgauged_nvram
|
|
|
|
# Stop bootprof
|
|
write /proc/bootprof "0"
|
|
|
|
on early-fs
|
|
write /proc/bootprof "INIT:early-fs"
|
|
|
|
on fs
|
|
write /proc/bootprof "INIT:fs"
|
|
start vendor.boot-hal-1-2
|
|
|
|
# mount fstab
|
|
write /proc/bootprof "INIT:Mount_START"
|
|
write /sys/kernel/tracing/trace_marker "B|1|Mount"
|
|
mount_all --early
|
|
exec /system/bin/tune2fs -O has_journal -u 10010 -r 4096 /dev/block/by-name/userdata
|
|
write /sys/kernel/tracing/trace_marker "E"
|
|
write /proc/bootprof "INIT:Mount_END"
|
|
|
|
on late-fs
|
|
write /proc/bootprof "INIT:late-fs"
|
|
wait_for_prop hwservicemanager.ready "true"
|
|
|
|
write /proc/bootprof "INIT:Mount_START --late"
|
|
write /sys/kernel/tracing/trace_marker "B|1|Mount late"
|
|
mount_all --late
|
|
write /sys/kernel/tracing/trace_marker "E"
|
|
write /proc/bootprof "INIT:Mount_END --late"
|
|
|
|
|
|
on post-fs
|
|
write /proc/bootprof "INIT:post-fs"
|
|
|
|
#change permissions for mediaserver
|
|
chown root media /proc/clkmgr/mipi_test
|
|
|
|
#change permission for engineer mode
|
|
chown radio system /proc/clkmgr/pll_test
|
|
chown radio system /proc/clkmgr/pll_fsel
|
|
chmod 0664 /proc/clkmgr/pll_test
|
|
chmod 0664 /proc/clkmgr/pll_fsel
|
|
#change permission for engineer mode
|
|
chown radio system /proc/freqhopping/dramc
|
|
chown radio system /proc/freqhopping/dumpregs
|
|
chown radio system /proc/freqhopping/freqhopping_debug
|
|
chown radio system /proc/freqhopping/status
|
|
chown radio system /proc/freqhopping/userdef
|
|
|
|
# change owner
|
|
chown system system /proc/bootprof
|
|
chmod 0664 /proc/bootprof
|
|
chown root system /proc/mtprof/cputime
|
|
chown root system /proc/mtprof/reboot_pid
|
|
|
|
chown system system /mnt/vendor/protect_f
|
|
chmod 0770 /mnt/vendor/protect_f
|
|
|
|
chown system system /mnt/vendor/protect_s
|
|
chmod 0770 /mnt/vendor/protect_s
|
|
chown root log /proc/ccci_sib
|
|
|
|
# allow ccci_mdinit access ccci_dump
|
|
chown root system /proc/ccci_dump
|
|
|
|
#STD:add ffu upgrade KFLJHLEYB-2005 by xiaoxiang.xiong 20221017 start
|
|
restorecon_recursive /tranfs
|
|
mkdir /tranfs/ffu 0700 system shell
|
|
chmod 0777 /tranfs/ffu
|
|
#STD:add ffu upgrade KFLJHLEYB-2005 by xiaoxiang.xiong 20221017 end
|
|
|
|
#STD:add XLLWCHLYEL-738 kfp by hao.lv5 20220907 start
|
|
restorecon_recursive /tranfs
|
|
mkdir /tranfs/tranf2fs 0700 root shell
|
|
chmod 0771 /tranfs/tranf2fs
|
|
mkdir /tranfs/tranf2fs/kfp 0700 root shell
|
|
chmod 0771 /tranfs/tranf2fs/kfp
|
|
#STD:add XLLWCHLYEL-738 kfp by hao.lv5 20220907 end
|
|
|
|
on post-fs-data
|
|
write /proc/bootprof "INIT:post-fs-data"
|
|
wait_for_prop vendor.all.modules.ready 1
|
|
write /proc/bootprof "modprobe: Load_Module_DONE"
|
|
|
|
# Disable watermark boost
|
|
write /proc/sys/vm/watermark_boost_factor 0
|
|
|
|
# zram
|
|
write /sys/block/zram0/comp_algorithm lz4
|
|
write /proc/sys/vm/page-cluster 0
|
|
write /proc/sys/vm/swappiness 60
|
|
write /sys/kernel/mm/swap/vma_ra_enabled false
|
|
swapon_all /vendor/etc/fstab.mt6789
|
|
|
|
chown system system /mnt/vendor/nvcfg
|
|
chmod 0771 /mnt/vendor/nvcfg
|
|
restorecon_recursive /mnt/vendor/nvcfg
|
|
chown system system /mnt/vendor/nvcfg/fg
|
|
chown system system /mnt/vendor/nvcfg/fg/old_fg_data
|
|
chown system system /mnt/vendor/nvcfg/fg/car_tune_value
|
|
|
|
#MD:add XLQYXLQS-5252 for tranfs by xiaoxiang.xiong 20220404 start
|
|
chown system system /tranfs
|
|
chmod 0777 /tranfs
|
|
#MD:add XLQYXLQS-5252 for tranfs by xiaoxiang.xiong 20220404 end
|
|
|
|
# create basic filesystem structure
|
|
# We chown/chmod /mnt/vendor/nvdata again so because mount is run as root + defaults
|
|
chown root system /mnt/vendor/nvdata
|
|
chmod 0771 /mnt/vendor/nvdata
|
|
mkdir /mnt/vendor/nvdata/media 0771 media audio
|
|
|
|
# Audio dump
|
|
mkdir /data/vendor/audiohal 0771 system audio
|
|
mkdir /data/vendor/audiohal/audio_param 0771 system audio
|
|
|
|
#Create cct mount point
|
|
mkdir /mnt/vendor/cct
|
|
chown root system /mnt/vendor/cct
|
|
chmod 0771 /mnt/vendor/cct
|
|
|
|
#Create flash folder
|
|
mkdir /data/vendor/flash
|
|
chown root system /data/vendor/flash
|
|
chmod 0771 /data/vendor/flash
|
|
|
|
#Create shading mount point
|
|
mkdir /data/vendor/shading
|
|
chown root system /data/vendor/shading
|
|
chmod 0771 /data/vendor/shading
|
|
|
|
#Create shading_otp mount point
|
|
mkdir /data/vendor/shading_otp
|
|
chown root system /data/vendor/shading_otp
|
|
chmod 0771 /data/vendor/shading_otp
|
|
|
|
#Create NDD mount point
|
|
mkdir /data/vendor/camera_dump
|
|
chown root system /data/vendor/camera_dump
|
|
chmod 0771 /data/vendor/camera_dump
|
|
|
|
#Create Camera Dip Debug Folder
|
|
mkdir /data/vendor/dipdebug
|
|
chown root system /data/vendor/dipdebug
|
|
chmod 0771 /data/vendor/dipdebug
|
|
|
|
#Create flicker mount point
|
|
mkdir /data/vendor/flicker
|
|
chown root system /data/vendor/flicker
|
|
chmod 0771 /data/vendor/flicker
|
|
|
|
#ITD:modify for cam SN bind by huihang.zhou 20230302 start
|
|
#CAM OTP SN
|
|
chown root root /sys/class/sensordrv/tran_imgsensor/tran_imgsensor_sn
|
|
chmod 0666 /sys/class/sensordrv/tran_imgsensor/tran_imgsensor_sn
|
|
#ITD:modify for cam SN bind by huihang.zhou 20230302 end
|
|
|
|
#MD:add XLQYXLQS-5252 for tranfs by xiaoxiang.xiong 20220404 start
|
|
restorecon_recursive /tranfs
|
|
#MD:add XLQYXLQS-5252 for tranfs by xiaoxiang.xiong 20220404 end
|
|
|
|
# Set SELinux security contexts on upgrade or policy update.
|
|
restorecon_recursive /mnt/vendor/nvdata
|
|
|
|
#give system access to rfkill device node
|
|
chmod 0660 /dev/rfkill
|
|
|
|
# create for muxd pts device node , to operate without root
|
|
mkdir /dev/radio 0770 radio radio
|
|
|
|
chmod 0660 /dev/spm
|
|
chown system system /dev/spm
|
|
|
|
# GPS
|
|
chmod 0775 /vendor/xbin/MPED
|
|
chmod 0666 /dev/gps_emi
|
|
|
|
# -----------------------
|
|
# Add by MTK
|
|
# SCP log
|
|
chmod 0660 /sys/class/misc/scp/scp_mobile_log
|
|
chown root system /sys/class/misc/scp/scp_mobile_log
|
|
chmod 0220 /sys/class/misc/scp/scp_log_flush
|
|
chown root system /sys/class/misc/scp/scp_log_flush
|
|
chmod 0440 /dev/scp
|
|
chown root system /dev/scp
|
|
chmod 0664 /sys/class/misc/scp/scp_ee_force_ke
|
|
chown root system /sys/class/misc/scp/scp_ee_force_ke
|
|
|
|
# ADSP log
|
|
chmod 0660 /sys/class/misc/adsp_0/log_enable
|
|
chown root system /sys/class/misc/adsp_0/log_enable
|
|
chmod 0660 /sys/class/misc/adsp_1/log_enable
|
|
chown root system /sys/class/misc/adsp_1/log_enable
|
|
chmod 0660 /dev/adsp
|
|
chown root media /dev/adsp
|
|
chmod 0440 /dev/adsp_0
|
|
chown system media /dev/adsp_0
|
|
chmod 0440 /dev/adsp_1
|
|
chown system media /dev/adsp_1
|
|
|
|
# SSPM log
|
|
chmod 0620 /sys/class/misc/sspm/sspm_mobile_log
|
|
chown root system /sys/class/misc/sspm/sspm_mobile_log
|
|
chmod 0440 /dev/sspm
|
|
chown root system /dev/sspm
|
|
|
|
# radvd
|
|
chmod 444 /etc/radvd/radvd.conf
|
|
|
|
# Mali 3D GPU driver
|
|
#insmod /vendor/lib/modules/mali.ko
|
|
#chmod 666 /dev/mali0
|
|
#chown system graphics /dev/mali
|
|
|
|
|
|
|
|
# Touch Panel
|
|
# chmod 0664 /dev/touch
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_calmat
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_em_debounce_time
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_mode
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_em_debounce_time0
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_em_debounce_time1
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_em_spl_num
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_em_pressure_threshold
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_em_auto_time_interval
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_em_sample_cnt
|
|
chown root diag /sys/module/tpd_setting/parameters/tpd_em_asamp
|
|
chown root diag /sys/module/tpd_debug/parameters/tpd_em_log
|
|
chown root diag /sys/module/tpd_debug/parameters/tpd_em_log_to_fs
|
|
|
|
chmod 0666 /dev/pmem_multimedia
|
|
|
|
# set ptmx group to non-root
|
|
chown root radio /dev/ptmx
|
|
|
|
# RTC
|
|
chmod 660 /dev/alarm
|
|
chown root system /dev/alarm
|
|
|
|
# M4U
|
|
#insmod /vendor/lib/modules/m4u.ko
|
|
#mknod /dev/M4U_device c 188 0
|
|
chmod 0444 /dev/m4u
|
|
#chown system media /dev/M4U_device
|
|
chmod 0640 /proc/m4u
|
|
chown system media /proc/m4u
|
|
|
|
#set mlock limit to infinate (for m4u operation)
|
|
setrlimit 8 -1 -1
|
|
|
|
# CMDQ
|
|
chmod 0640 /dev/mtk_mdp
|
|
chown system system /dev/mtk_mdp
|
|
|
|
# MDP SYNC
|
|
chmod 0644 /dev/mdp_sync
|
|
chown system system /dev/mdp_sync
|
|
|
|
# MML PQ
|
|
chmod 0640 /dev/mml_pq
|
|
chown system system /dev/mml_pq
|
|
|
|
#OFFLOAD SERVICE
|
|
chmod 0640 /dev/offloadservice
|
|
chown media media /dev/offloadservice
|
|
|
|
#OPEN DSP
|
|
chmod 0640 /dev/audio_ipi
|
|
chown media media /dev/audio_ipi
|
|
|
|
#SmartPA
|
|
chmod 0640 /dev/audio_scp
|
|
chown media media /dev/audio_scp
|
|
chown audioserver audio /sys/bus/platform/devices/rt5509_param.0/prop_param
|
|
chown audioserver audio /sys/bus/platform/devices/rt5509_param.1/prop_param
|
|
|
|
#Accdet
|
|
chown root radio /sys/devices/platform/Accdet_Driver/driver/accdet_call_state
|
|
|
|
#Fingerprint
|
|
chmod 0666 /dev/goodix_fp
|
|
#qing.li ck7n p1 bring up start
|
|
chmod 0666 /sys/class/leds/lcd-backlight/brightness
|
|
chmod 0666 /sys/devices/platform/soc/14013000.dsi/lcm_hbm_state
|
|
#qing.li ck7n p1 bring up end
|
|
|
|
|
|
#v4l2 codec
|
|
chmod 0660 /dev/vcu
|
|
chown media system /dev/vcu
|
|
chmod 0666 /dev/video0
|
|
chown mediacodec system /dev/video0
|
|
chmod 0666 /dev/video1
|
|
chown mediacodec system /dev/video1
|
|
mkdir /data/vendor/vcodec 0777 media system
|
|
mkdir /data/vendor/vcodec/log 0770 media system
|
|
mkdir /data/vendor/vcodec/in 0770 media system
|
|
mkdir /data/vendor/vcodec/out 0770 media system
|
|
|
|
#MJC
|
|
#insmod /vendor/lib/modules/mjc_kernel_driver.ko
|
|
chmod 0660 /dev/MJC
|
|
chown media system /dev/MJC
|
|
|
|
#kpd
|
|
chown radio radio /sys/devices/platform/mtk-kpd/driver/kpd_call_state
|
|
|
|
#Charging Battery
|
|
chown radio radio /sys/devices/platform/battery/Charging_CallState
|
|
|
|
# PMIC property
|
|
chown radio system /sys/devices/platform/mt-pmic/low_battery_protect_stop
|
|
chown radio system /sys/devices/platform/mt-pmic/low_battery_protect_ut
|
|
|
|
#MDDB
|
|
mkdir /data/vendor_de/meta 0770 system system
|
|
mkdir /data/vendor_de/meta/mddb 0770 system system
|
|
|
|
chown system /sys/devices/platform/msensor/driver/cpsopmode
|
|
chown system /sys/devices/platform/msensor/driver/cpsreptxy
|
|
chown system /sys/devices/platform/msensor/driver/cpsreptz
|
|
chown system /sys/devices/platform/gsensor/driver/cpsopmode
|
|
chown system /sys/devices/platform/gsensor/driver/cpsrange
|
|
|
|
chown system /sys/class/input/input1/enable
|
|
chown system /sys/class/input/input1/delay
|
|
chown system /sys/class/input/input1/wake
|
|
chown system /sys/class/input/input1/offsets
|
|
chown system /sys/class/input/input2/enable
|
|
chown system /sys/class/input/input2/delay
|
|
chown system /sys/class/input/input2/wake
|
|
chown system /sys/class/input/input2/offsets
|
|
chown system /sys/class/input/input3/enable
|
|
chown system /sys/class/input/input3/delay
|
|
chown system /sys/class/input/input3/wake
|
|
chown system /sys/class/input/input3/offsets
|
|
chown system /sys/class/input/input4/enable
|
|
chown system /sys/class/input/input4/delay
|
|
chown system /sys/class/input/input4/wake
|
|
chown system /sys/class/input/input4/offsets
|
|
chown system /sys/class/input/input5/enable
|
|
chown system /sys/class/input/input5/delay
|
|
chown system /sys/class/input/input5/wake
|
|
chown system /sys/class/input/input5/offsets
|
|
chown system /sys/class/input/input6/enable
|
|
chown system /sys/class/input/input6/delay
|
|
chown system /sys/class/input/input6/wake
|
|
chown system /sys/class/input/input6/offsets
|
|
chown system /sys/class/input/input7/enable
|
|
chown system /sys/class/input/input7/delay
|
|
chown system /sys/class/input/input7/wake
|
|
chown system /sys/class/input/input7/offsets
|
|
chown system /sys/class/input/input8/enable
|
|
chown system /sys/class/input/input8/delay
|
|
chown system /sys/class/input/input8/wake
|
|
chown system /sys/class/input/input8/offsets
|
|
chown system /sys/class/input/input9/enable
|
|
chown system /sys/class/input/input9/delay
|
|
chown system /sys/class/input/input9/wake
|
|
chown system /sys/class/input/input9/offsets
|
|
chown system /sys/class/input/input10/enable
|
|
chown system /sys/class/input/input10/delay
|
|
chown system /sys/class/input/input10/wake
|
|
chown system /sys/class/input/input10/offsets
|
|
|
|
#EM eint
|
|
chown root diag /sys/bus/platform/drivers/eint/current_eint
|
|
|
|
# Display
|
|
chmod 0660 /dev/graphics/fb0
|
|
chown system graphics /dev/graphics/fb0
|
|
|
|
chmod 0660 /dev/mtk_disp_mgr
|
|
chown system graphics /dev/mtk_disp_mgr
|
|
|
|
chmod 0660 /dev/mtkfb_vsync
|
|
chown system graphics /dev/mtkfb_vsync
|
|
|
|
chmod 0660 /dev/sw_sync
|
|
chown system graphics /dev/sw_sync
|
|
|
|
# EM baseband file
|
|
chown root diag /vendor/bin/baseband_regdump
|
|
chmod 4750 /vendor/bin/baseband_regdump
|
|
|
|
#pmu
|
|
chown root radio /sys/devices/platform/mt-pmic/pmic_access_bank0
|
|
chown root radio /sys/devices/platform/mt-pmic/pmic_access_bank1
|
|
chown root radio /sys/devices/platform/mt6311-user/mt6311_access
|
|
chown root radio /sys/devices/platform/mt-pmic/pmic_access
|
|
chmod 0664 /sys/devices/platform/mt-pmic/pmic_access_bank0
|
|
chmod 0664 /sys/devices/platform/mt-pmic/pmic_access_bank1
|
|
chmod 0664 /sys/devices/platform/mt6311-user/mt6311_access
|
|
chmod 0664 /sys/devices/platform/mt-pmic/pmic_access
|
|
|
|
# EM CPU Speed Stress
|
|
chown root radio /proc/cpu_ss/cpu_ss_debug_mode
|
|
chown root radio /proc/cpu_ss/cpu_ss_mode
|
|
chown root radio /proc/cpu_ss/cpu_ss_period
|
|
chown root radio /proc/cpu_ss/cpu_ss_period_mode
|
|
chmod 0664 /proc/cpu_ss/cpu_ss_debug_mode
|
|
chmod 0664 /proc/cpu_ss/cpu_ss_mode
|
|
chmod 0664 /proc/cpu_ss/cpu_ss_period
|
|
chmod 0664 /proc/cpu_ss/cpu_ss_period_mode
|
|
|
|
#EM eint
|
|
chown root diag /sys/bus/platform/drivers/eint/current_eint
|
|
|
|
# Android SEC related device nodes
|
|
chmod 0660 /dev/sec
|
|
chown root system /dev/sec
|
|
|
|
# FM Radio device node
|
|
chmod 0660 /dev/fm
|
|
chown media media /dev/fm
|
|
|
|
# device apc settings
|
|
|
|
# device info /proc interface
|
|
chmod 0440 /dev/devmap
|
|
chown root system /dev/devmap
|
|
|
|
# bluetooth
|
|
chown bluetooth bluetooth /dev/hid-keyboard
|
|
chmod 0660 /dev/hid-keyboard
|
|
#Use uinput's default permission
|
|
chown system net_bt_admin /dev/uinput
|
|
|
|
# UIBC
|
|
chown system media /dev/uibc
|
|
chmod 0660 /dev/uibc
|
|
|
|
#TV-out
|
|
chmod 0664 /dev/TV-out
|
|
|
|
#HDMI
|
|
chown media system /dev/hdmitx
|
|
chmod 0664 /dev/hdmitx
|
|
|
|
# FM
|
|
chown system system /sys/class/fm/fm/lan_enable
|
|
chmod 0660 /sys/class/fm/fm/lan_enable
|
|
|
|
# JPEG
|
|
chmod 0666 /proc/mtk_jpeg
|
|
|
|
# almk
|
|
chmod 0440 /dev/mtk_almk
|
|
|
|
# DISP
|
|
chmod 0444 /dev/mtk_disp
|
|
|
|
#ANC SERVICE
|
|
chmod 0640 /dev/ancservice
|
|
chown media media /dev/ancservice
|
|
|
|
# gz device
|
|
chmod 0660 /dev/gz_kree
|
|
chown system system /dev/gz_kree
|
|
|
|
#Camera
|
|
chmod 0660 /dev/camera-sysram
|
|
chmod 0660 /dev/camera-isp
|
|
chmod 0660 /dev/camera-mem
|
|
chmod 0660 /dev/camera-dip
|
|
chmod 0660 /dev/camera-tsf
|
|
chmod 0660 /dev/camera-dpe
|
|
chmod 0660 /dev/camera-mfb
|
|
chmod 0660 /dev/camera-rsc
|
|
chmod 0660 /dev/camera-owe
|
|
chmod 0660 /dev/camera-fdvt
|
|
chmod 0660 /dev/camera-wpe
|
|
chmod 0660 /dev/camera-pipemgr
|
|
chmod 0660 /dev/kd_camera_hw
|
|
chmod 0660 /dev/seninf
|
|
chmod 0660 /dev/seninf_n3d
|
|
chmod 0660 /dev/flashlight
|
|
chmod 0660 /dev/kd_camera_hw_bus2
|
|
chmod 0660 /dev/FM50AF
|
|
chmod 0660 /dev/CAM_CAL_DRV
|
|
chmod 0660 /dev/MAINAF
|
|
chmod 0660 /dev/MAIN2AF
|
|
chmod 0660 /dev/MAIN3AF
|
|
chmod 0660 /dev/SUBAF
|
|
chmod 0660 /dev/vpu
|
|
chmod 0660 /dev/apusys
|
|
chmod 0660 /dev/mtk_ccd
|
|
|
|
#ITD: Modify Camera By Yingji.Wang 220426 Start
|
|
#OIS
|
|
chmod 0660 /dev/dw9781_ois
|
|
#OIS
|
|
chown system camera /dev/dw9781_ois
|
|
#DualCam
|
|
mkdir /data/vendor/arcsoft 0777 system system
|
|
#tranDualCam
|
|
mkdir /data/vendor/multicam 0777 system system
|
|
mkdir /data/vendor/multicam/dualcam 0777 system system
|
|
#tranSAT
|
|
mkdir /data/vendor/multicam/sat 0777 system system
|
|
#ITD: Modify Camera By Yingji.Wang 220426 end
|
|
|
|
#ITD:modify by camera driver junfeng.qin5 20220501 start
|
|
#MEG-fullHDR
|
|
mkdir /data/vendor/meg_working_dir 0777 system system
|
|
mkdir /data/vendor/meg_working_dir/anc_fullhdr 0777 system system
|
|
#MEG-HUMANEFFECT
|
|
mkdir /data/vendor/meghumaneffect 0777 system system
|
|
#watermark 2.0
|
|
mkdir /data/vendor/camera_watermark 0777 system system
|
|
#ITD:modify by camera driver junfeng.qin5 20220501 end
|
|
|
|
chown system camera /dev/camera-sysram
|
|
chown system camera /dev/camera-isp
|
|
chown system camera /dev/camera-mem
|
|
chown system camera /dev/camera-dip
|
|
chown system camera /dev/camera-dpe
|
|
chown system camera /dev/camera-mfb
|
|
chown system camera /dev/camera-rsc
|
|
chown system camera /dev/camera-owe
|
|
chown system camera /dev/camera-tsf
|
|
chown system camera /dev/camera-fdvt
|
|
chown system camera /dev/camera-wpe
|
|
chown system camera /dev/camera-pipemgr
|
|
chown system camera /dev/kd_camera_hw
|
|
chown system camera /dev/seninf
|
|
chown system camera /dev/seninf_n3d
|
|
chown system camera /dev/flashlight
|
|
chown system camera /dev/kd_camera_hw_bus2
|
|
chown system camera /dev/FM50AF
|
|
chown system camera /dev/CAM_CAL_DRV
|
|
chown system camera /dev/MAINAF
|
|
chown system camera /dev/MAIN2AF
|
|
chown system camera /dev/MAIN3AF
|
|
#fake dual camera
|
|
chown root root /sys/class/main2_light/main2_light/main2_light
|
|
chmod 0666 /sys/class/main2_light/main2_light/main2_light
|
|
chown system camera /dev/SUBAF
|
|
chown system camera /dev/vpu
|
|
chown system camera /dev/apusys
|
|
chown system camera /dev/mtk_ccd
|
|
chown system camera /sys/kernel/debug/mtk_cam_dbg/0/ctrl
|
|
chown system camera /sys/kernel/debug/mtk_cam_dbg/1/ctrl
|
|
chown system camera /sys/kernel/debug/mtk_cam_dbg/2/ctrl
|
|
|
|
#CCU
|
|
chmod 0660 /dev/ccu
|
|
chown system camera /dev/ccu
|
|
|
|
#VOW
|
|
chmod 0640 /dev/vow
|
|
chown media media /dev/vow
|
|
|
|
#MATV
|
|
chmod 0660 /dev/MATV
|
|
chown system media /dev/MATV
|
|
|
|
# otg_test
|
|
chown root radio /dev/mt_otg_test
|
|
chmod 0660 /dev/mt_otg_test
|
|
|
|
# MDP
|
|
chmod 0660 /dev/mt-mdp
|
|
chown system media /dev/mt-mdp
|
|
|
|
# SMI
|
|
chmod 0660 /dev/MTK_SMI
|
|
chown media media /dev/MTK_SMI
|
|
|
|
# MMQoS
|
|
chmod 0660 /sys/devices/platform/soc/soc:interconnect/mmqos_hrt/camera_max_bw
|
|
chown media media /sys/devices/platform/soc/soc:interconnect/mmqos_hrt/camera_max_bw
|
|
|
|
# RRC
|
|
chmod 0660 /dev/mtk_rrc
|
|
chown media system /dev/mtk_rrc
|
|
|
|
# DFRC
|
|
chmod 0660 /dev/mtk_dfrc
|
|
chown system graphics /dev/mtk_dfrc
|
|
|
|
|
|
#change partition permission
|
|
|
|
chmod 0640 /mtd@sec_ro
|
|
chown root system /mtd@sec_ro
|
|
|
|
chmod 0640 /mtd@preloader
|
|
chown root system /mtd@preloader
|
|
|
|
chmod 0660 /mtd@pro_info
|
|
chown root system /mtd@pro_info
|
|
|
|
chmod 0640 /mtd@bootimg
|
|
chown root system /mtd@bootimg
|
|
|
|
chmod 0640 /mtd@recovery
|
|
chown root system /mtd@recovery
|
|
|
|
chmod 0660 /mtd@nvram
|
|
chown root system /mtd@nvram
|
|
|
|
chmod 0660 /mtd@seccfg
|
|
chown root system /mtd@seccfg
|
|
|
|
chmod 0660 /mtd@misc
|
|
chown root system /mtd@misc
|
|
|
|
chmod 0664 /sys/bus/platform/drivers/emi_ctrl/concurrency_scenario
|
|
chown media media /sys/bus/platform/drivers/emi_ctrl/concurrency_scenario
|
|
|
|
#mtk_sched
|
|
chmod 0660 /dev/mtk_sched
|
|
chown system media /dev/mtk_sched
|
|
|
|
#BT SCO CVSD, for MT6572 and MT6582 CVSD codec on AP
|
|
chmod 0660 /dev/ebc
|
|
chown media media /dev/ebc
|
|
|
|
#usip
|
|
chmod 0660 /dev/usip
|
|
chown media media /dev/usip
|
|
|
|
chmod 0666 /dev/uio0
|
|
|
|
#otp
|
|
chmod 0660 /proc/driver/otp
|
|
chown root system /proc/driver/otp
|
|
|
|
# secure memory
|
|
chown system system /proc/secmem0
|
|
|
|
chmod 0666 /dev/exm0
|
|
|
|
|
|
#Thermal
|
|
mkdir /data/vendor/.tp/ 0775 system system
|
|
mkdir /data/vendor/thermal/ 0775 system system
|
|
|
|
#MCUPM log
|
|
chmod 0620 /sys/class/misc/mcupm/mcupm_mobile_log
|
|
chown root system /sys/class/misc/mcupm/mcupm_mobile_log
|
|
chmod 0440 /dev/mcupm
|
|
chown root system /dev/mcupm
|
|
|
|
#EM of MT6360
|
|
chmod 0664 sys/kernel/debug/rt-regmap/mt6360_pmu.5-0034/data
|
|
chmod 0664 sys/kernel/debug/rt-regmap/mt6360_pmic.5-001a/data
|
|
chmod 0664 sys/kernel/debug/rt-regmap/mt6360_ldo.5-0064/data
|
|
chmod 0664 sys/kernel/debug/rt-regmap/mt6360-4e/data
|
|
chmod 0664 sys/kernel/debug/rt-regmap/mt6360_pmu.5-0034/reg_addr
|
|
chmod 0664 sys/kernel/debug/rt-regmap/mt6360_pmic.5-001a/reg_addr
|
|
chmod 0664 sys/kernel/debug/rt-regmap/mt6360_ldo.5-0064/reg_addr
|
|
chmod 0664 sys/kernel/debug/rt-regmap/mt6360-4e/reg_addr
|
|
|
|
#widevine driver node
|
|
chmod 0660 /dev/drm_wv
|
|
chown media system /dev/drm_wv
|
|
|
|
# End of adding by MTK drivers
|
|
# -----------------------
|
|
on zygote-start
|
|
write /proc/bootprof "INIT:zygote-start"
|
|
|
|
on early-boot
|
|
write /proc/bootprof "INIT:early-boot"
|
|
verity_update_state
|
|
|
|
on boot
|
|
# start EAS+
|
|
write /sys/devices/system/cpu/eas/enable 1
|
|
|
|
write /proc/bootprof "INIT:boot"
|
|
|
|
write /proc/sys/vm/dirty_writeback_centisecs 300
|
|
chmod 0660 /sys/power/autosleep
|
|
|
|
chmod 0664 /sys/class/leds/lcd-backlight/brightness
|
|
chown system system /sys/class/leds/lcd-backlight/brightness
|
|
|
|
#BSP:add for charger&led midtest by lei.shi5 20220505 start
|
|
chmod 0666 /dev/MT_pmic_adc_cali
|
|
chmod 0666 /sys/class/leds/red/brightness
|
|
chmod 0666 /sys/class/leds/blue/brightness
|
|
chmod 0666 /sys/class/leds/green/brightness
|
|
chmod 0666 /sys/devices/platform/odm/odm:tran_battery/tran_bat_temp
|
|
chmod 0666 /sys/devices/platform/odm/odm:tran_battery/CHG_CAPACITY_TEST
|
|
chmod 0666 /sys/devices/platform/odm/odm:tran_battery/tran_set_current
|
|
chmod 0666 /sys/devices/platform/charger/Charger_Type
|
|
chown system system /sys/devices/platform/charger/tran_aichg_bigdata
|
|
chmod 0666 /sys/devices/platform/charger/tran_aichg_bigdata
|
|
#BSP:add for charger&led midtest by lei.shi5 20220505 end
|
|
#MG-CHG(Bypass):wireless function by yongqing 20221008 start
|
|
chmod 0666 /sys/wireless/wireless/Rx/brushFW
|
|
chmod 0666 /sys/wireless/wireless/Rx/reverse_charger
|
|
chmod 0666 /sys/wireless/wireless/Rx/rxdetect
|
|
chmod 0666 /sys/wireless/wireless/Rx/fake_rx_detect
|
|
#MG-CHG(Bypass):wireless function by yongqing 20221008 start
|
|
|
|
|
|
#MG-CHG(Bypass):bypass function by yongqing 20221008 start
|
|
chown system system /sys/devices/platform/charger/tran_aichg_disable_charger
|
|
chmod 0666 /sys/devices/platform/charger/tran_aichg_disable_charger
|
|
#MG-CHG(Bypass):bypass function by yongqing 20221008 start
|
|
|
|
chown system system /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_base
|
|
chmod 0660 /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_base
|
|
chown system system /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
|
|
chmod 0660 /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
|
|
chown system system /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
|
|
chmod 0660 /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
|
|
chown root system /sys/kernel/debug/binder/transaction_log_enable
|
|
chown root system /sys/kernel/debug/binder/perf_evalue
|
|
chown system system /sys/devices/system/cpu/rq-stats/htasks_thresh
|
|
chmod 0660 /sys/devices/system/cpu/rq-stats/htasks_thresh
|
|
chown system system /sys/devices/system/cpu/rq-stats/avg_htasks_thresh
|
|
chmod 0660 /sys/devices/system/cpu/rq-stats/avg_htasks_thresh
|
|
|
|
chown system /sys/module/mlog/parameters/do_mlog
|
|
chown system /sys/module/mlog/parameters/timer_intval
|
|
|
|
chown root radio /sys/class/leds/lcd-backlight/duty
|
|
chown root radio /sys/class/leds/lcd-backlight/div
|
|
chown system system /sys/class/leds/lcd-backlight/trigger
|
|
chown system system /sys/class/leds/button-backlight/trigger
|
|
chown system system /sys/class/leds/keyboard-backlight/trigger
|
|
chown system system /sys/class/leds/jogball-backlight/trigger
|
|
chown system system /sys/class/leds/red/trigger
|
|
chown system system /sys/class/leds/green/trigger
|
|
chown system system /sys/class/leds/blue/trigger
|
|
|
|
#ITD:add flashlight by isp team 20220412 start
|
|
chmod 0666 /sys/devices/virtual/torch/torch/torch_level
|
|
chmod 0666 /sys/devices/virtual/sub_torch/sub_torch/sub_torch_level
|
|
#ITD:add flashlight by isp team 20220412 end
|
|
# gauge symbolic
|
|
symlink /sys/devices/platform/soc/10026000.pwrap/10026000.pwrap:mt6366/mt6358-gauge /dev/gauge
|
|
|
|
# Permission for hibernation
|
|
chown radio system /sys/power/tuxonice
|
|
chown radio system /sys/power/tuxonice/do_hibernate
|
|
chmod 0770 /sys/power/tuxonice
|
|
chmod 0220 /sys/power/tuxonice/do_hibernate
|
|
|
|
|
|
# Smartbook Handler Framework
|
|
chown system system /sys/power/sb_state
|
|
chmod 0660 /sys/power/sb_state
|
|
|
|
# HMP CPU hotplug strategy
|
|
chown system system /proc/hps/num_base_perf_serv
|
|
chmod 0660 /proc/hps/num_base_perf_serv
|
|
chown system system /proc/hps/num_limit_power_serv
|
|
chmod 0660 /proc/hps/num_limit_power_serv
|
|
chown system system /proc/hps/num_limit_ultra_power_saving
|
|
chmod 0660 /proc/hps/num_limit_ultra_power_saving
|
|
chown system system /proc/hps/down_threshold
|
|
chmod 0660 /proc/hps/down_threshold
|
|
chown system system /proc/hps/up_threshold
|
|
chmod 0660 /proc/hps/up_threshold
|
|
chown system system /proc/hps/rush_boost_enabled
|
|
chmod 0660 /proc/hps/rush_boost_enabled
|
|
chown system system /proc/hps/heavy_task_enabled
|
|
chmod 0660 /proc/hps/heavy_task_enabled
|
|
chown system system /proc/hps/power_mode
|
|
chmod 0660 /proc/hps/power_mode
|
|
chown system system /proc/hps/up_times
|
|
chmod 0660 /proc/hps/up_times
|
|
chown system system /proc/hps/down_times
|
|
chmod 0660 /proc/hps/down_times
|
|
|
|
# PPM
|
|
chown system system /proc/ppm/mode
|
|
chmod 0660 /proc/ppm/mode
|
|
chown system system /proc/ppm/policy/perfserv_min_perf_idx
|
|
chmod 0440 /proc/ppm/policy/perfserv_min_perf_idx
|
|
chown system system /proc/ppm/policy/perfserv_max_perf_idx
|
|
chmod 0440 /proc/ppm/policy/perfserv_max_perf_idx
|
|
chown system system /proc/ppm/policy/perfserv_perf_idx
|
|
chmod 0660 /proc/ppm/policy/perfserv_perf_idx
|
|
chown system system /proc/ppm/policy/userlimit_min_cpu_freq
|
|
chmod 0660 /proc/ppm/policy/userlimit_min_cpu_freq
|
|
chown system system /proc/ppm/policy/userlimit_max_cpu_freq
|
|
chmod 0660 /proc/ppm/policy/userlimit_max_cpu_freq
|
|
chown system system /proc/ppm/policy/userlimit_min_cpu_core
|
|
chmod 0660 /proc/ppm/policy/userlimit_min_cpu_core
|
|
chown system system /proc/ppm/policy/userlimit_max_cpu_core
|
|
chmod 0660 /proc/ppm/policy/userlimit_max_cpu_core
|
|
chown system system /proc/ppm/policy/userlimit_cpu_core
|
|
chmod 0660 /proc/ppm/policy/userlimit_cpu_core
|
|
chown system system /proc/ppm/policy/userlimit_cpu_freq
|
|
chmod 0660 /proc/ppm/policy/userlimit_cpu_freq
|
|
chown system system /proc/ppm/dump_cluster_0_dvfs_table
|
|
chmod 0440 /proc/ppm/dump_cluster_0_dvfs_table
|
|
chown system system /proc/ppm/dump_cluster_1_dvfs_table
|
|
chmod 0440 /proc/ppm/dump_cluster_1_dvfs_table
|
|
chown system system /proc/ppm/dump_cluster_2_dvfs_table
|
|
chmod 0440 /proc/ppm/dump_cluster_2_dvfs_table
|
|
chown system system /proc/ppm/root_cluster
|
|
chmod 0660 /proc/ppm/root_cluster
|
|
chown system system /proc/ppm/policy/hica_variant
|
|
chmod 0660 /proc/ppm/policy/hica_variant
|
|
chown system system /proc/ppm/policy/hica_settings/L_ONLY_to_4L_LL/loading_hold_time
|
|
chmod 0660 /proc/ppm/policy/hica_settings/L_ONLY_to_4L_LL/loading_hold_time
|
|
|
|
# cpu_loading
|
|
chown system system /proc/cpu_loading/onoff
|
|
chmod 0664 /proc/cpu_loading/onoff
|
|
chown system system /proc/cpu_loading/overThrhld
|
|
chmod 0664 /proc/cpu_loading/overThrhld
|
|
chown system system /proc/cpu_loading/poltime_nsecs
|
|
chmod 0664 /proc/cpu_loading/poltime_nsecs
|
|
chown system system /proc/cpu_loading/poltime_secs
|
|
chmod 0664 /proc/cpu_loading/poltime_secs
|
|
chown system system /proc/cpu_loading/uevent_enable
|
|
chmod 0664 /proc/cpu_loading/uevent_enable
|
|
|
|
# CPU freq
|
|
chown system system /proc/cpufreq/cpufreq_limited_by_hevc
|
|
chmod 0660 /proc/cpufreq/cpufreq_limited_by_hevc
|
|
chown system system /proc/cpufreq/cpufreq_limited_max_freq_by_user
|
|
chmod 0660 /proc/cpufreq/cpufreq_limited_max_freq_by_user
|
|
chown system system /proc/cpufreq/cpufreq_power_mode
|
|
chmod 0660 /proc/cpufreq/cpufreq_power_mode
|
|
chown system system /proc/cpufreq/enable_hw_gov
|
|
chmod 0660 /proc/cpufreq/enable_hw_gov
|
|
|
|
# BW monitor
|
|
chown system system /proc/fliperfs/cg_enable
|
|
chmod 0664 /proc/fliperfs/cg_enable
|
|
chown system system /proc/fliperfs/cg_threshold
|
|
chmod 0664 /proc/fliperfs/cg_threshold
|
|
chown system system /proc/fliperfs/cg_threshold_ddr3
|
|
chmod 0664 /proc/fliperfs/cg_threshold_ddr3
|
|
chown system system /proc/fliperfs/perf
|
|
chmod 0664 /proc/fliperfs/perf
|
|
|
|
# perfmgr
|
|
chown system system /proc/perfmgr/smart/hps_is_heavy
|
|
chmod 0660 /proc/perfmgr/smart/hps_is_heavy
|
|
chown system system /proc/perfmgr/smart/hps_check_duration
|
|
chmod 0660 /proc/perfmgr/smart/hps_check_duration
|
|
chown system system /proc/perfmgr/smart/hps_check_last_duration
|
|
chmod 0660 /proc/perfmgr/smart/hps_check_last_duration
|
|
chown system system /proc/perfmgr/smart/hps_uevent_enable
|
|
chmod 0660 /proc/perfmgr/smart/hps_uevent_enable
|
|
chown system system /sys/power/dcm_state
|
|
chmod 0660 /sys/power/dcm_state
|
|
|
|
##Netlog tool
|
|
#change permissions about terminal
|
|
chown root radio /proc/net/vlan/config
|
|
chmod 0640 /proc/net/vlan/config
|
|
chown root radio /proc/net/ip6_tables_matches
|
|
chown root radio /proc/net/ip6_tables_names
|
|
chown root radio /proc/net/ip6_tables_targets
|
|
chown root radio /proc/net/arp_tables_targets
|
|
chown root radio /proc/net/arp_tables_matches
|
|
chown root radio /proc/net/arp_tables_names
|
|
chown root radio /proc/net/ip_tables_targets
|
|
chown root radio /proc/net/ip_tables_matches
|
|
chown root radio /proc/net/ip_tables_names
|
|
chown root radio /proc/net/ip_conntrack_expect
|
|
chown root radio /proc/net/ip_conntrack
|
|
chown root radio /proc/net/nf_conntrack
|
|
chown root radio /proc/net/nf_conntrack_expect
|
|
chown root radio /proc/net/netfilter/nfnetlink_log
|
|
chown root radio /proc/net/netfilter/nfnetlink_queue
|
|
|
|
# WMT proc
|
|
chown shell system /proc/driver/wmt_dbg
|
|
chown shell system /proc/driver/wmt_aee
|
|
|
|
# define device for EMCSMDLOGGER
|
|
chown system radio /dev/ttyGS3
|
|
chmod 0660 /dev/ttyGS3
|
|
|
|
#Define device for ATCID
|
|
chmod 660 /dev/ttyGS0
|
|
chown system radio /dev/ttyGS0
|
|
chmod 660 /dev/ttyGS1
|
|
chown system radio /dev/ttyGS1
|
|
#Power Manager
|
|
write /sys/power/pm_freeze_timeout 2000
|
|
|
|
# bugreport is triggered by holding down volume down, volume up and power
|
|
service bugreport /system/bin/dumpstate -d -p -B -z \
|
|
-o /data/user_de/0/com.android.shell/files/bugreports/bugreport
|
|
class late_start
|
|
disabled
|
|
oneshot
|
|
keycodes 114 115 116
|
|
|
|
# end boot time fs tune
|
|
on property:sys.boot_completed=1
|
|
# Back to default VM settings
|
|
write /proc/sys/vm/dirty_expire_centisecs 3000
|
|
write /proc/sys/vm/dirty_background_ratio 10
|
|
|
|
<<<<<<< HEAD:rootdir/etc/init/hw/init.mt6789.rc
|
|
write /sys/block/mmcblk0/queue/iostats 1
|
|
write /sys/block/mmcblk0/queue/read_ahead_kb 512
|
|
write /sys/block/mmcblk0/queue/nr_requests 128
|
|
write /sys/block/sdc/queue/iostats 1
|
|
write /sys/block/sdc/queue/read_ahead_kb 512
|
|
write /sys/block/sdc/queue/nr_requests 128
|
|
write /sys/block/dm-0/queue/read_ahead_kb 128
|
|
write /sys/block/dm-1/queue/read_ahead_kb 128
|
|
write /sys/block/dm-2/queue/read_ahead_kb 128
|
|
write /sys/block/dm-3/queue/read_ahead_kb 128
|
|
write /sys/block/dm-4/queue/read_ahead_kb 128
|
|
write /sys/block/dm-5/queue/read_ahead_kb 128
|
|
|
|
on property:sys.boot_completed=1
|
|
write /proc/perfmgr/boost_ctrl/cpu_ctrl/boot_freq "-1 -1 -1 -1 -1 -1"
|
|
write /sys/devices/platform/boot_dramboost/dramboost/dramboost 0
|
|
|
|
# stop bootprof
|
|
write /proc/bootprof 0
|
|
|
|
#service dpfd /vendor/bin/dpfd
|
|
# user root
|
|
# group system media
|
|
|
|
#
|
|
# External Modme control related services
|
|
#
|
|
|
|
#
|
|
# Modem related services (Begin)
|
|
#
|
|
##Add by T.Zh for ppp daemon
|
|
#service pppd /system/bin/pppd file /data/misc/ppp/ppp_options
|
|
# user root
|
|
# disabled
|
|
# oneshot
|
|
#
|
|
##
|
|
#
|
|
# Modem related services (End)
|
|
#
|
|
|
|
#add for power-off alarm
|
|
#service poad /vendor/bin/poad
|
|
# class main
|
|
# user system
|
|
# group system
|
|
# oneshot
|
|
|
|
#service BGW /vendor/xbin/BGW
|
|
# user system
|
|
# group gps system radio
|
|
# class main
|
|
=======
|
|
# Setup runtime cpusets
|
|
write /dev/cpuset/top-app/cpus 0-7
|
|
write /dev/cpuset/foreground/cpus 0-5,7
|
|
write /dev/cpuset/background/cpus 4-5
|
|
write /dev/cpuset/system-background/cpus 2-5
|
|
write /dev/cpuset/restricted/cpus 2-5
|
|
>>>>>>> 2214b06 (pissarro: remove IO read_ahead_kb tune):rootdir/etc/init.mt6877.rc
|
|
|
|
# Battery info
|
|
on property:persist.vendor.mediatek.fg.disable=1
|
|
write /dev/gauge/FG_daemon_disable 1
|
|
|
|
on property:persist.vendor.mediatek.fg.force25c=1
|
|
write /dev/gauge/Battery_Temperature 25
|
|
|
|
on property:persist.vendor.mediatek.fg.force25c=0
|
|
write /dev/gauge/Battery_Temperature 65535
|
|
|
|
on property:persist.vendor.mediatek.fg.log.enable=1
|
|
write /dev/gauge/FG_daemon_log_level 7
|
|
|
|
# add loghidl client
|
|
service loghidlsysservice /system/bin/loghidlsysservice
|
|
class main
|
|
user root
|
|
group system
|
|
disabled
|
|
|
|
# add meta_tst for ATM
|
|
service meta_tst /vendor/bin/meta_tst
|
|
class core
|
|
user root
|
|
group radio gps system wifi audio bluetooth media
|
|
capabilities NET_RAW NET_ADMIN
|
|
socket meta-atci stream 660 radio system
|
|
disabled
|
|
oneshot
|
|
|
|
service factory_no_image /vendor/bin/factory
|
|
user root
|
|
group radio system wifi media gps audio bluetooth wakelock nfc
|
|
capabilities BLOCK_SUSPEND NET_RAW NET_ADMIN SYS_ADMIN SYS_BOOT
|
|
socket factory-atci stream 660 radio system
|
|
disabled
|
|
oneshot
|
|
|
|
# start meta_tst for ATM
|
|
on property:sys.boot_completed=1 && property:ro.boot.atm=enable
|
|
start meta_tst
|
|
start loghidlvendorservice
|
|
start loghidlsysservice
|
|
|
|
# reset mdmode when modem crash happens in ATM
|
|
on property:vendor.mtk.md1.status=reset
|
|
setprop persist.vendor.atm.mdmode normal
|
|
|
|
# MTK fast charging support
|
|
on property:persist.vendor.mediatek.fast_charging.support=*
|
|
write /sys/devices/platform/charger/fast_chg_indicator ${persist.vendor.mediatek.fast_charging.support}
|
|
|
|
# FPSGO FBT Game
|
|
on boot
|
|
insmod /vendor/lib/modules/fpsgo.ko
|
|
|
|
service vendor.charger /system/bin/charger
|
|
class charger
|
|
user system
|
|
group system graphics wakelock input
|
|
capabilities SYS_BOOT
|
|
file /dev/kmsg w
|
|
file /sys/fs/pstore/console-ramoops-0 r
|
|
file /sys/fs/pstore/console-ramoops r
|
|
file /proc/last_kmsg r
|
|
|
|
on property:sys.boot_completed=1
|
|
# Setup cpu.shares to throttle background groups (bg ~ 5% sysbg ~ 10%)
|
|
write /dev/cpuctl/background/cpu.shares 1024
|
|
write /dev/cpuctl/system-background/cpu.shares 2048
|
|
write /dev/cpuctl/system/cpu.shares 20480
|
|
# We only have system and background groups holding tasks and the groups below are empty
|
|
write /dev/cpuctl/camera-daemon/cpu.shares 20480
|
|
write /dev/cpuctl/foreground/cpu.shares 20480
|
|
write /dev/cpuctl/nnapi-hal/cpu.shares 20480
|
|
write /dev/cpuctl/rt/cpu.shares 20480
|
|
write /dev/cpuctl/top-app/cpu.shares 20480
|
|
|
|
# Report max frequency to unity and miHoYo (HoYoverse) games tasks
|
|
write /proc/sys/kernel/sched_lib_name "com.miHoYo.,com.HoYoverse.,UnityMain,libunity.so"
|
|
write /proc/sys/kernel/sched_lib_mask_force 255
|