sm6250-common: Clean up rootdir

* Remove unused/duplicated parts
* Make changes to do without other scripts

Co-authored-by: Demon000 <demonsingur@gmail.com>
Change-Id: I8e758337488dc19ecb47ec1b583fba33ef05882d
This commit is contained in:
Alexander Winkowski 2021-06-30 14:34:31 +02:00
parent 4a2375f2bc
commit 77999ac063
No known key found for this signature in database
GPG Key ID: 72762A66704CDE44
7 changed files with 158 additions and 1444 deletions

View File

@ -37,6 +37,7 @@ PRODUCT_PACKAGES += \
init.qti.chg_policy.sh
PRODUCT_PACKAGES += \
init.qcom.power.rc \
init.qcom.rc \
init.recovery.qcom.rc \
init.target.rc \

View File

@ -43,6 +43,14 @@ LOCAL_SRC_FILES := etc/fstab.qcom
LOCAL_MODULE_PATH := $(TARGET_RAMDISK_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.power.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.qcom.power.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.rc
LOCAL_MODULE_TAGS := optional

View File

@ -29,37 +29,7 @@
export PATH=/vendor/bin
# Set platform variables
if [ -f /sys/devices/soc0/hw_platform ]; then
soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
else
soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
fi
if [ -f /sys/devices/soc0/soc_id ]; then
soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
else
soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
fi
if [ -f /sys/devices/soc0/platform_version ]; then
soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
else
soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
fi
if [ -f /sys/class/drm/card0-DSI-1/modes ]; then
echo "detect" > /sys/class/drm/card0-DSI-1/status
mode_file=/sys/class/drm/card0-DSI-1/modes
while read line; do
fb_width=${line%%x*};
break;
done < $mode_file
elif [ -f /sys/class/graphics/fb0/virtual_size ]; then
res=`cat /sys/class/graphics/fb0/virtual_size` 2> /dev/null
fb_width=${res%,*}
fi
log -t BOOT -p i "MSM target '$1', SoC '$soc_hwplatform', HwID '$soc_hwid', SoC ver '$soc_hwver'"
echo "detect" > /sys/class/drm/card0-DSI-1/status
#For drm based display driver
vbfile=/sys/module/drm/parameters/vblankoffdelay
if [ -w $vbfile ]; then
@ -68,433 +38,13 @@ else
log -t DRM_BOOT -p w "file: '$vbfile' or perms doesn't exist"
fi
function set_density_by_fb() {
#put default density based on width
if [ -z $fb_width ]; then
setprop vendor.display.lcd_density 320
else
if [ $fb_width -ge 1600 ]; then
setprop vendor.display.lcd_density 640
elif [ $fb_width -ge 1440 ]; then
setprop vendor.display.lcd_density 560
elif [ $fb_width -ge 1080 ]; then
setprop vendor.display.lcd_density 480
elif [ $fb_width -ge 720 ]; then
setprop vendor.display.lcd_density 320 #for 720X1280 resolution
elif [ $fb_width -ge 480 ]; then
setprop vendor.display.lcd_density 240 #for 480X854 QRD resolution
else
setprop vendor.display.lcd_density 160
fi
fi
}
target=`getprop ro.board.platform`
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
case "$soc_hwplatform" in
"FFA" | "SVLTE_FFA")
# linking to surf_keypad_qwerty.kcm.bin instead of surf_keypad_numeric.kcm.bin so that
# the UI keyboard works fine.
ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
;;
"Fluid")
setprop vendor.display.lcd_density 240
setprop qcom.bt.dev_power_class 2
;;
*)
ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
;;
esac
;;
"sm6150")
case "$soc_hwplatform" in
"ADP")
setprop vendor.display.lcd_density 160
;;
esac
case "$soc_hwid" in
365|366)
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
setprop vendor.media.target.version 1
if [ $sku_ver -eq 1 ]; then
setprop vendor.media.target.version 2
fi
;;
355|369|377|384)
setprop vendor.chre.enabled 0
;;
*)
esac
;;
"msm8660")
case "$soc_hwplatform" in
"Fluid")
setprop vendor.display.lcd_density 240
;;
"Dragon")
setprop ro.sound.alsa "WM8903"
;;
esac
;;
"msm8960")
# lcd density is write-once. Hence the separate switch case
case "$soc_hwplatform" in
"Liquid")
if [ "$soc_hwver" == "196608" ]; then # version 0x30000 is 3D sku
setprop ro.sf.hwrotation 90
fi
setprop vendor.display.lcd_density 160
;;
"MTP")
setprop vendor.display.lcd_density 240
;;
*)
case "$soc_hwid" in
"109")
setprop vendor.display.lcd_density 160
;;
*)
setprop vendor.display.lcd_density 240
;;
esac
;;
esac
#Set up composition type based on the target
case "$soc_hwid" in
87)
#8960
setprop debug.composition.type dyn
;;
153|154|155|156|157|138)
#8064 V2 PRIME | 8930AB | 8630AB | 8230AB | 8030AB | 8960AB
setprop debug.composition.type c2d
;;
*)
esac
;;
"msm8974")
case "$soc_hwplatform" in
"Liquid")
setprop vendor.display.lcd_density 160
# Liquid do not have hardware navigation keys, so enable
# Android sw navigation bar
setprop ro.hw.nav_keys 0
;;
"Dragon")
setprop vendor.display.lcd_density 240
;;
*)
setprop vendor.display.lcd_density 320
;;
esac
;;
"msm8226")
case "$soc_hwplatform" in
*)
setprop vendor.display.lcd_density 320
;;
esac
;;
"msm8610" | "apq8084" | "mpq8092")
case "$soc_hwplatform" in
*)
setprop vendor.display.lcd_density 240
;;
esac
;;
"apq8084")
case "$soc_hwplatform" in
"Liquid")
setprop vendor.display.lcd_density 320
# Liquid do not have hardware navigation keys, so enable
# Android sw navigation bar
setprop ro.hw.nav_keys 0
;;
"SBC")
setprop vendor.display.lcd_density 200
# SBC do not have hardware navigation keys, so enable
# Android sw navigation bar
setprop qemu.hw.mainkeys 0
;;
*)
setprop vendor.display.lcd_density 480
;;
esac
;;
"msm8996")
case "$soc_hwplatform" in
"Dragon")
setprop vendor.display.lcd_density 240
setprop qemu.hw.mainkeys 0
;;
"ADP")
setprop vendor.display.lcd_density 160
setprop qemu.hw.mainkeys 0
;;
"SBC")
setprop vendor.display.lcd_density 240
setprop qemu.hw.mainkeys 0
;;
*)
setprop vendor.display.lcd_density 560
;;
esac
;;
"msm8937" | "msm8940")
# Set vendor.opengles.version based on chip id.
# MSM8937 and MSM8940 variants supports OpenGLES 3.1
# 196608 is decimal for 0x30000 to report version 3.0
# 196609 is decimal for 0x30001 to report version 3.1
# 196610 is decimal for 0x30002 to report version 3.2
case "$soc_hwid" in
294|295|296|297|298|313|353|354|363|364)
setprop vendor.opengles.version 196610
if [ $soc_hwid = 354 ]
then
setprop vendor.media.target.version 1
log -t BOOT -p i "SDM429 early_boot prop set for: HwID '$soc_hwid'"
fi
;;
303|307|308|309|320)
# Vulkan is not supported for 8917 variants
setprop vendor.opengles.version 196608
setprop persist.graphics.vulkan.disable true
;;
*)
setprop vendor.opengles.version 196608
;;
esac
;;
"msm8909")
case "$soc_hwplatform" in
*)
setprop persist.graphics.vulkan.disable true
;;
esac
;;
"msm8998" | "apq8098_latv")
case "$soc_hwplatform" in
*)
setprop vendor.display.lcd_density 560
;;
esac
;;
"sdm845")
case "$soc_hwplatform" in
*)
if [ $fb_width -le 1600 ]; then
setprop vendor.display.lcd_density 560
else
setprop vendor.display.lcd_density 640
fi
;;
esac
;;
"msmnile")
case "$soc_hwplatform" in
*)
if [ $fb_width -le 1600 ]; then
setprop vendor.display.lcd_density 560
else
setprop vendor.display.lcd_density 640
fi
;;
esac
;;
"kona")
case "$soc_hwplatform" in
*)
setprop vendor.media.target_variant "_kona"
if [ $fb_width -le 1600 ]; then
setprop vendor.display.lcd_density 560
else
setprop vendor.display.lcd_density 640
fi
;;
esac
;;
"lito")
case "$soc_hwid" in
400|440)
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
if [ $sku_ver -eq 1 ]; then
setprop vendor.media.target.version 1
fi
;;
434|459)
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
setprop vendor.media.target.version 2
if [ $sku_ver -eq 1 ]; then
setprop vendor.media.target.version 3
fi
;;
esac
;;
"bengal")
case "$soc_hwid" in
441)
setprop vendor.fastrpc.disable.cdsprpcd.daemon 1
setprop vendor.gralloc.disable_ubwc 1
;;
esac
;;
"sdm710" | "msmpeafowl")
case "$soc_hwplatform" in
*)
if [ $fb_width -le 1600 ]; then
setprop vendor.display.lcd_density 560
else
setprop vendor.display.lcd_density 640
fi
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
if [ $sku_ver -eq 1 ]; then
setprop vendor.media.target.version 1
fi
;;
esac
;;
"msm8953")
cap_ver = 1
if [ -e "/sys/devices/platform/soc/1d00000.qcom,vidc/capability_version" ]; then
cap_ver=`cat /sys/devices/platform/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
else
cap_ver=`cat /sys/devices/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
fi
if [ $cap_ver -eq 1 ]; then
setprop vendor.media.target.version 1
fi
;;
#Set property to differentiate SDM660 & SDM455
#SOC ID for SDM455 is 385
"sdm660")
case "$soc_hwplatform" in
*)
if [ $fb_width -le 1600 ]; then
setprop vendor.display.lcd_density 560
else
setprop vendor.display.lcd_density 640
fi
if [ $soc_hwid -eq 385 ]; then
setprop vendor.media.target.version 1
fi
;;
esac
;;
"lahaina")
case "$soc_hwid" in
450)
setprop vendor.media.target_variant "_shima_v3"
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
if [ $sku_ver -eq 1 ]; then
setprop vendor.media.target_variant "_shima_v1"
elif [ $sku_ver -eq 2 ]; then
setprop vendor.media.target_variant "_shima_v2"
fi
;;
*)
setprop vendor.media.target_variant "_lahaina"
;;
esac
;;
"holi")
setprop vendor.media.target_variant "_holi"
;;
esac
baseband=`getprop ro.baseband`
#enable atfwd daemon all targets except sda, apq, qcs
case "$baseband" in
"apq" | "sda" | "qcs" )
setprop persist.vendor.radio.atfwd.start false;;
*)
setprop persist.vendor.radio.atfwd.start true;;
esac
#set default lcd density
#Since lcd density has read only
#property, it will not overwrite previous set
#property if any target is setting forcefully.
set_density_by_fb
# set Lilliput LCD density for ADP
product=`getprop ro.build.product`
case "$product" in
"msmnile_au")
setprop vendor.display.lcd_density 160
echo 902400000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq
echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/max_freq
echo 902400000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/min_freq
echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/max_freq
;;
*)
;;
esac
case "$product" in
"sm6150_au")
setprop vendor.display.lcd_density 160
;;
*)
;;
esac
case "$product" in
"sdmshrike_au")
setprop vendor.display.lcd_density 160
;;
*)
;;
esac
case "$product" in
"msmnile_gvmq")
setprop vendor.display.lcd_density 160
;;
*)
;;
esac
# Setup display nodes & permissions
# HDMI can be fb1 or fb2
# Loop through the sysfs nodes and determine
# the HDMI(dtv panel)
function set_perms() {
#Usage set_perms <filename> <ownership> <permission>
chown -h $2 $1
chmod $3 $1
}
# check for the type of driver FB or DRM
fb_driver=/sys/class/graphics/fb0
if [ -e "$fb_driver" ]
then
# check for mdp caps
file=/sys/class/graphics/fb0/mdp/caps
if [ -f "$file" ]
then
setprop vendor.gralloc.disable_ubwc 1
cat $file | while read line; do
case "$line" in
*"ubwc"*)
setprop vendor.gralloc.enable_fb_ubwc 1
setprop vendor.gralloc.disable_ubwc 0
esac
done
fi
else
set_perms /sys/devices/virtual/hdcp/msm_hdcp/min_level_change system.graphics 0660
fi
set_perms /sys/devices/virtual/hdcp/msm_hdcp/min_level_change system.graphics 0660
# allow system_graphics group to access pmic secure_mode node
set_perms /sys/class/lcd_bias/secure_mode system.graphics 0660
set_perms /sys/class/leds/wled/secure_mode system.graphics 0660

View File

@ -27,405 +27,6 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
target=`getprop ro.board.platform`
low_ram=`getprop ro.config.low_ram`
if [ -f /sys/devices/soc0/soc_id ]; then
platformid=`cat /sys/devices/soc0/soc_id`
else
platformid=`cat /sys/devices/system/soc/soc0/id`
fi
start_battery_monitor()
{
if ls /sys/bus/spmi/devices/qpnp-bms-*/fcc_data ; then
chown -h root.system /sys/module/pm8921_bms/parameters/*
chown -h root.system /sys/module/qpnp_bms/parameters/*
chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_data
chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_temp
chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_chgcyl
chmod 0660 /sys/module/qpnp_bms/parameters/*
chmod 0660 /sys/module/pm8921_bms/parameters/*
mkdir -p /data/bms
chown -h root.system /data/bms
chmod 0770 /data/bms
start battery_monitor
fi
}
start_charger_monitor()
{
if ls /sys/module/qpnp_charger/parameters/charger_monitor; then
chown -h root.system /sys/module/qpnp_charger/parameters/*
chown -h root.system /sys/class/power_supply/battery/input_current_max
chown -h root.system /sys/class/power_supply/battery/input_current_trim
chown -h root.system /sys/class/power_supply/battery/input_current_settled
chown -h root.system /sys/class/power_supply/battery/voltage_min
chmod 0664 /sys/class/power_supply/battery/input_current_max
chmod 0664 /sys/class/power_supply/battery/input_current_trim
chmod 0664 /sys/class/power_supply/battery/input_current_settled
chmod 0664 /sys/class/power_supply/battery/voltage_min
chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor
start charger_monitor
fi
}
start_vm_bms()
{
if [ -e /dev/vm_bms ]; then
chown -h root.system /sys/class/power_supply/bms/current_now
chown -h root.system /sys/class/power_supply/bms/voltage_ocv
chmod 0664 /sys/class/power_supply/bms/current_now
chmod 0664 /sys/class/power_supply/bms/voltage_ocv
start vm_bms
fi
}
start_msm_irqbalance_8939()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
case "$platformid" in
"239" | "293" | "294" | "295" | "304" | "338" | "313" | "353" | "354")
start vendor.msm_irqbalance;;
"349" | "350" )
start vendor.msm_irqbal_lb;;
esac
fi
}
start_msm_irqbalance_msmnile()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
start vendor.msm_irqbalance
fi
}
start_msm_irqbalance_kona()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
start vendor.msm_irqbalance
fi
}
start_msm_irqbalance_lito()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
start vendor.msm_irqbalance
fi
}
start_msm_irqbalance_atoll()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
start vendor.msm_irqbalance
fi
}
start_msm_irqbalance660()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
case "$platformid" in
"317" | "321" | "324" | "325" | "326" | "336" | "345" | "346" | "360" | "393")
start vendor.msm_irqbalance;;
"318" | "327" | "385")
start vendor.msm_irqbl_sdm630;;
esac
fi
}
start_msm_irqbalance()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
start vendor.msm_irqbalance
fi
}
baseband=`getprop ro.baseband`
echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr
case "$baseband" in
"svlte2a")
start bridgemgrd
;;
esac
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
if [ -f /sys/devices/soc0/hw_platform ]; then
value=`cat /sys/devices/soc0/hw_platform`
else
value=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$value" in
"Fluid")
start profiler_daemon;;
esac
;;
"msm8660" )
if [ -f /sys/devices/soc0/hw_platform ]; then
platformvalue=`cat /sys/devices/soc0/hw_platform`
else
platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$platformvalue" in
"Fluid")
start profiler_daemon;;
esac
;;
"msm8960")
case "$baseband" in
"msm")
start_battery_monitor;;
esac
if [ -f /sys/devices/soc0/hw_platform ]; then
platformvalue=`cat /sys/devices/soc0/hw_platform`
else
platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$platformvalue" in
"Fluid")
start profiler_daemon;;
"Liquid")
start profiler_daemon;;
esac
;;
"msm8974")
platformvalue=`cat /sys/devices/soc0/hw_platform`
case "$platformvalue" in
"Fluid")
start profiler_daemon;;
"Liquid")
start profiler_daemon;;
esac
case "$baseband" in
"msm")
start_battery_monitor
;;
esac
start_charger_monitor
;;
"sdm660")
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
else
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$soc_id" in
"317" | "324" | "325" | "326" | "318" | "327" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
;;
"MTP")
setprop qemu.hw.mainkeys 0
;;
"RCM")
setprop qemu.hw.mainkeys 0
;;
"QRD")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
start_msm_irqbalance660
;;
"apq8084")
platformvalue=`cat /sys/devices/soc0/hw_platform`
case "$platformvalue" in
"Fluid")
start profiler_daemon;;
"Liquid")
start profiler_daemon;;
esac
;;
"msm8226")
start_charger_monitor
;;
"msm8610")
start_charger_monitor
;;
"msm8916")
start_vm_bms
start_msm_irqbalance_8939
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/platform_subtype_id ]; then
platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
fi
case "$soc_id" in
"239")
case "$hw_platform" in
"Surf")
case "$platform_subtype_id" in
"1")
setprop qemu.hw.mainkeys 0
;;
esac
;;
"MTP")
case "$platform_subtype_id" in
"3")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
;;
esac
;;
"msm8994" | "msm8992" | "msm8998" | "apq8098_latv" | "sdm845" | "sdm710" | "qcs605" | "sm6150" | "trinket" | "bengal")
start_msm_irqbalance
;;
"msm8996")
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
fi
case "$hw_platform" in
"MTP" | "CDP")
#Loop through the sysfs nodes and determine the correct sysfs to change the permission and ownership.
for count in 0 1 2 3 4 5 6 7 8 9 10
do
dir="/sys/devices/soc/75ba000.i2c/i2c-12/12-0020/input/input"$count
if [ -d "$dir" ]; then
chmod 0660 $dir/secure_touch_enable
chmod 0440 $dir/secure_touch
chown system.drmrpc $dir/secure_touch_enable
chown system.drmrpc $dir/secure_touch
break
fi
done
;;
esac
;;
"msm8909")
start_vm_bms
;;
"msmnile")
start_msm_irqbalance_msmnile
;;
"kona")
start_msm_irqbalance_kona
;;
"lito")
start_msm_irqbalance_lito
;;
"atoll")
start_msm_irqbalance_atoll
;;
"msm8937")
start_msm_irqbalance_8939
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
else
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
if [ "$low_ram" != "true" ]; then
case "$soc_id" in
"294" | "295" | "303" | "307" | "308" | "309" | "313" | "320" | "353" | "354" | "363" | "364")
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
;;
"MTP")
setprop qemu.hw.mainkeys 0
;;
"RCM")
setprop qemu.hw.mainkeys 0
;;
"QRD")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
fi
;;
"msm8953")
start_msm_irqbalance_8939
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
else
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$soc_id" in
"293" | "304" | "338" | "351" | "349" | "350" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
;;
"MTP")
setprop qemu.hw.mainkeys 0
;;
"RCM")
setprop qemu.hw.mainkeys 0
;;
"QRD")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
;;
"sdm710")
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
else
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$soc_id" in
"336" | "337" | "347" | "360" | "393" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
;;
"MTP")
setprop qemu.hw.mainkeys 0
;;
"RCM")
setprop qemu.hw.mainkeys 0
;;
"QRD")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
;;
esac
#
# Make modem config folder and copy firmware config to that folder for RIL
#
@ -449,17 +50,3 @@ if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "
fi
chmod g-w /data/vendor/modem_config
setprop ro.vendor.ril.mbn_copy_completed 1
#check build variant for printk logging
#current default minimum boot-time-default
buildvariant=`getprop ro.build.type`
case "$buildvariant" in
"userdebug" | "eng")
#set default loglevel to KERN_INFO
echo "6 6 1 7" > /proc/sys/kernel/printk
;;
*)
#set default loglevel to KERN_WARNING
echo "4 4 1 4" > /proc/sys/kernel/printk
;;
esac

View File

@ -0,0 +1,140 @@
# Copyright (c) 2012-2013, 2016-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.
#
on enable-low-power
# Apply settings for atoll
# configure governor settings for little cluster
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor schedutil
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us 500
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us 20000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 576000
# configure governor settings for big cluster
write /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor schedutil
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us 500
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us 20000
write /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq 652800
# Enable bus-dcvs
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/governor bw_hwmon
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/mbps_zones "2288 4577 7110 9155 12298 14236"
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/sample_ms 4
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/io_percent 68
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/hist_memory 20
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/hyst_length 0
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/down_thres 80
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/guard_band_mbps 0
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/up_scale 250
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/idle_mbps 1600
write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/polling_interval 50
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/governor bw_hwmon
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/mbps_zones "1144 1720 2086 2929 3879 5931 6881 8137"
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/sample_ms 4
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/io_percent 68
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hist_memory 20
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hyst_length 0
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/down_thres 80
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/guard_band_mbps 0
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/up_scale 250
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/idle_mbps 1600
write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/polling_interval 40
write /sys/devices/virtual/npu/msm_npu/pwr 1
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/governor bw_hwmon
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/bw_hwmon/mbps_zones "1144 1720 2086 2929 3879 5931 6881 8137"
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/bw_hwmon/sample_ms 4
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/bw_hwmon/io_percent 80
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/bw_hwmon/hist_memory 20
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/bw_hwmon/hyst_length 10
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/bw_hwmon/down_thres 30
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/bw_hwmon/guard_band_mbps 0
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/bw_hwmon/up_scale 250
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/bw_hwmon/idle_mbps 0
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npu-npu-ddr-bw/polling_interval 40
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/governor bw_hwmon
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/mbps_zones "1144 1720 2086 2929 3879 5931 6881 8137"
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/sample_ms 4
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/io_percent 80
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/hist_memory 20
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/hyst_length 10
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/down_thres 30
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/guard_band_mbps 0
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/up_scale 250
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/idle_mbps 0
write /sys/devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/polling_interval 40
write /sys/devices/virtual/npu/msm_npu/pwr 0
# Enable mem_latency governor for L3, LLCC, and DDR scaling
write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-llcc-lat/devfreq/soc:qcom,cpu0-cpu-llcc-lat/governor mem_latency
write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-llcc-lat/devfreq/soc:qcom,cpu0-cpu-llcc-lat/polling_interval 10
write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-llcc-lat/devfreq/soc:qcom,cpu0-cpu-llcc-lat/mem_latency/ratio_ceil 400
write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-l3-lat/devfreq/soc:qcom,cpu0-cpu-l3-lat/governor mem_latency
write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-l3-lat/devfreq/soc:qcom,cpu0-cpu-l3-lat/polling_interval 10
write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-l3-lat/devfreq/soc:qcom,cpu0-cpu-l3-lat/mem_latency/ratio_ceil 400
write /sys/devices/platform/soc/soc:qcom,cpu0-llcc-ddr-lat/devfreq/soc:qcom,cpu0-llcc-ddr-lat/governor mem_latency
write /sys/devices/platform/soc/soc:qcom,cpu0-llcc-ddr-lat/devfreq/soc:qcom,cpu0-llcc-ddr-lat/polling_interval 10
write /sys/devices/platform/soc/soc:qcom,cpu0-llcc-ddr-lat/devfreq/soc:qcom,cpu0-llcc-ddr-lat/mem_latency/ratio_ceil 400
write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-llcc-lat/devfreq/soc:qcom,cpu6-cpu-llcc-lat/governor mem_latency
write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-llcc-lat/devfreq/soc:qcom,cpu6-cpu-llcc-lat/polling_interval 10
write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-llcc-lat/devfreq/soc:qcom,cpu6-cpu-llcc-lat/mem_latency/ratio_ceil 400
write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-l3-lat/devfreq/soc:qcom,cpu6-cpu-l3-lat/governor mem_latency
write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-l3-lat/devfreq/soc:qcom,cpu6-cpu-l3-lat/polling_interval 10
# Gold L3 ratio ceil is 4000
write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-l3-lat/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil 4000
write /sys/devices/platform/soc/soc:qcom,cpu6-llcc-ddr-lat/devfreq/soc:qcom,cpu6-llcc-ddr-lat/governor mem_latency
write /sys/devices/platform/soc/soc:qcom,cpu6-llcc-ddr-lat/devfreq/soc:qcom,cpu6-llcc-ddr-lat/polling_interval 10
write /sys/devices/platform/soc/soc:qcom,cpu6-llcc-ddr-lat/devfreq/soc:qcom,cpu6-llcc-ddr-lat/mem_latency/ratio_ceil 400
# Enable cdspl3 governor for L3 cdsp nodes
write /sys/devices/platform/soc/soc:qcom,cdsp-cdsp-l3-lat/devfreq/soc:qcom,cdsp-cdsp-l3-lat/governor cdspl3
# Enable compute governor for gold latfloor
write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-ddr-latfloor/devfreq/soc:qcom,cpu6-cpu-ddr-latfloor/governor compute
write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-ddr-latfloor/devfreq/soc:qcom,cpu6-cpu-ddr-latfloor/polling_interval 10
# Turn on sleep modes
write /sys/module/lpm_levels/parameters/sleep_disabled 0
# Enable idle state listener
write /sys/class/drm/card0/device/idle_encoder_mask 1
write /sys/class/drm/card0/device/idle_timeout_ms 100
# Enable PowerHAL hint processing
setprop vendor.powerhal.init 1
on property:sys.boot_completed=1
trigger enable-low-power
on property:init.svc.recovery=running
trigger enable-low-power

View File

@ -25,11 +25,10 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
import /vendor/etc/init/hw/init.qti.ufs.rc
import /vendor/etc/init/hw/init.qcom.usb.rc
import /vendor/etc/init/hw/init.qcom.power.rc
import /vendor/etc/init/hw/init.device.rc
import /vendor/etc/init/hw/init.target.rc
import /vendor/etc/init/hw/init.qcom.factory.rc
import /vendor/etc/init/hw/init.qcom.test.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
@ -88,8 +87,6 @@ on early-boot
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
chmod 0775 /mnt/vendor/persist/data/pfm/licenses
@ -417,6 +414,11 @@ 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
@ -503,12 +505,6 @@ 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
@ -521,19 +517,7 @@ 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
@ -734,34 +718,6 @@ 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
class late_start
user root
group root system wakelock graphics
disabled
oneshot
service wifi-sdio-on /vendor/bin/init.qcom.sdio.sh
class late_start
group wifi inet
disabled
oneshot
service wifi-crda /vendor/bin/init.crda.sh
class late_start
user root
disabled
oneshot
on property:sys.boot_completed=1
start qcom-post-boot
on property:ro.vendor.ril.mbn_copy_completed=1
write /data/vendor/radio/copy_complete 1
@ -901,19 +857,6 @@ service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /system/vendor/etc/m
class core
user root
group root
disabled
service vendor.msm_irqbal_lb /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_little_big.conf
class core
user root
group root
disabled
service vendor.msm_irqbl_sdm630 /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_sdm630.conf
class core
user root
group root
disabled
# service for USERDEBUG
service vendor.LKCore-dbg /vendor/bin/LKCore
@ -944,7 +887,6 @@ service esepmdaemon /system/vendor/bin/esepmdaemon
on charger
setprop persist.sys.usb.config mass_storage
start qcom-post-boot
#add poweroffhandler
service poweroffhandler /system/vendor/bin/poweroffhandler

View File

@ -27,26 +27,13 @@
#
#
import init.mishow.ctl.rc
import /vendor/etc/init/init.batteryd.rc
import /vendor/etc/init/init.batterysecret.rc
on early-init
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules audio_q6_pdr audio_q6_notifier audio_snd_event audio_apr audio_adsp_loader audio_q6 audio_native audio_usf audio_pinctrl_lpi audio_swr audio_platform audio_hdmi audio_stub audio_wcd_core audio_wsa881x audio_bolero_cdc audio_wsa_macro audio_va_macro audio_rx_macro audio_tx_macro audio_wcd937x audio_wcd937x_slave audio_wcd938x audio_wcd938x_slave audio_tas2562 audio_machine_atoll
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
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
@ -70,8 +57,6 @@ on fs
chown system system /sys/class/thermal/thermal_message/temp_state
on post-fs
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
write /dev/ipa 1
on late-fs
@ -79,11 +64,6 @@ on late-fs
exec_start wait_for_keymaster
mount_all --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
@ -95,14 +75,9 @@ on post-fs-data
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 /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 0770 system wifi
# For cpusets initialize for Silver Only first and then Silver + Gold
# Silver Only configuration cannot work with 0-7
on boot
@ -112,7 +87,6 @@ on boot
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
write /dev/cpuset/audio-app/cpus 1-2
chown system system /sys/kernel/hbtp/display_pwr
start rmt_storage
start rfs_access
@ -128,7 +102,6 @@ on boot
write /dev/cpuset/system-background/cpus 0-7
# Add a cpuset for the camera daemon
# We want all cores for camera
mkdir /dev/cpuset/camera-daemon
write /dev/cpuset/camera-daemon/cpus 0-3
write /dev/cpuset/camera-daemon/mems 0
@ -136,14 +109,6 @@ on boot
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
@ -157,14 +122,6 @@ on boot
chmod 0666 /dev/qseecom
chmod 0644 /dev/goodix_fp
chown system system /dev/goodix_fp
#Load WLAN driver
insmod /vendor/lib/modules/qca_cld3_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
setprop vendor.usb.rndis.func.name "gsi"
@ -174,19 +131,6 @@ on boot
setprop vendor.usb.qdss.inst.name "qdss"
setprop sys.usb.configfs 1
#start camera server as daemon
#service qcamerasvr /system/bin/mm-qcamera-daemon
# class late_start
# user camera
service audioshell_service /vendor/bin/audioshell_service
oneshot
disabled
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
@ -217,470 +161,12 @@ on charger
chown root system /mnt/vendor/persist
chmod 0771 /mnt/vendor/persist
mkdir /mnt/vendor/persist/subsys 0770 root system
start vendor.power_off_alarm
setprop sys.usb.controller a600000.dwc3
setprop sys.usb.configfs 1
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
disabled
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 mdm_launcher /system/bin/sh /init.mdm.sh
# class main
# oneshot
#
#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
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
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
class main
user system
group system
disabled
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
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
disabled
oneshot
on property:odm.pa-cal=0
stop smart-pa-cal
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
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
disabled
on property:odm.start_wdsdaemon=1
start wdsdaemon
on property:odm.start_wdsdaemon=0
stop wdsdaemon
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
user root
group root
on property:init.svc.surfaceflinger=stopped
stop displayfeature
on property:init.svc.surfaceflinger=running
start displayfeature
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
class late_start
user root
group root
disabled
oneshot
service btclose /vendor/bin/sh /vendor/bin/bt_close.sh
user root
group root
oneshot
disabled
on property:odm.closebt=1
start btclose
#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