sm8350-common: rootdir: update
This commit is contained in:
parent
e2ff472e72
commit
fdc878085d
12
common.mk
12
common.mk
@ -209,6 +209,10 @@ PRODUCT_PACKAGES += \
|
||||
libqti_vndfwk_detect.vendor
|
||||
|
||||
# Fstab
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/rootdir/etc/charger_fstab.qti:$(TARGET_COPY_OUT_VENDOR)/etc/charger_fstab.qti \
|
||||
$(LOCAL_PATH)/rootdir/etc/charger_fw_fstab.qti:$(TARGET_COPY_OUT_VENDOR)/etc/charger_fw_fstab.qti
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/rootdir/etc/fstab.qcom:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.qcom \
|
||||
$(LOCAL_PATH)/rootdir/etc/fstab.qcom:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.qcom \
|
||||
@ -245,14 +249,18 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# Init scripts
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.batterysecret.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.batterysecret.rc \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.mi_thermald.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.mi_thermald.rc \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.rc \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.qcom.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.usb.rc \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.qti.kernel.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qti.kernel.rc \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.target.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.target.rc
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/rootdir/bin/init.qcom.post_boot.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.post_boot.sh \
|
||||
$(LOCAL_PATH)/rootdir/bin/init.kernel.post_boot-lahaina.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.kernel.post_boot-lahaina.sh \
|
||||
$(LOCAL_PATH)/rootdir/bin/init.qcom.sensors.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.sensors.sh \
|
||||
$(LOCAL_PATH)/rootdir/bin/init.qcom.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.sh \
|
||||
$(LOCAL_PATH)/rootdir/bin/init.qti.chg_policy.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.chg_policy.sh
|
||||
$(LOCAL_PATH)/rootdir/bin/vendor_modprobe.sh:$(TARGET_COPY_OUT_VENDOR)/bin/vendor_modprobe.sh
|
||||
|
||||
# Input
|
||||
PRODUCT_COPY_FILES += \
|
||||
|
386
rootdir/bin/init.kernel.post_boot-lahaina.sh
Executable file
386
rootdir/bin/init.kernel.post_boot-lahaina.sh
Executable file
@ -0,0 +1,386 @@
|
||||
#=============================================================================
|
||||
# Copyright (c) 2020 Qualcomm Technologies, Inc.
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#
|
||||
# Copyright (c) 2009-2012, 2014-2019, 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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.
|
||||
#=============================================================================
|
||||
|
||||
function configure_zram_parameters() {
|
||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||
MemTotal=${MemTotalStr:16:8}
|
||||
|
||||
low_ram=`getprop ro.config.low_ram`
|
||||
|
||||
# Zram disk - 75% for Go and < 2GB devices .
|
||||
# For >2GB Non-Go devices, size = 50% of RAM size. Limit the size to 4GB.
|
||||
# And enable lz4 zram compression for Go targets.
|
||||
|
||||
let RamSizeGB="( $MemTotal / 1048576 ) + 1"
|
||||
diskSizeUnit=M
|
||||
if [ $RamSizeGB -le 2 ]; then
|
||||
let zRamSizeMB="( $RamSizeGB * 1024 ) * 3 / 4"
|
||||
else
|
||||
let zRamSizeMB="( $RamSizeGB * 1024 ) / 2"
|
||||
fi
|
||||
|
||||
# use MB avoid 32 bit overflow
|
||||
if [ $zRamSizeMB -gt 4096 ]; then
|
||||
let zRamSizeMB=4096
|
||||
fi
|
||||
|
||||
if [ "$low_ram" == "true" ]; then
|
||||
echo lz4 > /sys/block/zram0/comp_algorithm
|
||||
fi
|
||||
|
||||
if [ -f /sys/block/zram0/disksize ]; then
|
||||
if [ -f /sys/block/zram0/use_dedup ]; then
|
||||
echo 1 > /sys/block/zram0/use_dedup
|
||||
fi
|
||||
echo "$zRamSizeMB""$diskSizeUnit" > /sys/block/zram0/disksize
|
||||
|
||||
# ZRAM may use more memory than it saves if SLAB_STORE_USER
|
||||
# debug option is enabled.
|
||||
if [ -e /sys/kernel/slab/zs_handle ]; then
|
||||
echo 0 > /sys/kernel/slab/zs_handle/store_user
|
||||
fi
|
||||
if [ -e /sys/kernel/slab/zspage ]; then
|
||||
echo 0 > /sys/kernel/slab/zspage/store_user
|
||||
fi
|
||||
|
||||
mkswap /dev/block/zram0
|
||||
swapon /dev/block/zram0 -p 32758
|
||||
fi
|
||||
}
|
||||
|
||||
function configure_read_ahead_kb_values() {
|
||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||
MemTotal=${MemTotalStr:16:8}
|
||||
|
||||
dmpts=$(ls /sys/block/*/queue/read_ahead_kb | grep -e dm -e mmc)
|
||||
|
||||
# Set 128 for <= 3GB &
|
||||
# set 512 for >= 4GB targets.
|
||||
if [ $MemTotal -le 3145728 ]; then
|
||||
ra_kb=128
|
||||
else
|
||||
ra_kb=512
|
||||
fi
|
||||
if [ -f /sys/block/mmcblk0/bdi/read_ahead_kb ]; then
|
||||
echo $ra_kb > /sys/block/mmcblk0/bdi/read_ahead_kb
|
||||
fi
|
||||
if [ -f /sys/block/mmcblk0rpmb/bdi/read_ahead_kb ]; then
|
||||
echo $ra_kb > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
|
||||
fi
|
||||
for dm in $dmpts; do
|
||||
echo $ra_kb > $dm
|
||||
done
|
||||
}
|
||||
|
||||
function configure_memory_parameters() {
|
||||
# Set Memory parameters.
|
||||
#
|
||||
# Set per_process_reclaim tuning parameters
|
||||
# All targets will use vmpressure range 50-70,
|
||||
# All targets will use 512 pages swap size.
|
||||
#
|
||||
# Set Low memory killer minfree parameters
|
||||
# 32 bit Non-Go, all memory configurations will use 15K series
|
||||
# 32 bit Go, all memory configurations will use uLMK + Memcg
|
||||
# 64 bit will use Google default LMK series.
|
||||
#
|
||||
# Set ALMK parameters (usually above the highest minfree values)
|
||||
# vmpressure_file_min threshold is always set slightly higher
|
||||
# than LMK minfree's last bin value for all targets. It is calculated as
|
||||
# vmpressure_file_min = (last bin - second last bin ) + last bin
|
||||
#
|
||||
# Set allocstall_threshold to 0 for all targets.
|
||||
#
|
||||
|
||||
configure_zram_parameters
|
||||
configure_read_ahead_kb_values
|
||||
echo 0 > /proc/sys/vm/page-cluster
|
||||
echo 100 > /proc/sys/vm/swappiness
|
||||
echo 1 > /proc/sys/vm/watermark_scale_factor
|
||||
echo 0 > /proc/sys/vm/watermark_boost_factor
|
||||
|
||||
# add memory limit to camera cgroup
|
||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||
MemTotal=${MemTotalStr:16:8}
|
||||
|
||||
if [ $MemTotal -gt 8388608 ]; then
|
||||
let LimitSize=838860800
|
||||
else
|
||||
let LimitSize=524288000
|
||||
fi
|
||||
|
||||
echo $LimitSize > /dev/memcg/camera/memory.soft_limit_in_bytes
|
||||
}
|
||||
|
||||
rev=`cat /sys/devices/soc0/revision`
|
||||
ddr_type=`od -An -tx /proc/device-tree/memory/ddr_device_type`
|
||||
ddr_type4="07"
|
||||
ddr_type5="08"
|
||||
|
||||
# Core control parameters for gold
|
||||
echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
|
||||
echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
|
||||
echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
|
||||
echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
|
||||
echo 3 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
|
||||
|
||||
# Core control parameters for gold+
|
||||
echo 0 > /sys/devices/system/cpu/cpu7/core_ctl/min_cpus
|
||||
echo 60 > /sys/devices/system/cpu/cpu7/core_ctl/busy_up_thres
|
||||
echo 30 > /sys/devices/system/cpu/cpu7/core_ctl/busy_down_thres
|
||||
echo 100 > /sys/devices/system/cpu/cpu7/core_ctl/offline_delay_ms
|
||||
echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/task_thres
|
||||
|
||||
# Controls how many more tasks should be eligible to run on gold CPUs
|
||||
# w.r.t number of gold CPUs available to trigger assist (max number of
|
||||
# tasks eligible to run on previous cluster minus number of CPUs in
|
||||
# the previous cluster).
|
||||
#
|
||||
# Setting to 1 by default which means there should be at least
|
||||
# 4 tasks eligible to run on gold cluster (tasks running on gold cores
|
||||
# plus misfit tasks on silver cores) to trigger assitance from gold+.
|
||||
echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/nr_prev_assist_thresh
|
||||
|
||||
# Disable Core control on silver
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
|
||||
|
||||
# Setting b.L scheduler parameters
|
||||
echo 95 95 > /proc/sys/kernel/sched_upmigrate
|
||||
echo 85 85 > /proc/sys/kernel/sched_downmigrate
|
||||
echo 100 > /proc/sys/kernel/sched_group_upmigrate
|
||||
echo 85 > /proc/sys/kernel/sched_group_downmigrate
|
||||
echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
|
||||
echo 400000000 > /proc/sys/kernel/sched_coloc_downmigrate_ns
|
||||
echo 39000000 39000000 39000000 39000000 39000000 39000000 39000000 5000000 > /proc/sys/kernel/sched_coloc_busy_hyst_cpu_ns
|
||||
echo 240 > /proc/sys/kernel/sched_coloc_busy_hysteresis_enable_cpus
|
||||
echo 10 10 10 10 10 10 10 95 > /proc/sys/kernel/sched_coloc_busy_hyst_cpu_busy_pct
|
||||
|
||||
# set the threshold for low latency task boost feature which prioritize
|
||||
# binder activity tasks
|
||||
echo 325 > /proc/sys/kernel/walt_low_latency_task_threshold
|
||||
|
||||
# cpuset parameters
|
||||
echo 0-2 > /dev/cpuset/background/cpus
|
||||
echo 0-3 > /dev/cpuset/system-background/cpus
|
||||
echo 4-7 > /dev/cpuset/foreground/boost/cpus
|
||||
echo 0-2,4-7 > /dev/cpuset/foreground/cpus
|
||||
echo 0-7 > /dev/cpuset/top-app/cpus
|
||||
|
||||
# Turn off scheduler boost at the end
|
||||
echo 0 > /proc/sys/kernel/sched_boost
|
||||
|
||||
# configure governor settings for silver cluster
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us
|
||||
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/up_rate_limit_us
|
||||
if [ $rev == "1.0" ]; then
|
||||
echo 1190400 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
|
||||
else
|
||||
echo 1209600 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
|
||||
fi
|
||||
echo 691200 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
|
||||
echo 1 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
|
||||
|
||||
# configure input boost settings
|
||||
if [ $rev == "1.0" ]; then
|
||||
echo "0:1382800" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
|
||||
else
|
||||
echo "0:1305600" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
|
||||
fi
|
||||
echo 120 > /sys/devices/system/cpu/cpu_boost/input_boost_ms
|
||||
|
||||
# configure powerkey boost settings
|
||||
echo "0:0 1:0 2:0 3:0 4:2016000 5:0 6:0 7:0" > /sys/devices/system/cpu/cpu_boost/powerkey_input_boost_freq
|
||||
echo 400 > /sys/devices/system/cpu/cpu_boost/powerkey_input_boost_ms
|
||||
|
||||
# configure governor settings for gold cluster
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/down_rate_limit_us
|
||||
echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/up_rate_limit_us
|
||||
if [ $rev == "1.0" ]; then
|
||||
echo 1497600 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq
|
||||
else
|
||||
echo 1555200 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq
|
||||
fi
|
||||
echo 1 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/pl
|
||||
|
||||
# configure governor settings for gold+ cluster
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/down_rate_limit_us
|
||||
echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/up_rate_limit_us
|
||||
if [ $rev == "1.0" ]; then
|
||||
echo 1536000 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
|
||||
else
|
||||
echo 1670400 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
|
||||
fi
|
||||
echo 1 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl
|
||||
|
||||
# configure bus-dcvs
|
||||
for device in /sys/devices/platform/soc
|
||||
do
|
||||
for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
|
||||
do
|
||||
cat $cpubw/available_frequencies | cut -d " " -f 1 > $cpubw/min_freq
|
||||
echo "4577 7110 9155 12298 14236 15258" > $cpubw/bw_hwmon/mbps_zones
|
||||
echo 4 > $cpubw/bw_hwmon/sample_ms
|
||||
echo 80 > $cpubw/bw_hwmon/io_percent
|
||||
echo 20 > $cpubw/bw_hwmon/hist_memory
|
||||
echo 10 > $cpubw/bw_hwmon/hyst_length
|
||||
echo 30 > $cpubw/bw_hwmon/down_thres
|
||||
echo 0 > $cpubw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $cpubw/bw_hwmon/up_scale
|
||||
echo 1600 > $cpubw/bw_hwmon/idle_mbps
|
||||
echo 12298 > $cpubw/max_freq
|
||||
echo 40 > $cpubw/polling_interval
|
||||
done
|
||||
|
||||
for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
|
||||
do
|
||||
cat $llccbw/available_frequencies | cut -d " " -f 1 > $llccbw/min_freq
|
||||
if [ ${ddr_type:4:2} == $ddr_type4 ]; then
|
||||
echo "1720 2086 2929 3879 5931 6515 8136" > $llccbw/bw_hwmon/mbps_zones
|
||||
elif [ ${ddr_type:4:2} == $ddr_type5 ]; then
|
||||
echo "1720 2086 2929 3879 6515 7980 12191" > $llccbw/bw_hwmon/mbps_zones
|
||||
fi
|
||||
echo 4 > $llccbw/bw_hwmon/sample_ms
|
||||
echo 80 > $llccbw/bw_hwmon/io_percent
|
||||
echo 20 > $llccbw/bw_hwmon/hist_memory
|
||||
echo 10 > $llccbw/bw_hwmon/hyst_length
|
||||
echo 30 > $llccbw/bw_hwmon/down_thres
|
||||
echo 0 > $llccbw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $llccbw/bw_hwmon/up_scale
|
||||
echo 1600 > $llccbw/bw_hwmon/idle_mbps
|
||||
echo 6515 > $llccbw/max_freq
|
||||
echo 40 > $llccbw/polling_interval
|
||||
done
|
||||
|
||||
for l3bw in $device/*snoop-l3-bw/devfreq/*snoop-l3-bw
|
||||
do
|
||||
cat $l3bw/available_frequencies | cut -d " " -f 1 > $l3bw/min_freq
|
||||
echo 4 > $l3bw/bw_hwmon/sample_ms
|
||||
echo 10 > $l3bw/bw_hwmon/io_percent
|
||||
echo 20 > $l3bw/bw_hwmon/hist_memory
|
||||
echo 10 > $l3bw/bw_hwmon/hyst_length
|
||||
echo 0 > $l3bw/bw_hwmon/down_thres
|
||||
echo 0 > $l3bw/bw_hwmon/guard_band_mbps
|
||||
echo 0 > $l3bw/bw_hwmon/up_scale
|
||||
echo 1600 > $l3bw/bw_hwmon/idle_mbps
|
||||
echo 9155 > $l3bw/max_freq
|
||||
echo 40 > $l3bw/polling_interval
|
||||
done
|
||||
|
||||
# configure mem_latency settings for LLCC and DDR scaling and qoslat
|
||||
for memlat in $device/*lat/devfreq/*lat
|
||||
do
|
||||
cat $memlat/available_frequencies | cut -d " " -f 1 > $memlat/min_freq
|
||||
echo 8 > $memlat/polling_interval
|
||||
echo 400 > $memlat/mem_latency/ratio_ceil
|
||||
done
|
||||
|
||||
# configure compute settings for gold latfloor
|
||||
for latfloor in $device/*cpu4-cpu*latfloor/devfreq/*cpu4-cpu*latfloor
|
||||
do
|
||||
cat $latfloor/available_frequencies | cut -d " " -f 1 > $latfloor/min_freq
|
||||
echo 8 > $latfloor/polling_interval
|
||||
done
|
||||
|
||||
# configure mem_latency settings for prime latfloor
|
||||
for latfloor in $device/*cpu7-cpu*latfloor/devfreq/*cpu7-cpu*latfloor
|
||||
do
|
||||
cat $latfloor/available_frequencies | cut -d " " -f 1 > $latfloor/min_freq
|
||||
echo 8 > $latfloor/polling_interval
|
||||
echo 25000 > $latfloor/mem_latency/ratio_ceil
|
||||
done
|
||||
|
||||
# CPU4 L3 ratio ceil
|
||||
for l3gold in $device/*cpu4-cpu-l3-lat/devfreq/*cpu4-cpu-l3-lat
|
||||
do
|
||||
echo 4000 > $l3gold/mem_latency/ratio_ceil
|
||||
done
|
||||
|
||||
# CPU5 L3 ratio ceil
|
||||
for l3gold in $device/*cpu5-cpu-l3-lat/devfreq/*cpu5-cpu-l3-lat
|
||||
do
|
||||
echo 4000 > $l3gold/mem_latency/ratio_ceil
|
||||
done
|
||||
|
||||
# CPU6 L3 ratio ceil
|
||||
for l3gold in $device/*cpu6-cpu-l3-lat/devfreq/*cpu6-cpu-l3-lat
|
||||
do
|
||||
echo 4000 > $l3gold/mem_latency/ratio_ceil
|
||||
done
|
||||
|
||||
# prime L3 ratio ceil
|
||||
for l3prime in $device/*cpu7-cpu-l3-lat/devfreq/*cpu7-cpu-l3-lat
|
||||
do
|
||||
echo 20000 > $l3prime/mem_latency/ratio_ceil
|
||||
done
|
||||
|
||||
# qoslat ratio ceil
|
||||
for qoslat in $device/*qoslat/devfreq/*qoslat
|
||||
do
|
||||
echo 50 > $qoslat/mem_latency/ratio_ceil
|
||||
done
|
||||
done
|
||||
echo N > /sys/module/lpm_levels/parameters/sleep_disabled
|
||||
echo deep > /sys/power/mem_sleep
|
||||
configure_memory_parameters
|
||||
|
||||
# Let kernel know our image version/variant/crm_version
|
||||
if [ -f /sys/devices/soc0/select_image ]; then
|
||||
image_version="10:"
|
||||
image_version+=`getprop ro.build.id`
|
||||
image_version+=":"
|
||||
image_version+=`getprop ro.build.version.incremental`
|
||||
image_variant=`getprop ro.product.name`
|
||||
image_variant+="-"
|
||||
image_variant+=`getprop ro.build.type`
|
||||
oem_version=`getprop ro.build.version.codename`
|
||||
echo 10 > /sys/devices/soc0/select_image
|
||||
echo $image_version > /sys/devices/soc0/image_version
|
||||
echo $image_variant > /sys/devices/soc0/image_variant
|
||||
echo $oem_version > /sys/devices/soc0/image_crm_version
|
||||
fi
|
||||
|
||||
# Change console log level as per console config property
|
||||
console_config=`getprop persist.console.silent.config`
|
||||
case "$console_config" in
|
||||
"1")
|
||||
echo "Enable console config to $console_config"
|
||||
echo 0 > /proc/sys/kernel/printk
|
||||
;;
|
||||
*)
|
||||
echo "Enable console config to $console_config"
|
||||
;;
|
||||
esac
|
||||
|
||||
setprop vendor.post_boot.parsed 1
|
@ -1,305 +0,0 @@
|
||||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012-2013, 2016-2019, 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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.
|
||||
#
|
||||
|
||||
function configure_zram_parameters() {
|
||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||
MemTotal=${MemTotalStr:16:8}
|
||||
|
||||
# Zram disk - 75% for Go devices.
|
||||
# For >=2GB Non-Go devices, size = 50% of RAM size. Limit the size to 4GB.
|
||||
|
||||
RamSizeGB=`echo "($MemTotal / 1048576 ) + 1" | bc`
|
||||
zRamSizeBytes=`echo "$RamSizeGB * 1024 * 1024 * 1024 / 2" | bc`
|
||||
if [ $zRamSizeBytes -gt 4294967296 ]; then
|
||||
zRamSizeBytes=4294967296
|
||||
fi
|
||||
|
||||
echo 1 > /sys/block/zram0/use_dedup
|
||||
echo $zRamSizeBytes > /sys/block/zram0/disksize
|
||||
mkswap /dev/block/zram0
|
||||
swapon /dev/block/zram0 -p 32758
|
||||
}
|
||||
|
||||
function configure_read_ahead_kb_values() {
|
||||
# set 512 for >= 4GB targets.
|
||||
echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
|
||||
echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb
|
||||
echo 512 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
|
||||
echo 512 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
|
||||
echo 512 > /sys/block/dm-0/queue/read_ahead_kb
|
||||
echo 512 > /sys/block/dm-1/queue/read_ahead_kb
|
||||
echo 512 > /sys/block/dm-2/queue/read_ahead_kb
|
||||
}
|
||||
|
||||
function configure_memory_parameters() {
|
||||
# Set Memory parameters.
|
||||
#
|
||||
# Set per_process_reclaim tuning parameters
|
||||
# All targets will use vmpressure range 50-70,
|
||||
# All targets will use 512 pages swap size.
|
||||
#
|
||||
# Set Low memory killer minfree parameters
|
||||
# 32 bit Non-Go, all memory configurations will use 15K series
|
||||
# 32 bit Go, all memory configurations will use uLMK + Memcg
|
||||
# 64 bit will use Google default LMK series.
|
||||
#
|
||||
# Set ALMK parameters (usually above the highest minfree values)
|
||||
# vmpressure_file_min threshold is always set slightly higher
|
||||
# than LMK minfree's last bin value for all targets. It is calculated as
|
||||
# vmpressure_file_min = (last bin - second last bin ) + last bin
|
||||
#
|
||||
# Set allocstall_threshold to 0 for all targets.
|
||||
#
|
||||
|
||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||
MemTotal=${MemTotalStr:16:8}
|
||||
|
||||
# Read adj series and set adj threshold for PPR and ALMK.
|
||||
# This is required since adj values change from framework to framework.
|
||||
adj_series=`cat /sys/module/lowmemorykiller/parameters/adj`
|
||||
adj_1="${adj_series#*,}"
|
||||
set_almk_ppr_adj="${adj_1%%,*}"
|
||||
|
||||
# PPR and ALMK should not act on HOME adj and below.
|
||||
# Normalized ADJ for HOME is 6. Hence multiply by 6
|
||||
# ADJ score represented as INT in LMK params, actual score can be in decimal
|
||||
# Hence add 6 considering a worst case of 0.9 conversion to INT (0.9*6).
|
||||
# For uLMK + Memcg, this will be set as 6 since adj is zero.
|
||||
set_almk_ppr_adj=$(((set_almk_ppr_adj * 6) + 6))
|
||||
echo $set_almk_ppr_adj > /sys/module/lowmemorykiller/parameters/adj_max_shift
|
||||
|
||||
# Calculate vmpressure_file_min as below & set for 64 bit:
|
||||
# vmpressure_file_min = last_lmk_bin + (last_lmk_bin - last_but_one_lmk_bin)
|
||||
minfree_series=`cat /sys/module/lowmemorykiller/parameters/minfree`
|
||||
minfree_1="${minfree_series#*,}" ; rem_minfree_1="${minfree_1%%,*}"
|
||||
minfree_2="${minfree_1#*,}" ; rem_minfree_2="${minfree_2%%,*}"
|
||||
minfree_3="${minfree_2#*,}" ; rem_minfree_3="${minfree_3%%,*}"
|
||||
minfree_4="${minfree_3#*,}" ; rem_minfree_4="${minfree_4%%,*}"
|
||||
minfree_5="${minfree_4#*,}"
|
||||
|
||||
vmpres_file_min=$((minfree_5 + (minfree_5 - rem_minfree_4)))
|
||||
echo $vmpres_file_min > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
if [ $MemTotal -gt 7602176 ]; then
|
||||
echo "18432,23040,27648,45158,119414,168896" > /sys/module/lowmemorykiller/parameters/minfree
|
||||
elif [ $MemTotal -gt 5505024 ]; then
|
||||
echo "18432,23040,27648,38708,102356,144768" > /sys/module/lowmemorykiller/parameters/minfree
|
||||
else
|
||||
echo "18432,23040,27648,32256,55296,80640" > /sys/module/lowmemorykiller/parameters/minfree
|
||||
fi
|
||||
|
||||
# Enable adaptive LMK for all targets &
|
||||
# use Google default LMK series for all 64-bit targets >=2GB.
|
||||
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
|
||||
|
||||
# Enable oom_reaper
|
||||
echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
|
||||
|
||||
#Set PPR parameters for all other targets.
|
||||
echo $set_almk_ppr_adj > /sys/module/process_reclaim/parameters/min_score_adj
|
||||
echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim
|
||||
echo 50 > /sys/module/process_reclaim/parameters/pressure_min
|
||||
echo 70 > /sys/module/process_reclaim/parameters/pressure_max
|
||||
echo 30 > /sys/module/process_reclaim/parameters/swap_opt_eff
|
||||
echo 512 > /sys/module/process_reclaim/parameters/per_swap_size
|
||||
|
||||
# Set allocstall_threshold to 0 for all targets.
|
||||
# Set swappiness to 100 for all targets
|
||||
echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold
|
||||
echo 100 > /proc/sys/vm/swappiness
|
||||
|
||||
# Disable wsf for all targets beacause we are using efk.
|
||||
# wsf Range : 1..1000 So set to bare minimum value 1.
|
||||
echo 1 > /proc/sys/vm/watermark_scale_factor
|
||||
|
||||
# Back to default VM settings
|
||||
echo 3000 > /proc/sys/vm/dirty_expire_centisecs
|
||||
echo 10 > /proc/sys/vm/dirty_background_ratio
|
||||
|
||||
configure_zram_parameters
|
||||
|
||||
configure_read_ahead_kb_values
|
||||
}
|
||||
|
||||
#Apply settings for atoll
|
||||
|
||||
# Core control parameters on silver
|
||||
echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
|
||||
echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
|
||||
echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
|
||||
echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
|
||||
echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
|
||||
echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
|
||||
echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable
|
||||
|
||||
# Setting b.L scheduler parameters
|
||||
# default sched up and down migrate values are 95 and 85
|
||||
echo 65 > /proc/sys/kernel/sched_downmigrate
|
||||
echo 71 > /proc/sys/kernel/sched_upmigrate
|
||||
# default sched up and down migrate values are 100 and 95
|
||||
echo 85 > /proc/sys/kernel/sched_group_downmigrate
|
||||
echo 100 > /proc/sys/kernel/sched_group_upmigrate
|
||||
echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
|
||||
|
||||
#colocation v3 settings
|
||||
echo 740000 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
|
||||
|
||||
# configure governor settings for little cluster
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
|
||||
echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
|
||||
echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
|
||||
# configure governor settings for big cluster
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
|
||||
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
|
||||
echo 1267200 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
|
||||
echo 652800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
|
||||
|
||||
# sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
|
||||
echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
|
||||
echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
|
||||
echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
|
||||
|
||||
# Enable conservative pl
|
||||
echo 1 > /proc/sys/kernel/sched_conservative_pl
|
||||
|
||||
echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
|
||||
echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms
|
||||
echo "0:0 1:0 2:0 3:0 4:1804800 5:0 6:0 7:2208000" > /sys/module/cpu_boost/parameters/powerkey_input_boost_freq
|
||||
echo 400 > /sys/module/cpu_boost/parameters/powerkey_input_boost_ms
|
||||
|
||||
# Set Memory parameters
|
||||
configure_memory_parameters
|
||||
|
||||
# Enable bus-dcvs
|
||||
for device in /sys/devices/platform/soc
|
||||
do
|
||||
for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
|
||||
do
|
||||
echo "bw_hwmon" > $cpubw/governor
|
||||
echo 50 > $cpubw/polling_interval
|
||||
echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
|
||||
echo 4 > $cpubw/bw_hwmon/sample_ms
|
||||
echo 68 > $cpubw/bw_hwmon/io_percent
|
||||
echo 20 > $cpubw/bw_hwmon/hist_memory
|
||||
echo 0 > $cpubw/bw_hwmon/hyst_length
|
||||
echo 80 > $cpubw/bw_hwmon/down_thres
|
||||
echo 0 > $cpubw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $cpubw/bw_hwmon/up_scale
|
||||
echo 1600 > $cpubw/bw_hwmon/idle_mbps
|
||||
done
|
||||
|
||||
for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
|
||||
do
|
||||
echo "bw_hwmon" > $llccbw/governor
|
||||
echo 40 > $llccbw/polling_interval
|
||||
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $llccbw/bw_hwmon/mbps_zones
|
||||
echo 4 > $llccbw/bw_hwmon/sample_ms
|
||||
echo 68 > $llccbw/bw_hwmon/io_percent
|
||||
echo 20 > $llccbw/bw_hwmon/hist_memory
|
||||
echo 0 > $llccbw/bw_hwmon/hyst_length
|
||||
echo 80 > $llccbw/bw_hwmon/down_thres
|
||||
echo 0 > $llccbw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $llccbw/bw_hwmon/up_scale
|
||||
echo 1600 > $llccbw/bw_hwmon/idle_mbps
|
||||
done
|
||||
|
||||
for npubw in $device/*npu*-npu-ddr-bw/devfreq/*npu*-npu-ddr-bw
|
||||
do
|
||||
echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
|
||||
echo "bw_hwmon" > $npubw/governor
|
||||
echo 40 > $npubw/polling_interval
|
||||
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $npubw/bw_hwmon/mbps_zones
|
||||
echo 4 > $npubw/bw_hwmon/sample_ms
|
||||
echo 80 > $npubw/bw_hwmon/io_percent
|
||||
echo 20 > $npubw/bw_hwmon/hist_memory
|
||||
echo 10 > $npubw/bw_hwmon/hyst_length
|
||||
echo 30 > $npubw/bw_hwmon/down_thres
|
||||
echo 0 > $npubw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $npubw/bw_hwmon/up_scale
|
||||
echo 0 > $npubw/bw_hwmon/idle_mbps
|
||||
echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
|
||||
done
|
||||
|
||||
#Enable mem_latency governor for L3, LLCC, and DDR scaling
|
||||
for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
|
||||
do
|
||||
echo "mem_latency" > $memlat/governor
|
||||
echo 10 > $memlat/polling_interval
|
||||
echo 400 > $memlat/mem_latency/ratio_ceil
|
||||
done
|
||||
|
||||
#Enable cdspl3 governor for L3 cdsp nodes
|
||||
for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
|
||||
do
|
||||
echo "cdspl3" > $l3cdsp/governor
|
||||
done
|
||||
|
||||
#Gold L3 ratio ceil
|
||||
echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil
|
||||
|
||||
#Enable compute governor for gold latfloor
|
||||
for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
|
||||
do
|
||||
echo "compute" > $latfloor/governor
|
||||
echo 10 > $latfloor/polling_interval
|
||||
done
|
||||
|
||||
done
|
||||
|
||||
# cpuset parameters
|
||||
echo 0-2 > /dev/cpuset/background/cpus
|
||||
echo 0-3 > /dev/cpuset/system-background/cpus
|
||||
echo 0-2,4-7 > /dev/cpuset/foreground/cpus
|
||||
echo 0-7 > /dev/cpuset/top-app/cpus
|
||||
|
||||
# Turn off scheduler boost at the end
|
||||
echo 0 > /proc/sys/kernel/sched_boost
|
||||
|
||||
# Turn on sleep modes
|
||||
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
|
||||
|
||||
# Post-setup services
|
||||
setprop vendor.post_boot.parsed 1
|
||||
|
||||
# Let kernel know our image version/variant/crm_version
|
||||
image_version="10:"
|
||||
image_version+=`getprop ro.build.id`
|
||||
image_version+=":"
|
||||
image_version+=`getprop ro.build.version.incremental`
|
||||
image_variant=`getprop ro.product.name`
|
||||
image_variant+="-"
|
||||
image_variant+=`getprop ro.build.type`
|
||||
oem_version=`getprop ro.build.version.codename`
|
||||
echo 10 > /sys/devices/soc0/select_image
|
||||
echo $image_version > /sys/devices/soc0/image_version
|
||||
echo $image_variant > /sys/devices/soc0/image_variant
|
||||
echo $oem_version > /sys/devices/soc0/image_crm_version
|
33
rootdir/bin/init.qcom.sensors.sh
Executable file
33
rootdir/bin/init.qcom.sensors.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/vendor/bin/sh
|
||||
# Copyright (c) 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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.
|
||||
#
|
||||
|
||||
#
|
||||
# Function to start sensors for SSC enabled platforms
|
||||
#
|
||||
cp /vendor/etc/sensors/scripts/* /data/vendor/sensors/scripts/
|
||||
chmod a+rw /data/vendor/sensors/scripts/*
|
@ -1,29 +0,0 @@
|
||||
#! /vendor/bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2019 Qualcomm Technologies, Inc.
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#
|
||||
# Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
#
|
||||
|
||||
export PATH=/vendor/bin
|
||||
|
||||
prefix="/sys/class/"
|
||||
#List of folder for ownership update
|
||||
arr=( "power_supply/battery/" "power_supply/usb/" "power_supply/main/" "power_supply/charge_pump_master/" "power_supply/pc_port/" "power_supply/dc/" "power_supply/bms/" "power_supply/parallel/" "usbpd/usbpd0/" "qc-vdm/" "charge_pump/" "qcom-battery/" )
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
for j in `ls "$prefix""$i"`
|
||||
do
|
||||
#skip directories to prevent possible security issues.
|
||||
if [[ -d "$prefix""$i""$j" ]]
|
||||
then
|
||||
continue
|
||||
else
|
||||
chown -h system.system "$prefix""$i""$j"
|
||||
fi
|
||||
done
|
||||
done
|
||||
setprop persist.vendor.hvdcp_opti.start 1
|
46
rootdir/bin/vendor_modprobe.sh
Executable file
46
rootdir/bin/vendor_modprobe.sh
Executable file
@ -0,0 +1,46 @@
|
||||
#! /vendor/bin/sh
|
||||
#=============================================================================
|
||||
# Copyright (c) 2019-2020 Qualcomm Technologies, Inc.
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#=============================================================================
|
||||
|
||||
#default to /vendor/lib/modules
|
||||
MODULES_PATH="/vendor/lib/modules/"
|
||||
GKI_MOD_PATH="/vendor/lib/modules/5.4-gki"
|
||||
|
||||
MODPROBE="/vendor/bin/modprobe"
|
||||
MODULES=`${MODPROBE} -d ${MODULES_PATH} -l`
|
||||
|
||||
# Find the first non-blacklisted module and try
|
||||
# inserting it. If insertion fails the module is not
|
||||
# compatible with the current kernel. Change the modules
|
||||
# directory to gki.
|
||||
for MODULE in ${MODULES}; do
|
||||
cat ${MODULES_PATH}/modules.blocklist | grep $MODULE
|
||||
if [ $? -ne 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
${MODPROBE} -a -b -d ${MODULES_PATH} ${MODULE}
|
||||
if [ $? -ne 0 ];then
|
||||
MODULES_PATH=$GKI_MOD_PATH
|
||||
MODULES=`${MODPROBE} -d ${MODULES_PATH} -l`
|
||||
fi
|
||||
|
||||
# Iterate over module list and modprobe them in background.
|
||||
for MODULE in ${MODULES}; do
|
||||
if [ ${MODULE} == "qca_cld3_wlan" ]; then
|
||||
echo "Xiaomi Wifi:" ${MODULE}
|
||||
elif [ ${MODULE} == "cnss2" ]; then
|
||||
echo "Xiaomi Wifi:" ${MODULE}
|
||||
elif [ ${MODULE} == "fts_touch_spi" ]; then
|
||||
echo "xiaomi fts:" ${MODULE}
|
||||
else
|
||||
${MODPROBE} -a -b -d ${MODULES_PATH} ${MODULE} &
|
||||
fi
|
||||
done
|
||||
|
||||
# Wait until all the modprobes are finished
|
||||
wait
|
14
rootdir/etc/charger_fstab.qti
Normal file
14
rootdir/etc/charger_fstab.qti
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright (c) 2019 Qualcomm Technologies, Inc.
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#
|
||||
# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
#
|
||||
|
||||
# Android fstab file.
|
||||
# The filesystem that contains the filesystem checker binary (typically /system) cannot
|
||||
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
|
||||
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait
|
33
rootdir/etc/charger_fw_fstab.qti
Normal file
33
rootdir/etc/charger_fw_fstab.qti
Normal file
@ -0,0 +1,33 @@
|
||||
# Copyright (c) 2019 - 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.
|
||||
|
||||
# Android fstab file.
|
||||
# The filesystem that contains the filesystem checker binary (typically /system) cannot
|
||||
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
|
||||
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect
|
29
rootdir/etc/init.batterysecret.rc
Normal file
29
rootdir/etc/init.batterysecret.rc
Normal file
@ -0,0 +1,29 @@
|
||||
on property:sys.boot_completed=1
|
||||
chmod 0664 /sys/class/qcom-battery/pd_verifed
|
||||
chmod 0664 /sys/class/qcom-battery/request_vdm_cmd
|
||||
chmod 0664 /sys/class/qcom-battery/verify_process
|
||||
chmod 0664 /sys/class/qcom-battery/authentic
|
||||
chmod 0664 /sys/class/qcom-battery/verify_slave_flag
|
||||
chmod 0664 /sys/class/qcom-battery/slave_authentic
|
||||
chmod 0664 /sys/class/qcom-battery/is_old_hw
|
||||
|
||||
service batterysecret /vendor/bin/batterysecret
|
||||
class last_start
|
||||
user root
|
||||
group system system wakelock
|
||||
disabled
|
||||
seclabel u:r:batterysecret:s0
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start batterysecret
|
||||
|
||||
#run batterysecret in off-charge mode
|
||||
on charger
|
||||
start batterysecret
|
||||
chmod 0664 /sys/class/qcom-battery/pd_verifed
|
||||
chmod 0664 /sys/class/qcom-battery/request_vdm_cmd
|
||||
chmod 0664 /sys/class/qcom-battery/verify_process
|
||||
chmod 0664 /sys/class/qcom-battery/authentic
|
||||
chmod 0664 /sys/class/qcom-battery/verify_slave_flag
|
||||
chmod 0664 /sys/class/qcom-battery/slave_authentic
|
||||
chmod 0664 /sys/class/qcom-battery/is_old_hw
|
8
rootdir/etc/init.mi_thermald.rc
Normal file
8
rootdir/etc/init.mi_thermald.rc
Normal file
@ -0,0 +1,8 @@
|
||||
on charger
|
||||
start mi_thermald
|
||||
|
||||
service mi_thermald /system/vendor/bin/mi_thermald
|
||||
class main
|
||||
user root
|
||||
group system
|
||||
seclabel u:r:mi_thermald:s0
|
@ -26,8 +26,9 @@
|
||||
#
|
||||
|
||||
import /vendor/etc/init/hw/init.qcom.usb.rc
|
||||
import /vendor/etc/init/hw/init.qcom.test.rc
|
||||
import /vendor/etc/init/hw/init.target.rc
|
||||
import /vendor/etc/init/hw/init.device.rc
|
||||
import /vendor/etc/init/hw/init.qcom.factory.rc
|
||||
|
||||
on early-init
|
||||
mount debugfs debugfs /sys/kernel/debug
|
||||
@ -54,8 +55,13 @@ on early-init
|
||||
chown system graphics /sys/kernel/debug/sync/sw_sync
|
||||
chmod 0666 /sys/kernel/debug/sync/sw_sync
|
||||
|
||||
#Disable UFS clock scaling
|
||||
write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 0
|
||||
|
||||
chown root system /dev/kmsg
|
||||
chmod 0620 /dev/kmsg
|
||||
# Load WIGIG platform driver
|
||||
#exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules msm_11ad_proxy
|
||||
|
||||
on init
|
||||
|
||||
@ -72,8 +78,6 @@ on init
|
||||
|
||||
on post-fs
|
||||
chmod 0755 /sys/kernel/debug/tracing
|
||||
chmod 0660 /sys/class/leds/red/brightness
|
||||
chown system system /sys/class/leds/red/brightness
|
||||
|
||||
on early-boot
|
||||
# set RLIMIT_MEMLOCK to 64MB
|
||||
@ -83,6 +87,8 @@ on early-boot
|
||||
write /sys/kernel/boot_cdsp/boot 1
|
||||
write /sys/devices/virtual/npu/msm_npu/boot 1
|
||||
write /sys/devices/virtual/cvp/cvp/boot 1
|
||||
exec u:r:vendor_qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh
|
||||
exec u:r:vendor_qti_init_shell:s0 -- /vendor/bin/init.qti.can.sh
|
||||
setprop ro.sf.lcd_density ${vendor.display.lcd_density}
|
||||
|
||||
chown system system /mnt/vendor/persist/data/pfm/licenses
|
||||
@ -121,33 +127,6 @@ on boot
|
||||
chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
|
||||
chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
|
||||
|
||||
#add flashlight
|
||||
chmod 0660 /sys/class/leds/flashlight/brightness
|
||||
chown system system /sys/class/leds/flashlight/brightness
|
||||
|
||||
#define back flash and front flash
|
||||
chmod 0660 /sys/class/leds/led:flash_0/brightness
|
||||
chmod 0660 /sys/class/leds/led:flash_1/brightness
|
||||
chmod 0660 /sys/class/leds/led:flash_2/brightness
|
||||
chmod 0660 /sys/class/leds/led:torch_0/brightness
|
||||
chmod 0660 /sys/class/leds/led:torch_1/brightness
|
||||
chmod 0660 /sys/class/leds/led:torch_2/brightness
|
||||
chmod 0660 /sys/class/leds/led:switch_0/brightness
|
||||
chmod 0660 /sys/class/leds/led:switch_1/brightness
|
||||
chmod 0660 /sys/class/leds/flashlight/brightness
|
||||
chmod 0777 /sys/class/ant_class/ant_state
|
||||
chmod 0777 /sys/class/ant_div_class/ant_div_state
|
||||
chown system system /sys/class/leds/led:flash_0/brightness
|
||||
chown system system /sys/class/leds/led:flash_1/brightness
|
||||
chown system system /sys/class/leds/led:flash_2/brightness
|
||||
chown system system /sys/class/leds/led:torch_0/brightness
|
||||
chown system system /sys/class/leds/led:torch_1/brightness
|
||||
chown system system /sys/class/leds/led:torch_2/brightness
|
||||
chown system system /sys/class/leds/led:switch_0/brightness
|
||||
chown system system /sys/class/leds/led:switch_1/brightness
|
||||
chown system system /sys/class/leds/flashlight/brightness
|
||||
chown system system /sys/class/ant_class/ant_state
|
||||
chown system system /sys/class/ant_div_class/ant_div_state
|
||||
# This location is used by QCRIL to host UNIX domain
|
||||
# socket files used for internal IPC within QCRIL
|
||||
# modules
|
||||
@ -168,10 +147,9 @@ on boot
|
||||
|
||||
setprop wifi.interface wlan0
|
||||
|
||||
setprop ro.telephony.call_ring.multiple false
|
||||
setprop persist.bluetooth.a2dp_offload.disabled false
|
||||
|
||||
#enable camera read sensors data
|
||||
setprop persist.camera.gyro.disable 0
|
||||
setprop ro.telephony.call_ring.multiple false
|
||||
|
||||
#Remove SUID bit for iproute2 ip tool
|
||||
chmod 0755 /system/bin/ip
|
||||
@ -231,18 +209,14 @@ on boot
|
||||
|
||||
# Create vpp directory
|
||||
mkdir /mnt/vendor/persist/vpp 0770 media media
|
||||
|
||||
copy /vendor/etc/tunings.txt /mnt/vendor/persist/vpp/tunings.txt
|
||||
|
||||
# Create hvdcp_opti directory
|
||||
mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system
|
||||
|
||||
#Create camera directory
|
||||
#Create persist for camera calibration data
|
||||
mkdir /mnt/vendor/persist/camera 0755 system cameraserver
|
||||
|
||||
# Create pa-cal driver directory lct-20181009
|
||||
mkdir /mnt/vendor/persist/audio 0770 audio audio
|
||||
|
||||
|
||||
# limit discard size to 128MB in order to avoid long IO latency
|
||||
write /sys/block/sda/queue/discard_max_bytes 134217728
|
||||
|
||||
@ -269,7 +243,7 @@ on post-fs-data
|
||||
mkdir /data/vendor/qtee 0770 system system
|
||||
|
||||
#Create folder of camera
|
||||
mkdir /data/vendor/camera 0770 system camera
|
||||
mkdir /data/vendor/camera 0770 camera camera
|
||||
|
||||
|
||||
#Create directory for tftp
|
||||
@ -289,6 +263,7 @@ on post-fs-data
|
||||
mkdir /data/vendor/wifi/wigig_hostapd 0770 wifi wifi
|
||||
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
|
||||
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
|
||||
mkdir /data/vendor/mac_addr 0770 system wifi
|
||||
|
||||
# Create the directories used by WiGig Sensing
|
||||
mkdir /data/vendor/sensing 0770 system wifi
|
||||
@ -298,7 +273,10 @@ on post-fs-data
|
||||
chown radio radio /data/vendor/connectivity
|
||||
|
||||
# Create directory used by audio subsystem
|
||||
mkdir /data/vendor/audio 0770 audio audio
|
||||
mkdir /data/vendor/audio 0771 audio audio
|
||||
|
||||
# Create directory used by audio cit
|
||||
mkdir /data/vendor/cit 0770 system system
|
||||
|
||||
# Create directory for audio delta files
|
||||
mkdir /data/vendor/audio/acdbdata 0770 media audio
|
||||
@ -409,11 +387,6 @@ on post-fs-data
|
||||
#Create dir for TUI
|
||||
mkdir /data/vendor/tui 0700 system drmrpc
|
||||
|
||||
start vendor.qcrild
|
||||
start vendor.qcrild2
|
||||
start vendor.dataqti
|
||||
start vendor.dataadpl
|
||||
|
||||
service nqnfcinfo /system/vendor/bin/nqnfcinfo
|
||||
class late_start
|
||||
group nfc
|
||||
@ -444,7 +417,8 @@ service vendor.ssr_setup /system/vendor/bin/ssr_setup
|
||||
disabled
|
||||
|
||||
service vendor.ss_ramdump /system/bin/subsystem_ramdump_system 2
|
||||
class late_start
|
||||
class main
|
||||
#user system
|
||||
group system everybody
|
||||
disabled
|
||||
|
||||
@ -478,7 +452,7 @@ on property:persist.vendor.ssr.restart_level=*
|
||||
on property:persist.vendor.ssr.enable_ramdumps=1
|
||||
write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
|
||||
mkdir /data/vendor/ramdump_ssr 770 system system
|
||||
start vendor.ss_ramdump
|
||||
#start vendor.ss_ramdump
|
||||
|
||||
on property:persist.vendor.ssr.enable_ramdumps=0
|
||||
write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
|
||||
@ -491,6 +465,8 @@ on property:persist.vendor.sys.rawdump_copy=0
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
write /dev/kmsg "Boot completed "
|
||||
#Enable UFS clock scaling back
|
||||
write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 1
|
||||
#Reset read ahead for dm-0 and dm-1 to 512kb
|
||||
write /sys/block/dm-0/queue/read_ahead_kb 512
|
||||
write /sys/block/dm-1/queue/read_ahead_kb 512
|
||||
@ -500,10 +476,16 @@ on property:sys.boot_completed=1
|
||||
#Reinit lmkd to reconfigure lmkd properties
|
||||
setprop lmkd.reinit 1
|
||||
|
||||
on property:persist.vendor.radio.atfwd.start=false
|
||||
stop vendor.atfwd
|
||||
|
||||
on property:vendor.radio.atfwd.start=false
|
||||
stop vendor.atfwd
|
||||
|
||||
# corefile limit
|
||||
on property:persist.debug.trace=1
|
||||
mkdir /data/core 0777 root root
|
||||
write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
|
||||
write /proc/sys/kernel/core_pattern "/data/core/core-%e-%p"
|
||||
|
||||
on property:vendor.media.target.version=*
|
||||
setprop vendor.sys.media.target.version ${vendor.media.target.version}
|
||||
@ -512,7 +494,19 @@ on property:vendor.media.target_variant=*
|
||||
setprop ro.media.xml_variant.codecs ${vendor.media.target_variant}
|
||||
setprop ro.media.xml_variant.codecs_performance ${vendor.media.target_variant}
|
||||
|
||||
service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh
|
||||
class core
|
||||
user root
|
||||
oneshot
|
||||
|
||||
service qcom-c_main-sh /vendor/bin/init.class_main.sh
|
||||
class main
|
||||
user root
|
||||
group root system
|
||||
oneshot
|
||||
|
||||
on property:vold.decrypt=trigger_restart_framework
|
||||
start qcom-c_main-sh
|
||||
start wcnss-service
|
||||
|
||||
service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
|
||||
@ -540,6 +534,35 @@ on property:ro.data.large_tcp_window_size=true
|
||||
on property:sys.sysctl.tcp_adv_win_scale=*
|
||||
write /proc/sys/net/ipv4/tcp_adv_win_scale ${sys.sysctl.tcp_adv_win_scale}
|
||||
|
||||
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
|
||||
-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
|
||||
-g@android:vendor_wpa_wlan0
|
||||
# we will start as root and wpa_supplicant will switch to user wifi
|
||||
# after setting up the capabilities required for WEXT
|
||||
# user wifi
|
||||
# group wifi inet keystore
|
||||
interface android.hardware.wifi.supplicant@1.0::ISupplicant default
|
||||
interface android.hardware.wifi.supplicant@1.1::ISupplicant default
|
||||
class main
|
||||
socket vendor_wpa_wlan0 dgram 660 wifi wifi
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \
|
||||
-iwigig0 -Dnl80211 -c/data/vendor/wifi/wigig_supplicant.conf \
|
||||
-m/data/vendor/wifi/wigig_p2p_supplicant.conf \
|
||||
-O/data/vendor/wifi/wigig_sockets -dd \
|
||||
-e/data/vendor/wifi/wigig_entropy.bin -g@android:wigig/wpa_wigig0 \
|
||||
-S wigigsvc
|
||||
# we will start as root and wpa_supplicant will switch to user wifi
|
||||
# after setting up the capabilities required for WEXT
|
||||
# user wifi
|
||||
# group wifi inet keystore
|
||||
class main
|
||||
socket wigig/wpa_wigig0 dgram 660 wifi wifi
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
# Data Migration
|
||||
service vendor.move_wifi_data /system/bin/move_wifi_data.sh
|
||||
class main
|
||||
@ -548,6 +571,18 @@ service vendor.move_wifi_data /system/bin/move_wifi_data.sh
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service wigignpt /vendor/bin/wigignpt
|
||||
interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default
|
||||
class hal
|
||||
socket wigig/wigignpt stream 660 system wifi
|
||||
user system
|
||||
group wifi
|
||||
capabilities NET_ADMIN
|
||||
disabled
|
||||
|
||||
on property:persist.vendor.wigig.npt.enable=1
|
||||
start wigignpt
|
||||
|
||||
service vendor.sensingdaemon /vendor/bin/sensingdaemon
|
||||
class hal
|
||||
socket wigig/sensingdaemon stream 660 system wifi
|
||||
@ -672,16 +707,23 @@ service qcom-sh /vendor/bin/init.qcom.sh
|
||||
user root
|
||||
group root system radio
|
||||
oneshot
|
||||
# Remove since is deprecated but throws AVC denial.
|
||||
# service crashdata-sh /vendor/bin/init.qcom.crashdata.sh
|
||||
# class late_start
|
||||
# user root
|
||||
# oneshot
|
||||
|
||||
service qcom-post-boot /vendor/bin/init.qcom.post_boot.sh
|
||||
service wifi-sdio-on /vendor/bin/init.qcom.sdio.sh
|
||||
class late_start
|
||||
user root
|
||||
group root system wakelock graphics
|
||||
group wifi inet
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start qcom-post-boot
|
||||
service wifi-crda /vendor/bin/init.crda.sh
|
||||
class late_start
|
||||
user root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:ro.vendor.ril.mbn_copy_completed=1
|
||||
write /data/vendor/radio/copy_complete 1
|
||||
@ -704,14 +746,6 @@ service hostapd_fst /vendor/bin/hw/hostapd -dd -g /data/vendor/wifi/hostapd/glob
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service ims_regmanager /system/vendor/bin/exe-ims-regmanagerprocessnative
|
||||
class late_start
|
||||
group net_bt_admin inet radio wifi
|
||||
disabled
|
||||
|
||||
on property:persist.ims.regmanager.mode=1
|
||||
start ims_regmanager
|
||||
|
||||
on property:ro.data.large_tcp_window_size=true
|
||||
# Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
|
||||
write /proc/sys/net/ipv4/tcp_adv_win_scale 2
|
||||
@ -754,62 +788,27 @@ service vendor.ssr_diag /system/vendor/bin/ssr_diag
|
||||
group system
|
||||
disabled
|
||||
|
||||
service hvdcp /system/bin/hvdcp
|
||||
class core
|
||||
user root
|
||||
disabled
|
||||
|
||||
on property:persist.usb.hvdcp.detect=true
|
||||
start hvdcp
|
||||
|
||||
on property:persist.usb.hvdcp.detect=false
|
||||
stop hvdcp
|
||||
|
||||
service charger_monitor /system/bin/charger_monitor
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
|
||||
service qbcharger /charger -m 1
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.qbcharger.enable=true
|
||||
start qbcharger
|
||||
|
||||
on property:sys.qbcharger.enable=false
|
||||
stop qbcharger
|
||||
|
||||
# service diag_mdlog_start /system/vendor/bin/diag_mdlog
|
||||
service diag_mdlog_start /system/bin/diag_mdlog_system -n 40 -s 500
|
||||
service diag_mdlog_start /system/vendor/bin/diag_mdlog -q 2 -j 1 -u -c -n 20
|
||||
class late_start
|
||||
user shell
|
||||
# group system oem_2901 sdcard_rw sdcard_r media_rw
|
||||
group system diag oem_2901 sdcard_rw sdcard_r media_rw
|
||||
group system oem_2901 oem_2902 sdcard_rw sdcard_r media_rw
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
#service diag_mdlog_stop /system/vendor/bin/diag_mdlog -k
|
||||
service diag_mdlog_stop /system/bin/diag_mdlog_system -k
|
||||
service diag_mdlog_stop /system/vendor/bin/diag_mdlog -k
|
||||
class late_start
|
||||
user shell
|
||||
# group system oem_2901 sdcard_rw sdcard_r media_rw
|
||||
group system diag oem_2901 sdcard_rw sdcard_r media_rw
|
||||
group system oem_2901 oem_2902 sdcard_rw sdcard_r media_rw
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:persist.vendor.mdlog.enable=true
|
||||
start diag_mdlog_start
|
||||
on property:persist.vendor.mdlog.enable=false
|
||||
start diag_mdlog_stop
|
||||
|
||||
service qlogd /system/xbin/qlogd
|
||||
socket qlogd stream 0662 system system
|
||||
class main
|
||||
disabled
|
||||
on property:persist.vendor.qlogd=1
|
||||
on property:persist.sys.qlogd=1
|
||||
start qlogd
|
||||
on property:persist.vendor.qlogd=0
|
||||
on property:persist.sys.qlogd=0
|
||||
stop qlogd
|
||||
|
||||
service vm_bms /vendor/bin/vm_bms
|
||||
@ -842,7 +841,6 @@ service vendor.LKCore-dbg /vendor/bin/LKCore
|
||||
user root
|
||||
group root system log diag net_raw
|
||||
|
||||
|
||||
# service for USER
|
||||
service vendor.LKCore-rel /vendor/bin/LKCore
|
||||
class late_start
|
||||
@ -863,7 +861,7 @@ service esepmdaemon /system/vendor/bin/esepmdaemon
|
||||
|
||||
on charger
|
||||
setprop persist.sys.usb.config mass_storage
|
||||
start qcom-post-boot
|
||||
chown system system /sys/class/backlight/panel0-backlight/brightness
|
||||
|
||||
#add poweroffhandler
|
||||
service poweroffhandler /system/vendor/bin/poweroffhandler
|
||||
@ -945,13 +943,3 @@ service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service
|
||||
writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
|
||||
socket audio_hw_socket seqpacket 0666 system system
|
||||
onrestart restart audioserver
|
||||
|
||||
service vendor.hwcomposer-2-4 /vendor/bin/hw/android.hardware.graphics.composer@2.4-service
|
||||
override
|
||||
class hal animation
|
||||
user system
|
||||
group graphics drmrpc
|
||||
capabilities SYS_NICE
|
||||
onrestart restart surfaceflinger
|
||||
writepid /dev/cpuset/system-background/tasks
|
||||
socket pps stream 0660 system system
|
||||
|
173
rootdir/etc/init.qti.kernel.rc
Normal file
173
rootdir/etc/init.qti.kernel.rc
Normal file
@ -0,0 +1,173 @@
|
||||
#=============================================================================
|
||||
# Copyright (c) 2019-2020 Qualcomm Technologies, Inc.
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#
|
||||
# Copyright (c) 2009-2012, 2014-2019, 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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.test.rc
|
||||
|
||||
on early-init
|
||||
mount debugfs debugfs /sys/kernel/debug
|
||||
chmod 0755 /sys/kernel/debug
|
||||
|
||||
# Mount tracefs in /sys/kernel/tracing as CONFIG_DEBUG_FS might be
|
||||
# disabled and /sys/kernel/debug/tracing might not be available
|
||||
mount tracefs tracefs /sys/kernel/tracing
|
||||
chmod 0755 /sys/kernel/tracing
|
||||
|
||||
chown root system /dev/kmsg
|
||||
chmod 0620 /dev/kmsg
|
||||
|
||||
write /proc/sys/kernel/sched_boost 1
|
||||
|
||||
on init
|
||||
# Create cgroup mount point for memory
|
||||
mkdir /sys/fs/cgroup/memory/bg 0750 root system
|
||||
write /sys/fs/cgroup/memory/bg/memory.swappiness 140
|
||||
write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1
|
||||
chown root system /sys/fs/cgroup/memory/bg/tasks
|
||||
chmod 0660 /sys/fs/cgroup/memory/bg/tasks
|
||||
|
||||
# update scheduler tunables
|
||||
write /dev/cpuctl/foreground/cpu.uclamp.sched_boost_no_override 1
|
||||
write /dev/cpuctl/top-app/cpu.uclamp.sched_boost_no_override 1
|
||||
write /dev/cpuctl/background/cpu.uclamp.colocate 0
|
||||
write /dev/cpuctl/foreground/cpu.uclamp.colocate 0
|
||||
write /dev/cpuctl/top-app/cpu.uclamp.colocate 1
|
||||
|
||||
on post-fs
|
||||
chmod 0755 /sys/kernel/debug/tracing
|
||||
|
||||
# set aggressive read ahead for dm-0 and dm-1 during boot up
|
||||
write /sys/block/dm-0/queue/read_ahead_kb 2048
|
||||
write /sys/block/dm-1/queue/read_ahead_kb 2048
|
||||
write /sys/block/dm-2/queue/read_ahead_kb 2048
|
||||
|
||||
on early-boot
|
||||
# Allow subsystem (modem etc) debugging
|
||||
write /sys/kernel/boot_adsp/boot 1
|
||||
write /sys/kernel/boot_cdsp/boot 1
|
||||
write /sys/kernel/boot_slpi/boot 1
|
||||
write /sys/devices/virtual/cvp/cvp/boot 1
|
||||
|
||||
on boot
|
||||
# Set the console loglevel to < KERN_INFO
|
||||
# Set the default message loglevel to KERN_INFO
|
||||
write /proc/sys/kernel/printk "6 6 1 7"
|
||||
|
||||
# Allow access to emmc rawdump block partition and dload sysfs node
|
||||
chown root system /dev/block/bootdevice/by-name/rawdump
|
||||
chmod 0660 /dev/block/bootdevice/by-name/rawdump
|
||||
chown root system /sys/kernel/dload/emmc_dload
|
||||
chmod 0660 /sys/kernel/dload/emmc_dload
|
||||
chown root system /dev/block/bootdevice/by-name/ramdump
|
||||
chmod 0660 /dev/block/bootdevice/by-name/ramdump
|
||||
chown root system /sys/kernel/dload/dload_mode
|
||||
chmod 0660 /sys/kernel/dload/dload_mode
|
||||
|
||||
# set the io-scheduler to bfq on all mq support devices
|
||||
write /sys/block/sda/queue/scheduler bfq
|
||||
write /sys/block/sdb/queue/scheduler bfq
|
||||
write /sys/block/sdc/queue/scheduler bfq
|
||||
write /sys/block/sdd/queue/scheduler bfq
|
||||
write /sys/block/sde/queue/scheduler bfq
|
||||
write /sys/block/sdf/queue/scheduler bfq
|
||||
write /sys/block/sdg/queue/scheduler bfq
|
||||
write /sys/block/sdh/queue/scheduler bfq
|
||||
write /sys/class/block/mmcblk0/queue/scheduler bfq
|
||||
write /sys/class/block/mmcblk1/queue/scheduler bfq
|
||||
|
||||
# update io-scheduler tunables
|
||||
write /sys/block/sda/queue/iosched/slice_idle 0
|
||||
write /sys/block/sdb/queue/iosched/slice_idle 0
|
||||
write /sys/block/sdc/queue/iosched/slice_idle 0
|
||||
write /sys/block/sdd/queue/iosched/slice_idle 0
|
||||
write /sys/block/sde/queue/iosched/slice_idle 0
|
||||
write /sys/block/sdf/queue/iosched/slice_idle 0
|
||||
write /sys/block/sdg/queue/iosched/slice_idle 0
|
||||
write /sys/block/sdh/queue/iosched/slice_idle 0
|
||||
write /sys/class/block/mmcblk0/queue/iosched/slice_idle 0
|
||||
write /sys/class/block/mmcblk1/queue/iosched/slice_idle 0
|
||||
|
||||
|
||||
on post-fs-data
|
||||
# Create directory used for dump collection
|
||||
mkdir /data/vendor/ssrdump 0770 root system
|
||||
|
||||
on property:persist.sys.ssr.enable_debug=*
|
||||
write /sys/module/subsys_pil_tz/parameters/enable_debug ${persist.sys.ssr.enable_debug}
|
||||
|
||||
on property:persist.sys.mba_boot_timeout=*
|
||||
write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
|
||||
|
||||
on property:persist.sys.modem_auth_timeout=*
|
||||
write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
|
||||
|
||||
on property:persist.sys.pil_proxy_timeout=*
|
||||
write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
|
||||
|
||||
on property:persist.vendor.ssr.enable_ramdumps=1
|
||||
write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
|
||||
|
||||
on property:persist.vendor.ssr.enable_ramdumps=0
|
||||
write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
|
||||
|
||||
on property:persist.vendor.sys.rawdump_copy=1
|
||||
write /sys/kernel/dload/emmc_dload 1
|
||||
|
||||
on property:persist.vendor.sys.rawdump_copy=0
|
||||
write /sys/kernel/dload/emmc_dload 0
|
||||
|
||||
service kernel-boot /vendor/bin/sh /vendor/bin/init.qti.kernel.sh
|
||||
class core
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service kernel-post-boot /vendor/bin/sh /vendor/bin/init.kernel.post_boot.sh
|
||||
class core
|
||||
user root
|
||||
group root system wakelock graphics
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
write /dev/kmsg "Boot completed "
|
||||
#Reset read ahead for dm-0, dm-1 and dm-2 to 512kb
|
||||
write /sys/block/dm-0/queue/read_ahead_kb 512
|
||||
write /sys/block/dm-1/queue/read_ahead_kb 512
|
||||
write /sys/block/dm-2/queue/read_ahead_kb 512
|
||||
start kernel-boot
|
||||
start kernel-post-boot
|
||||
|
||||
service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
|
||||
class core
|
||||
user root
|
||||
group root
|
||||
disabled
|
@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2013-2018,2020, The Linux Foundation. All rights reserved.
|
||||
|
||||
# Copyright (c) 2019-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
|
||||
@ -27,42 +28,71 @@
|
||||
#
|
||||
#
|
||||
|
||||
import /vendor/etc/init/init.mishow.ctl.rc
|
||||
import /vendor/etc/init/hw/init.qti.kernel.rc
|
||||
import /vendor/etc/init/hw/init.mi_thermald.rc
|
||||
import /vendor/etc/init/hw/init.batterysecret.rc
|
||||
import /vendor/etc/init/init.charge_logger.rc
|
||||
import /vendor/etc/init/mi_ic.rc
|
||||
import /vendor/etc/init/mi_ric.rc
|
||||
|
||||
on early-init
|
||||
exec u:r:vendor_modprobe:s0 -- /vendor/bin/vendor_modprobe.sh
|
||||
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules q6_pdr_dlkm q6_notifier_dlkm snd_event_dlkm apr_dlkm adsp_loader_dlkm q6_dlkm native_dlkm pinctrl_wcd_dlkm pinctrl_lpi_dlkm swr_dlkm platform_dlkm hdmi_dlkm stub_dlkm wcd_core_dlkm wsa883x_dlkm bolero_cdc_dlkm wsa_macro_dlkm va_macro_dlkm rx_macro_dlkm tx_macro_dlkm bt_fm_slim wcd938x_dlkm wcd938x_slave_dlkm swr_dmic_dlkm swr_haptics_dlkm machine_dlkm radio-i2c-rtc6226-qca mmc_core mmc_block sdhci sdhci-pltfm sdhci-msm cdsprm tfa98xx_dlkm
|
||||
write /proc/sys/kernel/sched_boost 1
|
||||
mkdir /dsp 0771 media media
|
||||
mkdir /firmware 0771 system system
|
||||
mkdir /bt_firmware 0771 system system
|
||||
symlink /data/tombstones /tombstones
|
||||
wait /sys/devices/soc0/soc_id
|
||||
|
||||
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/system-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
|
||||
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
||||
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
|
||||
# Scheduler uclamp
|
||||
mkdir /dev/cpuctl/foreground
|
||||
mkdir /dev/cpuctl/background
|
||||
mkdir /dev/cpuctl/top-app
|
||||
mkdir /dev/cpuctl/rt
|
||||
chown system system /dev/cpuctl
|
||||
chown system system /dev/cpuctl/foreground
|
||||
chown system system /dev/cpuctl/background
|
||||
chown system system /dev/cpuctl/top-app
|
||||
chown system system /dev/cpuctl/rt
|
||||
chown system system /dev/cpuctl/tasks
|
||||
chown system system /dev/cpuctl/foreground/tasks
|
||||
chown system system /dev/cpuctl/background/tasks
|
||||
chown system system /dev/cpuctl/top-app/tasks
|
||||
chown system system /dev/cpuctl/rt/tasks
|
||||
chmod 0664 /dev/cpuctl/tasks
|
||||
chmod 0664 /dev/cpuctl/foreground/tasks
|
||||
chmod 0664 /dev/cpuctl/background/tasks
|
||||
chmod 0664 /dev/cpuctl/top-app/tasks
|
||||
chmod 0664 /dev/cpuctl/rt/tasks
|
||||
write /dev/cpuctl/foreground/cpu.rt_runtime_us 950000
|
||||
write /dev/cpuctl/background/cpu.rt_runtime_us 950000
|
||||
write /dev/cpuctl/top-app/cpu.rt_runtime_us 950000
|
||||
write /dev/cpuctl/rt/cpu.rt_runtime_us 950000
|
||||
|
||||
wait /dev/block/platform/soc/1d84000.ufshc
|
||||
symlink /dev/block/platform/soc/1d84000.ufshc /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
|
||||
|
||||
on early-fs
|
||||
start vold
|
||||
exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/ cnss2
|
||||
exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/5.4-gki cnss2
|
||||
|
||||
on fs
|
||||
start hwservicemanager
|
||||
mkdir /mnt/vendor/spunvm 0660 system system
|
||||
mount_all /vendor/etc/fstab.qcom --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
|
||||
mkdir /mnt/vendor/persist/subsys 0770 root system
|
||||
mkdir /mnt/vendor/persist/audio 0755 system system
|
||||
mkdir /mnt/vendor/persist/haptics 0755 system system
|
||||
chmod 0664 /sys/class/thermal/thermal_message/sconfig
|
||||
chown system system /sys/class/thermal/thermal_message/sconfig
|
||||
chmod 0666 /sys/class/thermal/thermal_message/temp_state
|
||||
chown system system /sys/class/thermal/thermal_message/temp_state
|
||||
mkdir /mnt/vendor/persist/audio 0755 system system
|
||||
mkdir /dev/logfs 0771 system system
|
||||
mount vfat /dev/block/bootdevice/by-name/logfs /dev/logfs noatime umask=006,uid=1000,gid=1000
|
||||
mount ext4 /dev/block/bootdevice/by-name/rescue /mnt/rescue noatime
|
||||
restorecon_recursive /mnt/rescue
|
||||
|
||||
on post-fs
|
||||
# set RLIMIT_MEMLOCK to 64MB
|
||||
@ -71,108 +101,236 @@ on post-fs
|
||||
|
||||
on late-fs
|
||||
wait_for_prop hwservicemanager.ready true
|
||||
exec_start wait_for_keymaster
|
||||
#exec_start wait_for_keymaster
|
||||
start console
|
||||
mount_all /vendor/etc/fstab.qcom --late
|
||||
|
||||
service sec_nvm /vendor/bin/sec_nvm
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
|
||||
on post-fs-data
|
||||
mkdir /data/vendor/touchpad 0775 system system
|
||||
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 /data/vendor/hbtp 0750 system system
|
||||
mkdir /persist/qti_fp 0700 system system
|
||||
mkdir /data/vendor/nnhal 0700 system system
|
||||
mkdir /data/vendor/mac_addr 0771 system system
|
||||
#Creat charger log
|
||||
mkdir /data/vendor/charge_logger 0771 system system
|
||||
|
||||
mkdir /vendor/data/tombstones 0771 system system
|
||||
chmod 0644 /dev/elliptic0
|
||||
chmod 0644 /dev/elliptic1
|
||||
chmod 0660 /dev/ir_spi
|
||||
chown system system /dev/ir_spi
|
||||
chmod 0666 /dev/stmvl53l5
|
||||
chown system system /dev/stmvl53l5
|
||||
mkdir /data/vendor/thermal 0771 root system
|
||||
mkdir /data/vendor/thermal/config 0771 root system
|
||||
mkdir /data/vendor/mac_addr 0771 system system
|
||||
mkdir /data/vendor/wlan_logs 0777 root shell
|
||||
mkdir /data/vendor/nfc 0777 nfc nfc
|
||||
chmod 0660 /dev/al6021
|
||||
chown system camera /dev/al6021
|
||||
|
||||
#add torch node for cit
|
||||
chown system system /sys/class/leds/led:torch_0/brightness
|
||||
chown system system /sys/class/leds/led:torch_1/brightness
|
||||
chown system system /sys/class/leds/led:torch_2/brightness
|
||||
chown system system /sys/class/leds/led:torch_3/brightness
|
||||
chown system system /sys/class/leds/led:flash_0/brightness
|
||||
chown system system /sys/class/leds/led:flash_1/brightness
|
||||
chown system system /sys/class/leds/led:flash_2/brightness
|
||||
chown system system /sys/class/leds/led:flash_3/brightness
|
||||
chown system system /sys/class/leds/led:switch_0/brightness
|
||||
chown system system /sys/class/leds/led:switch_0/trigger
|
||||
chown system system /sys/class/leds/led:switch_1/brightness
|
||||
chown system system /sys/class/leds/led:switch_2/brightness
|
||||
chown system system /sys/class/leds/flashlight/brightness
|
||||
|
||||
chmod 0664 /sys/class/leds/led:torch_0/brightness
|
||||
chmod 0664 /sys/class/leds/led:torch_1/brightness
|
||||
chmod 0664 /sys/class/leds/led:torch_2/brightness
|
||||
chmod 0664 /sys/class/leds/led:torch_3/brightness
|
||||
chmod 0664 /sys/class/leds/led:flash_0/brightness
|
||||
chmod 0664 /sys/class/leds/led:flash_1/brightness
|
||||
chmod 0664 /sys/class/leds/led:flash_2/brightness
|
||||
chmod 0664 /sys/class/leds/led:flash_3/brightnesssss
|
||||
chmod 0664 /sys/class/leds/led:switch_0/brightness
|
||||
chmod 0664 /sys/class/leds/led:switch_0/trigger
|
||||
chmod 0664 /sys/class/leds/led:switch_1/brightness
|
||||
chmod 0664 /sys/class/leds/led:switch_2/brightness
|
||||
chmod 0664 /sys/class/leds/flashlight/brightness
|
||||
|
||||
on post-fs-data
|
||||
chmod 0666 /dev/migt
|
||||
restorecon /dev/migt
|
||||
chmod 0777 /sys/module/migt/parameters/migt_freq
|
||||
restorecon /sys/module/migt/parameters/migt_freq
|
||||
chmod 0777 /sys/module/migt/parameters/migt_ms
|
||||
restorecon /sys/module/migt/parameters/migt_ms
|
||||
chmod 0777 /sys/module/migt/parameters/migt_thresh
|
||||
restorecon /sys/module/migt/parameters/migt_thresh
|
||||
chmod 0777 /sys/module/migt/parameters/boost_policy
|
||||
restorecon /sys/module/migt/parameters/boost_policy
|
||||
chmod 0777 /sys/module/migt/parameters/fps_variance_ratio
|
||||
restorecon /sys/module/migt/parameters/fps_variance_ratio
|
||||
chmod 0777 /sys/module/migt/parameters/super_task_max_num
|
||||
restorecon /sys/module/migt/parameters/super_task_max_num
|
||||
chmod 0777 /sys/module/migt/parameters/migt_ceiling_freq
|
||||
restorecon /sys/module/migt/parameters/migt_ceiling_freq
|
||||
chmod 0777 /sys/module/migt/parameters/stask_candidate_num
|
||||
restorecon /sys/module/migt/parameters/stask_candidate_num
|
||||
chmod 0666 /sys/module/migt/parameters/glk_minfreq
|
||||
restorecon /sys/module/migt/parameters/glk_minfreq
|
||||
chmod 0666 /sys/module/migt/parameters/glk_maxfreq
|
||||
restorecon /sys/module/migt/parameters/glk_maxfreq
|
||||
chmod 0666 /sys/module/migt/parameters/glk_ms
|
||||
restorecon /sys/module/migt/parameters/glk_ms
|
||||
chmod 0666 /sys/module/migt/parameters/mi_viptask
|
||||
restorecon /sys/module/migt/parameters/mi_viptask
|
||||
mkdir /data/vendor/misc/display 0771 system system
|
||||
|
||||
chown root system /sys/module/migt/parameters/add_lclus_affinity_uidlist
|
||||
chmod 0664 /sys/module/migt/parameters/add_lclus_affinity_uidlist
|
||||
chown root system /sys/module/migt/parameters/del_lclus_affinity_uidlist
|
||||
chmod 0664 /sys/module/migt/parameters/del_lclus_affinity_uidlist
|
||||
chown root system /sys/module/migt/parameters/add_mclus_affinity_uidlist
|
||||
chmod 0664 /sys/module/migt/parameters/add_mclus_affinity_uidlist
|
||||
chown root system /sys/module/migt/parameters/del_mclus_affinity_uidlist
|
||||
chmod 0664 /sys/module/migt/parameters/del_mclus_affinity_uidlist
|
||||
chown root system /sys/module/migt/parameters/add_bclus_affinity_uidlist
|
||||
chmod 0664 /sys/module/migt/parameters/add_bclus_affinity_uidlist
|
||||
chown root system /sys/module/migt/parameters/del_bclus_affinity_uidlist
|
||||
chmod 0664 /sys/module/migt/parameters/del_bclus_affinity_uidlist
|
||||
chown root system /sys/module/migt/parameters/reset_clus_affinity_uidlist
|
||||
chmod 0664 /sys/module/migt/parameters/reset_clus_affinity_uidlist
|
||||
|
||||
on early-boot
|
||||
start vendor.sensors
|
||||
# Enable WLAN cold boot calibration
|
||||
write /sys/devices/platform/soc/b0000000.qcom,cnss-qca6490/fs_ready 1
|
||||
chmod 0202 /sys/devices/platform/soc/b0000000.qcom,cnss-qca6490/data_stall
|
||||
|
||||
mkdir /data/vendor/wlan_logs 0770 system wifi
|
||||
# For cpusets initialize for Silver Only first and then Silver + Gold
|
||||
# Silver Only configuration cannot work with 0-7
|
||||
on boot
|
||||
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/mipi_reg
|
||||
chmod 0664 /sys/class/drm/card0-DSI-1/mipi_reg
|
||||
chown system system /sys/class/drm/card0-DSI-1/panel_info
|
||||
chmod 0444 /sys/class/drm/card0-DSI-1/panel_info
|
||||
chown system system /sys/class/thermal/thermal_message/sconfig
|
||||
chown system system /sys/class/thermal/thermal_message/balance_mode
|
||||
write /dev/cpuset/audio-app/cpus 1-2
|
||||
chown system system /sys/kernel/hbtp/display_pwr
|
||||
start rmt_storage
|
||||
start rfs_access
|
||||
write /dev/cpuset/top-app/cpus 0-3
|
||||
write /dev/cpuset/foreground/cpus 0-3
|
||||
write /dev/cpuset/foreground/boost/cpus 0-3
|
||||
write /dev/cpuset/background/cpus 0-3
|
||||
write /dev/cpuset/system-background/cpus 0-3
|
||||
write /dev/cpuset/top-app/cpus 0-7
|
||||
write /dev/cpuset/foreground/cpus 0-7
|
||||
write /dev/cpuset/foreground/boost/cpus 0-7
|
||||
write /dev/cpuset/background/cpus 0-7
|
||||
write /dev/cpuset/system-background/cpus 0-7
|
||||
|
||||
# Add a cpuset for the camera daemon
|
||||
# We want all cores for camera
|
||||
# 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/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
|
||||
|
||||
#add runin factory charging test
|
||||
chmod 0777 /sys/class/power_supply/battery/input_suspend
|
||||
chmod 0777 /sys/class/power_supply/battery/charging_enabled
|
||||
chmod 0777 /sys/class/power_supply/usb/typec_cc_orientation
|
||||
chown system system /sys/class/power_supply/battery/input_suspend
|
||||
chown system system /sys/class/power_supply/battery/charging_enabled
|
||||
chown system system /sys/class/power_supply/usb/typec_cc_orientation
|
||||
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/cali
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/cali_save
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/f0_save
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/osc_save
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/osc_cali
|
||||
|
||||
# access permissions for fingerprint
|
||||
chown system system /sys/bus/platform/devices/soc/soc:fpc1020/irq
|
||||
chown system system /sys/bus/platform/devices/soc/soc:fpc1020/wakeup_enable
|
||||
chown system system /sys/bus/platform/devices/soc/soc:fpc1020/modalias
|
||||
chmod 0666 /dev/qseecom
|
||||
chmod 0644 /dev/goodix_fp
|
||||
chown system system /dev/goodix_fp
|
||||
#Load WLAN driver
|
||||
insmod /vendor/lib/modules/wlan.ko
|
||||
|
||||
#Load exfat driver
|
||||
insmod /vendor/lib/modules/exfat.ko
|
||||
|
||||
#Load mi memory driver
|
||||
insmod /vendor/lib/modules/mi_memory.ko
|
||||
|
||||
#USB controller configuration
|
||||
chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_enable
|
||||
chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_enable
|
||||
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/988000.i2c/i2c-1/1-0038/trusted_touch_enable
|
||||
chmod 0660 /sys/devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_enable
|
||||
chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_event
|
||||
chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_event
|
||||
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.rndis.func.name "gsi"
|
||||
setprop vendor.usb.rmnet.func.name "gsi"
|
||||
setprop vendor.usb.rmnet.inst.name "rmnet"
|
||||
setprop vendor.usb.dpl.inst.name "dpl"
|
||||
setprop vendor.usb.qdss.inst.name "qdss"
|
||||
setprop sys.usb.configfs 1
|
||||
setprop vendor.usb.qdss.inst.name "qdss_mdm"
|
||||
setprop vendor.usb.controller a600000.dwc3
|
||||
#Load WLAN driver
|
||||
exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/ qca_cld3_wlan
|
||||
exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/5.4-gki qca_cld3_wlan
|
||||
#Allow access to memory hotplug device attributes
|
||||
chown system system /sys/kernel/mem-offline/anon_migrate
|
||||
|
||||
#start camera server as daemon
|
||||
#service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||
# class late_start
|
||||
# user camera
|
||||
#Display feature sysfs node
|
||||
chown system system /sys/class/mi_display/disp-DSI-0/disp_param
|
||||
chmod 0664 /sys/class/mi_display/disp-DSI-0/disp_param
|
||||
chown system system /sys/class/mi_display/disp-DSI-0/mipi_rw
|
||||
chmod 0664 /sys/class/mi_display/disp-DSI-0/mipi_rw
|
||||
chown system system /sys/class/mi_display/disp-DSI-0/panel_info
|
||||
chmod 0444 /sys/class/mi_display/disp-DSI-0/panel_info
|
||||
chown system system /sys/class/mi_display/disp-DSI-0/wp_info
|
||||
chmod 0444 /sys/class/mi_display/disp-DSI-0/wp_info
|
||||
chown system system /sys/class/mi_display/disp-DSI-0/dynamic_fps
|
||||
chmod 0444 /sys/class/mi_display/disp-DSI-0/dynamic_fps
|
||||
chown system system /sys/class/mi_display/disp-DSI-0/doze_brightness
|
||||
chmod 0664 /sys/class/mi_display/disp-DSI-0/doze_brightness
|
||||
chown system system /sys/class/mi_display/disp-DSI-0/disp_count
|
||||
chmod 0664 /sys/class/mi_display/disp-DSI-0/disp_count
|
||||
chown system system /sys/class/mi_display/disp-DSI-0/brightness_clone
|
||||
chmod 0664 /sys/class/mi_display/disp-DSI-0/brightness_clone
|
||||
|
||||
#touch funtions permissions setting
|
||||
chown system system /sys/class/touch/touch_dev/palm_sensor
|
||||
chmod 0664 /sys/class/touch/touch_dev/palm_sensor
|
||||
|
||||
#ufscld functions permission
|
||||
chown root system /sys/devices/platform/soc/1d84000.ufshc/ufscld/auto_hibern8_enable
|
||||
chown root system /sys/devices/platform/soc/1d84000.ufshc/ufscld/block_suspend
|
||||
chown root system /sys/devices/platform/soc/1d84000.ufshc/ufscld/cld_operation_status
|
||||
chown root system /sys/devices/platform/soc/1d84000.ufshc/ufscld/debug
|
||||
chown root system /sys/devices/platform/soc/1d84000.ufshc/ufscld/frag_level
|
||||
chown root system /sys/devices/platform/soc/1d84000.ufshc/ufscld/trigger
|
||||
chown root system /sys/devices/platform/soc/1d84000.ufshc/ufscld/trigger_interval
|
||||
chmod 664 /sys/devices/platform/soc/1d84000.ufshc/ufscld/trigger
|
||||
|
||||
write /sys/block/sda/queue/wbt_lat_usec 75000
|
||||
|
||||
#chown/chmod input_suspend node as needed from mishow service
|
||||
chown system system /sys/class/qcom-battery/input_suspend
|
||||
chmod 774 /sys/class/qcom-battery/input_suspend
|
||||
|
||||
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 boot && property:persist.vendor.usb.controller.default=*
|
||||
setprop vendor.usb.controller ${persist.vendor.usb.controller.default}
|
||||
|
||||
on property:vendor.usb.controller=*
|
||||
setprop sys.usb.controller ${vendor.usb.controller}
|
||||
|
||||
on property:vendor.usb.controller=* && property:ro.boot.usben=true
|
||||
write /sys/class/udc/${vendor.usb.controller}/device/../mode peripheral
|
||||
|
||||
on init && property:ro.boot.mode=charger
|
||||
mount_all /vendor/etc/charger_fw_fstab.qti --early
|
||||
write /sys/kernel/boot_adsp/boot 1
|
||||
wait /sys/class/power_supply/battery
|
||||
|
||||
on charger
|
||||
start vendor.power_off_alarm
|
||||
setprop sys.usb.controller a600000.dwc3
|
||||
setprop sys.usb.configfs 1
|
||||
write /sys/module/lpm_levels/parameters/sleep_disabled N
|
||||
|
||||
on property:vendor.audio.cit.spkcal.copy=true
|
||||
copy /data/vendor/cit/cs35l41_cal.bin /mnt/vendor/persist/audio/cs35l41_cal.bin
|
||||
copy /data/vendor/cit/cs35l41_cal_right.bin /mnt/vendor/persist/audio/cs35l41_cal_right.bin
|
||||
copy /data/vendor/cit/cs35l41_cal.txt /mnt/vendor/persist/audio/cs35l41_cal.txt
|
||||
copy /data/vendor/cit/cs35l41_cal_right.txt /mnt/vendor/persist/audio/cs35l41_cal_right.txt
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l41_cal.bin
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l41_cal_right.bin
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l41_cal.txt
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l41_cal_right.txt
|
||||
copy /data/vendor/cit/tfa9874_chk.txt /mnt/vendor/persist/audio/tfa9874_chk.txt
|
||||
chmod 666 /mnt/vendor/persist/audio/tfa9874_chk.txt
|
||||
copy /data/vendor/cit/cs35l45_cal_mt.bin /mnt/vendor/persist/audio/cs35l45_cal_mt.bin
|
||||
copy /data/vendor/cit/cs35l45_cal_md.bin /mnt/vendor/persist/audio/cs35l45_cal_md.bin
|
||||
copy /data/vendor/cit/cs35l45_cal_ft.bin /mnt/vendor/persist/audio/cs35l45_cal_ft.bin
|
||||
copy /data/vendor/cit/cs35l45_cal_fd.bin /mnt/vendor/persist/audio/cs35l45_cal_fd.bin
|
||||
copy /data/vendor/cit/cs35l45_cal_mt.txt /mnt/vendor/persist/audio/cs35l45_cal_mt.txt
|
||||
copy /data/vendor/cit/cs35l45_cal_md.txt /mnt/vendor/persist/audio/cs35l45_cal_md.txt
|
||||
copy /data/vendor/cit/cs35l45_cal_ft.txt /mnt/vendor/persist/audio/cs35l45_cal_ft.txt
|
||||
copy /data/vendor/cit/cs35l45_cal_fd.txt /mnt/vendor/persist/audio/cs35l45_cal_fd.txt
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l45_cal_mt.bin
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l45_cal_md.bin
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l45_cal_ft.bin
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l45_cal_fd.bin
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l45_cal_mt.txt
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l45_cal_md.txt
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l45_cal_ft.txt
|
||||
chmod 666 /mnt/vendor/persist/audio/cs35l45_cal_fd.txt
|
||||
|
||||
service vendor.lowi /vendor/bin/lowirpcd
|
||||
class core
|
||||
user system
|
||||
group system wakelock
|
||||
capabilities BLOCK_SUSPEND
|
||||
|
||||
service audioshell_service /vendor/bin/audioshell_service
|
||||
oneshot
|
||||
@ -181,7 +339,7 @@ service audioshell_service /vendor/bin/audioshell_service
|
||||
on property:ro.vendor.miui.region=*
|
||||
start audioshell_service
|
||||
|
||||
# group camera system inet input graphics
|
||||
|
||||
#pd-mapper
|
||||
service vendor.pd_mapper /vendor/bin/pd-mapper
|
||||
class core
|
||||
@ -201,406 +359,72 @@ service vendor.per_proxy /vendor/bin/pm-proxy
|
||||
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=*
|
||||
stop vendor.per_proxy
|
||||
|
||||
on charger
|
||||
mkdir /mnt/vendor/persist
|
||||
chown root system /mnt/vendor/persist
|
||||
chmod 0771 /mnt/vendor/persist
|
||||
mkdir /mnt/vendor/persist/subsys 0770 root system
|
||||
start vendor.power_off_alarm
|
||||
chown system system /sys/class/leds/red/brightness
|
||||
chmod 0666 /sys/class/leds/red/brightness
|
||||
chmod 0666 /sys/class/backlight/panel0-backlight/brightness
|
||||
mkdir /data/vendor/charge_logger 0771 system system
|
||||
start charge_logger
|
||||
start vendor.power_off_alarm
|
||||
|
||||
|
||||
on property:vendor.display.lcd_density=640
|
||||
setprop dalvik.vm.heapgrowthlimit 512m
|
||||
|
||||
on property:vendor.display.lcd_density=560
|
||||
setprop dalvik.vm.heapgrowthlimit 256m
|
||||
|
||||
on property:vendor.display.lcd_density=480
|
||||
setprop dalvik.vm.heapgrowthlimit 128m
|
||||
|
||||
on property:vendor.display.lcd_density=240
|
||||
setprop dalvik.vm.heapgrowthlimit 96m
|
||||
|
||||
on property:vendor.display.lcd_density=160
|
||||
setprop dalvik.vm.heapgrowthlimit 96m
|
||||
|
||||
## import cne init file
|
||||
#on post-fs
|
||||
# export LD_PRELOAD /vendor/lib/libNimsWrap.so
|
||||
#
|
||||
## Allow usb charging to be disabled peristently
|
||||
#on property:persist.usb.chgdisabled=1
|
||||
# write /sys/class/power_supply/battery/charging_enabled 0
|
||||
#
|
||||
#on property:persist.usb.chgdisabled=0
|
||||
# write /sys/class/power_supply/battery/charging_enabled 1
|
||||
|
||||
# QR_code feature
|
||||
service nv_mac /vendor/bin/nv_mac
|
||||
class late_start
|
||||
user system
|
||||
group system inet net_raw wifi
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start nv_mac
|
||||
#end
|
||||
|
||||
service vibrator_calibration /vendor/bin/vibrator_calibration
|
||||
class late_start
|
||||
user system
|
||||
group system
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start vibrator_calibration
|
||||
|
||||
service spdaemon /vendor/bin/spdaemon
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
|
||||
#service qosmgrd /system/bin/qosmgr /system/etc/qosmgr_rules.xml
|
||||
# user system
|
||||
# group system
|
||||
# disabled
|
||||
#
|
||||
|
||||
#service security-check1 /sbin/security_boot_check system
|
||||
# class core
|
||||
# oneshot
|
||||
#
|
||||
#service security-check2 /sbin/security_boot_check recovery
|
||||
# class core
|
||||
# oneshot
|
||||
#
|
||||
#service time_daemon /system/vendor/bin/time_daemon
|
||||
# class late_start
|
||||
# user root
|
||||
# group root
|
||||
|
||||
#service audiod /vendor/bin/audiod
|
||||
# class late_start
|
||||
# user system
|
||||
# group system
|
||||
#
|
||||
#service usf_tester /vendor/bin/usf_tester
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_epos /vendor/bin/usf_epos
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_gesture /vendor/bin/usf_gesture
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
|
||||
#service usf_sync_gesture /system/bin/usf_sync_gesture
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
|
||||
#service usf_p2p /system/bin/usf_p2p
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_hovering /vendor/bin/usf_hovering
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_proximity /system/bin/usf_proximity
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf-post-boot /system/vendor/bin/sh /system/etc/usf_post_boot.sh
|
||||
# class late_start
|
||||
# user root
|
||||
# disabled
|
||||
# oneshot
|
||||
#
|
||||
#on property:init.svc.bootanim=stopped
|
||||
# start usf-post-boot
|
||||
#
|
||||
#
|
||||
#on boot
|
||||
# insmod /system/lib/modules/adsprpc.ko
|
||||
# insmod /system/lib/modules/mhi.ko
|
||||
## access permission for secure touch
|
||||
# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
|
||||
# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
|
||||
# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
|
||||
# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
|
||||
#
|
||||
#
|
||||
#
|
||||
#service mdm_helper /system/bin/mdm_helper
|
||||
# class core
|
||||
# onrestart setprop ro.service.mdm_helper_restarted "true"
|
||||
# disabled
|
||||
#
|
||||
#service mdm_helper_proxy /system/bin/mdm_helper_proxy
|
||||
# class core
|
||||
# disabled
|
||||
#
|
||||
#service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||
# class late_start
|
||||
# user camera
|
||||
# group camera system inet input graphics
|
||||
#
|
||||
# Stop mdm_helper_proxy in case of shutdown
|
||||
#on property:sys.shutdown.requested=*
|
||||
# stop mdm_helper_proxy
|
||||
#
|
||||
# Stop mdm_helper_proxy on APQ target
|
||||
#on property:ro.radio.noril=yes
|
||||
# stop mdm_helper_proxy
|
||||
#
|
||||
#on property:persist.airplane.mode.pwr.svg=enabled
|
||||
# setprop ro.mdm_helper_proxy_req false
|
||||
#
|
||||
#on property:init.svc.ril-daemon=running
|
||||
# setprop ro.mdm_helper_proxy_req true
|
||||
#
|
||||
## Start mdm_helper_proxy
|
||||
#on property:ro.mdm_helper_proxy_req=true
|
||||
# start mdm_helper_proxy
|
||||
#
|
||||
## QCA1530 SoC core detect
|
||||
#service gnss-detect /system/vendor/bin/gnss.qca1530.sh detect
|
||||
# class core
|
||||
# oneshot
|
||||
#
|
||||
## QCA1530 SoC late_start group trigger
|
||||
#service gnss-init /system/vendor/bin/gnss.qca1530.sh init
|
||||
# class late_start
|
||||
# oneshot
|
||||
#
|
||||
## QCA1530 SoC Service Daemon
|
||||
#service gnss-svcd /system/vendor/bin/gnss.qca1530.sh start
|
||||
# class late_start
|
||||
# user root
|
||||
# group gps system qcom_diag diag log inet net_raw
|
||||
# disabled
|
||||
|
||||
|
||||
#on property:vold.decrypt=trigger_restart_framework
|
||||
# start vendor.cnss_diag
|
||||
on property:vold.decrypt=trigger_restart_framework
|
||||
start vendor.cnss_diag
|
||||
|
||||
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
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service ppd /vendor/bin/mm-pp-dpps
|
||||
class late_start
|
||||
user system
|
||||
group system graphics
|
||||
socket pps stream 0660 system system
|
||||
disabled
|
||||
|
||||
on property:init.svc.hwcomposer-2-1=stopped
|
||||
stop ppd
|
||||
|
||||
on property:init.svc.hwcomposer-2-1=running
|
||||
start ppd
|
||||
|
||||
on property:init.svc.hwcomposer-2-1=restarting
|
||||
stop ppd
|
||||
|
||||
on property:ro.boot.multisim_config=*
|
||||
setprop persist.radio.multisim.config ${ro.boot.multisim_config}
|
||||
|
||||
#service nqs /system/bin/nqs
|
||||
# class late_start
|
||||
# socket nqs_qsb_comm stream 660 system system
|
||||
# user system
|
||||
# group drmrpc
|
||||
#
|
||||
#service adsprpcd /system/vendor/bin/adsprpcd
|
||||
# class main
|
||||
# user media
|
||||
# group media
|
||||
#
|
||||
##Start picture quality tuning service
|
||||
#service vqttoolservice /system/bin/vqttoolservice
|
||||
# class late_start
|
||||
# socket vqtss stream 0660 system system
|
||||
# user system
|
||||
# group system
|
||||
|
||||
service hbtp /system/vendor/bin/hbtp_daemon
|
||||
service vendor.tcpdump /vendor/bin/tcpdump -i any -W 3 -C 5 -s 134 -w /data/vendor/wlan_logs/tcpdump.pcap
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
user root
|
||||
group root wifi
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service qfp-daemon /vendor/bin/qfp-daemon
|
||||
class late_start
|
||||
user system
|
||||
group system drmrpc diag input
|
||||
|
||||
service energy-awareness /system/vendor/bin/energy-awareness
|
||||
service vendor.sniffer /vendor/bin/tcpdump -i wlan0 -w /data/vendor/wlan_logs/sniffer.pcap
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
oneshot
|
||||
|
||||
service smcinvoked /system/bin/smcinvoked
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
|
||||
# smart pa cal add by lct
|
||||
service smart-pa-cal /vendor/bin/FactoryApp -r -t 25
|
||||
user root
|
||||
group root audio
|
||||
group root wifi
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:odm.pa-cal=0
|
||||
stop smart-pa-cal
|
||||
on property:sys.user.0.ce_available=true
|
||||
start vendor.tcpdump
|
||||
|
||||
on property:odm.pa-cal=1
|
||||
start smart-pa-cal
|
||||
|
||||
service smart-pa-test /vendor/bin/FactoryApp -f -t 25
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:odm.pa-test=0
|
||||
stop smart-pa-test
|
||||
|
||||
on property:odm.pa-test=1
|
||||
start smart-pa-test
|
||||
|
||||
# add charge_logger service for dump charge message
|
||||
service charge_logger /vendor/bin/charge_logger
|
||||
class last_start
|
||||
user system
|
||||
group system system wakelock
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start charge_logger
|
||||
|
||||
service tinyhostless_loop /system/bin/tinyhostless -D 0 -P 30 -C 31 -p 256 -n 2 -c 1 -r 48000
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
# Add for mic2 to speaker loopback test lct_20190501
|
||||
service tinyhostless_spk /system/bin/tinyhostless -D 0 -P 40 -C 31 -p 256 -n 2 -c 1 -r 48000
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service loopback_spk_start /vendor/bin/loopback.sh 1 1
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service loopback_spk_stop /vendor/bin/loopback.sh 1 0
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:odm.loopback-spk=1
|
||||
start loopback_spk_start
|
||||
|
||||
on property:odm.loopback-spk=0
|
||||
start loopback_spk_stop
|
||||
service dcvs-sh /vendor/bin/init.qti.dcvs.sh
|
||||
service factory_err_check /system/bin/check_factory_err.sh
|
||||
class late_start
|
||||
user root
|
||||
group root system
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:vendor.dcvs.prop=1
|
||||
start dcvs-sh
|
||||
|
||||
#Add tools for wifi RF test and start by dial *#*#2008#*#* on 20191031
|
||||
service openwifi_L /vendor/bin/sh /vendor/bin/wifitest.sh
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
service closewifi_L /vendor/bin/sh /vendor/bin/wifitest_close.sh
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:odm.openwifi_L=1
|
||||
start openwifi_L
|
||||
on property:odm.closewifi_L=1
|
||||
start closewifi_L
|
||||
|
||||
service wifiFtmdaemon /vendor/bin/ftmdaemon -dd -n
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:vendor.sys.wifiFtmdaemon=1
|
||||
start wifiFtmdaemon
|
||||
on property:vendor.sys.wifiFtmdaemon=0
|
||||
stop wifiFtmdaemon
|
||||
|
||||
service myftmftm /vendor/bin/sh /vendor/bin/myftm.agent.sh
|
||||
oneshot
|
||||
disabled
|
||||
on property:vendor.sys.myftm=1
|
||||
start myftmftm
|
||||
|
||||
#End on 20191031
|
||||
|
||||
#add tools for bt RF test and start by dial *#*#2008#*#* on 20191031
|
||||
service wdsdaemon /vendor/bin/wdsdaemon -su
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
|
||||
on property:vendor.bluetooth.startwdsdaemon=true
|
||||
start vendor.bt_wdsdaemon
|
||||
|
||||
on property:vendor.bluetooth.startwdsdaemon=false
|
||||
stop vendor.bt_wdsdaemon
|
||||
|
||||
service vendor.bt_wdsdaemon /system/vendor/bin/wdsdaemon -su
|
||||
class late_start
|
||||
user root
|
||||
group bluetooth diag system wakelock
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:odm.start_wdsdaemon=1
|
||||
start wdsdaemon
|
||||
on property:odm.start_wdsdaemon=0
|
||||
stop wdsdaemon
|
||||
service vendor.nv_mac /vendor/bin/nv_mac
|
||||
class late_start
|
||||
user system
|
||||
group system inet net_admin wifi net_raw
|
||||
oneshot
|
||||
|
||||
on property:odm.thermallct.isincall=1
|
||||
write /sys/class/power_supply/battery/device/thermalcall 1
|
||||
|
||||
on property:odm.thermallct.isincall=0
|
||||
write /sys/class/power_supply/battery/device/thermalcall 0
|
||||
|
||||
service displayfeature /vendor/bin/displayfeature
|
||||
class late_start
|
||||
@ -616,63 +440,17 @@ on property:init.svc.surfaceflinger=running
|
||||
on property:init.svc.surfaceflinger=restarting
|
||||
stop displayfeature
|
||||
|
||||
#2019.12.30 tianyajun add pocket mode
|
||||
on property:odm.pocket.mode.keygurad.locked=1
|
||||
write /proc/tp_palm 1
|
||||
|
||||
on property:odm.pocket.mode.keygurad.locked=0
|
||||
write /proc/tp_palm 0
|
||||
|
||||
service blueduttest /vendor/bin/sh /vendor/bin/bluedut.sh
|
||||
service displaycount /vendor/bin/displaycount
|
||||
class late_start
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service btclose /vendor/bin/sh /vendor/bin/bt_close.sh
|
||||
user root
|
||||
group root
|
||||
user system
|
||||
group system
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:odm.closebt=1
|
||||
start btclose
|
||||
on property:sys.boot_completed=1
|
||||
start displaycount
|
||||
|
||||
#End on 20191031
|
||||
#add for wifi 9434 log
|
||||
service vendor.tcpdump /system/vendor/bin/tcpdump -i any -W 2 -C 2 -s 134 -w /data/vendor/wlan_logs/tcpdump.pcap
|
||||
class main
|
||||
user root
|
||||
group root wifi inet sdcard_rw media_rw diag
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service sniffer /system/vendor/bin/tcpdump -i wlan0 -w /sdcard/wlan_logs/sniffer.pcap
|
||||
class main
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.user.0.ce_available=true
|
||||
start vendor.cnss_diag
|
||||
start vendor.tcpdump
|
||||
|
||||
service startpktlog /system/vendor/bin/iwpriv wlan0 pktlog 2
|
||||
class main
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service stoppktlog /system/vendor/bin/iwpriv wlan0 pktlog 0
|
||||
class main
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:persist.sys.device_provisioned=1
|
||||
setprop dalvik.vm.dex2oat-cpu-set 0,1,2,3,4,5,7
|
||||
setprop dalvik.vm.dex2oat-threads 6
|
||||
on property:sys.lmkd.memory.compact=1
|
||||
setprop sys.lmkd.memory.compact 0
|
||||
write /proc/sys/vm/reclaim_pages ${sys.lmkd.memory.reclaim_pages}
|
||||
write /proc/sys/vm/compact_memory 1
|
||||
|
Loading…
Reference in New Issue
Block a user