diff --git a/common.mk b/common.mk index 8e68c67..e6f4dcb 100644 --- a/common.mk +++ b/common.mk @@ -47,30 +47,14 @@ PRODUCT_PACKAGES += \ # Init scripts PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/rootdir/etc/init.msm.usb.configfs.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.msm.usb.configfs.rc \ $(LOCAL_PATH)/rootdir/etc/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.rc \ - $(LOCAL_PATH)/rootdir/etc/init.qcom.factory.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.factory.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.target.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.target.rc PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/rootdir/bin/init.class_main.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.class_main.sh \ - $(LOCAL_PATH)/rootdir/bin/init.crda.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.crda.sh \ - $(LOCAL_PATH)/rootdir/bin/init.mdm.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.mdm.sh \ - $(LOCAL_PATH)/rootdir/bin/init.mi.usb.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.mi.usb.sh \ - $(LOCAL_PATH)/rootdir/bin/init.qcom.class_core.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.class_core.sh \ - $(LOCAL_PATH)/rootdir/bin/init.qcom.coex.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.coex.sh \ - $(LOCAL_PATH)/rootdir/bin/init.qcom.crashdata.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.crashdata.sh \ - $(LOCAL_PATH)/rootdir/bin/init.qcom.early_boot.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.early_boot.sh \ - $(LOCAL_PATH)/rootdir/bin/init.qcom.efs.sync.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.efs.sync.sh \ $(LOCAL_PATH)/rootdir/bin/init.qcom.post_boot.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.post_boot.sh \ - $(LOCAL_PATH)/rootdir/bin/init.qcom.sdio.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.sdio.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.qcom.usb.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.usb.sh \ - $(LOCAL_PATH)/rootdir/bin/init.qti.chg_policy.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.chg_policy.sh \ - $(LOCAL_PATH)/rootdir/bin/init.qti.fm.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.fm.sh \ - $(LOCAL_PATH)/rootdir/bin/init.qti.ims.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.ims.sh + $(LOCAL_PATH)/rootdir/bin/init.qti.chg_policy.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.chg_policy.sh # Media PRODUCT_COPY_FILES += \ diff --git a/rootdir/bin/init.class_main.sh b/rootdir/bin/init.class_main.sh deleted file mode 100644 index 35e72ef..0000000 --- a/rootdir/bin/init.class_main.sh +++ /dev/null @@ -1,153 +0,0 @@ -#! /vendor/bin/sh - -# Copyright (c) 2013-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. -# - -# -# start ril-daemon only for targets on which radio is present -# -baseband=`getprop ro.baseband` -sgltecsfb=`getprop persist.vendor.radio.sglte_csfb` -datamode=`getprop persist.vendor.data.mode` -qcrild_status=true - -case "$baseband" in - "apq" | "sda" | "qcs" ) - setprop ro.vendor.radio.noril yes - stop ril-daemon - stop vendor.ril-daemon - stop vendor.qcrild -esac - -case "$baseband" in - "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6") - - # For older modem packages launch ril-daemon. - if [ -f /vendor/firmware_mnt/verinfo/ver_info.txt ]; then - modem=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | - sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | - sed 's/.*MPSS.\(.*\)/\1/g' | cut -d \. -f 1` - if [ "$modem" = "AT" ]; then - version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | - sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | - sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1` - if [ ! -z $version ]; then - if [ "$version" \< "3.1" ]; then - qcrild_status=false - fi - fi - elif [ "$modem" = "TA" ]; then - version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | - sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | - sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1` - if [ ! -z $version ]; then - if [ "$version" \< "3.0" ]; then - qcrild_status=false - fi - fi - elif [ "$modem" = "JO" ]; then - version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | - sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | - sed 's/.*JO.\(.*\)/\1/g' | cut -d \- -f 1` - if [ ! -z $version ]; then - if [ "$version" \< "3.2" ]; then - qcrild_status=false - fi - fi - elif [ "$modem" = "TH" ]; then - qcrild_status=false - fi - fi - - if [ "$qcrild_status" = "true" ]; then - # Make sure both rild, qcrild are not running at same time. - # This is possible with vanilla aosp system image. - stop ril-daemon - stop vendor.ril-daemon - - start vendor.qcrild - else - start ril-daemon - start vendor.ril-daemon - fi - - case "$baseband" in - "svlte2a" | "csfb") - start qmiproxy - ;; - "sglte" | "sglte2" ) - if [ "x$sgltecsfb" != "xtrue" ]; then - start qmiproxy - else - setprop persist.vendor.radio.voice.modem.index 0 - fi - ;; - esac - - multisim=`getprop persist.radio.multisim.config` - - if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then - if [ "$qcrild_status" = "true" ]; then - start vendor.qcrild2 - else - start vendor.ril-daemon2 - fi - elif [ "$multisim" = "tsts" ]; then - if [ "$qcrild_status" = "true" ]; then - start vendor.qcrild2 - start vendor.qcrild3 - else - start vendor.ril-daemon2 - start vendor.ril-daemon3 - fi - fi - - case "$datamode" in - "tethered") - start vendor.dataqti - start vendor.dataadpl - ;; - "concurrent") - start vendor.dataqti - start vendor.dataadpl - ;; - *) - ;; - esac -esac - -# -# Allow persistent faking of bms -# User needs to set fake bms charge in persist.vendor.bms.fake_batt_capacity -# -fake_batt_capacity=`getprop persist.vendor.bms.fake_batt_capacity` -case "$fake_batt_capacity" in - "") ;; #Do nothing here - * ) - echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity - ;; -esac diff --git a/rootdir/bin/init.crda.sh b/rootdir/bin/init.crda.sh deleted file mode 100644 index 4264789..0000000 --- a/rootdir/bin/init.crda.sh +++ /dev/null @@ -1,35 +0,0 @@ -#! /vendor/bin/sh - -# Copyright (c) 2012, 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. -# - -country=`getprop wlan.crda.country` -# crda takes input in COUNTRY environment variable -if [ $country != "" ] -then -COUNTRY="$country" /system/bin/crda -fi diff --git a/rootdir/bin/init.mdm.sh b/rootdir/bin/init.mdm.sh deleted file mode 100644 index 3ed7ed5..0000000 --- a/rootdir/bin/init.mdm.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /vendor/bin/sh - -# Copyright (c) 2013, 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 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. -# - -baseband=`getprop ro.baseband` -if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then - start vendor.mdm_helper -fi - diff --git a/rootdir/bin/init.mi.usb.sh b/rootdir/bin/init.mi.usb.sh deleted file mode 100644 index 4d5a0b5..0000000 --- a/rootdir/bin/init.mi.usb.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/vendor/bin/sh -usb_config=`getprop vendor.usb.mimode` - -if [ "$(getprop persist.vendor.usb.config)" != "$usb_config" -a \ - "$(getprop ro.boot.factorybuild)" != "1" ];then - setprop persist.vendor.usb.config "$usb_config" -fi diff --git a/rootdir/bin/init.qcom.class_core.sh b/rootdir/bin/init.qcom.class_core.sh deleted file mode 100644 index 8f8265d..0000000 --- a/rootdir/bin/init.qcom.class_core.sh +++ /dev/null @@ -1,216 +0,0 @@ -#!/vendor/bin/sh - -# Copyright (c) 2012-2013, 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. -# - -# Set platform variables -target=`getprop ro.board.platform` -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 - - -# Dynamic Memory Managment (DMM) provides a sys file system to the userspace -# that can be used to plug in/out memory that has been configured as unstable. -# This unstable memory can be in Active or In-Active State. -# Each of which the userspace can request by writing to a sys file. -# -# ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This -# property is set in the Android system properties file. -# -# If ro.dev.dmm.dpd.start_address is set here then the target has a memory -# configuration that supports DynamicMemoryManagement. -init_DMM() -{ - block=-1 - - case "$target" in - "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm8960") - ;; - *) - return - ;; - esac - - mem="/sys/devices/system/memory" - op=`cat $mem/movable_start_bytes` - case "$op" in - "0") - log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op - ;; - - "$mem/movable_start_bytes: No such file or directory ") - log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op - ;; - - *) - log -p i -t DMM DMM available. movable_start_bytes at $op - movable_start_bytes=0x`cat $mem/movable_start_bytes` - block_size_bytes=0x`cat $mem/block_size_bytes` - block=$((#${movable_start_bytes}/${block_size_bytes})) - - chown -h system.system $mem/memory$block/state - chown -h system.system $mem/probe - chown -h system.system $mem/active - chown -h system.system $mem/remove - - case "$target" in - "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") - echo $movable_start_bytes > $mem/probe - case "$?" in - "0") - log -p i -t DMM $movable_start_bytes to physical hotplug succeeded. - ;; - *) - log -p e -t DMM $movable_start_bytes to physical hotplug failed. - return - ;; - esac - - echo online > $mem/memory$block/state - case "$?" in - "0") - log -p i -t DMM \'echo online\' to logical hotplug succeeded. - ;; - *) - log -p e -t DMM \'echo online\' to logical hotplug failed. - return - ;; - esac - ;; - esac - - setprop ro.dev.dmm.dpd.start_address $movable_start_bytes - setprop ro.dev.dmm.dpd.block $block - ;; - esac - - case "$target" in - "msm8960") - return - ;; - esac - - # For 7X30 targets: - # ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory - # configuration. This is also used to indicate that the target is capable of - # setting EBI-1 to Deep Power Down or Self Refresh. - op=`cat $mem/low_power_memory_start_bytes` - case "$op" in - "0") - log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op - ;; - "$mem/low_power_memory_start_bytes No such file or directory ") - log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op - ;; - *) - log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op - ;; - esac -} - -# -# For controlling console and shell on console on 8960 - perist.serial.enable 8960 -# On other target use default ro.debuggable property. -# -serial=`getprop persist.serial.enable` -dserial=`getprop ro.debuggable` -case "$target" in - "msm8960") - case "$serial" in - "0") - echo 0 > /sys/devices/platform/msm_serial_hsl.0/console - ;; - "1") - echo 1 > /sys/devices/platform/msm_serial_hsl.0/console - start console - ;; - *) - case "$dserial" in - "1") - start console - ;; - esac - ;; - esac - ;; - - "msm8610" | "msm8974" | "msm8226") - case "$serial" in - "0") - echo 0 > /sys/devices/f991f000.serial/console - ;; - "1") - echo 1 > /sys/devices/f991f000.serial/console - start console - ;; - *) - case "$dserial" in - "1") - start console - ;; - esac - ;; - esac - ;; - *) - case "$dserial" in - "1") - start console - ;; - esac - ;; -esac - -case "$target" in - "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") - insmod /system/lib/modules/ss_mfcinit.ko - insmod /system/lib/modules/ss_vencoder.ko - insmod /system/lib/modules/ss_vdecoder.ko - chmod -h 0666 /dev/ss_mfc_reg - chmod -h 0666 /dev/ss_vdec - chmod -h 0666 /dev/ss_venc - - init_DMM - ;; - - "msm8960") - init_DMM - ;; -esac diff --git a/rootdir/bin/init.qcom.coex.sh b/rootdir/bin/init.qcom.coex.sh deleted file mode 100644 index a9a22f1..0000000 --- a/rootdir/bin/init.qcom.coex.sh +++ /dev/null @@ -1,115 +0,0 @@ -#! /vendor/bin/sh - -# Copyright (c) 2009-2010, 2012, 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. - -LOG_TAG="qcom-bt-wlan-coex" -LOG_NAME="${0}:" - -coex_pid="" -ath_wlan_supported=`getprop wlan.driver.ath` - -loge () -{ - /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@" -} - -logi () -{ - /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@" -} - -failed () -{ - loge "$1: exit code $2" - exit $2 -} - -start_coex () -{ - case "$ath_wlan_supported" in - "2") - echo "ATH WLAN Chip ID AR6004 is enabled" - /system/bin/abtfilt -d -z -n -m -a -w wlan0 & - ;; - "1") - echo "ATH WLAN Chip ID is enabled" - # Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter. - /system/bin/abtfilt -d -z -n -v -q -s -w wlan0 & - ;; - "0") - echo "WCN WLAN Chip ID is enabled" - # Must have -o turned on to avoid daemon (otherwise we cannot get pid) - /system/bin/btwlancoex -o $opt_flags & - ;; - *) - echo "NO WLAN Chip ID is enabled, so enabling ATH as default" - # Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter. - /system/bin/abtfilt -d -z -n -v -q -s -w wlan0 & - ;; - esac - coex_pid=$! - logi "start_coex: pid = $coex_pid" -} - -kill_coex () -{ - logi "kill_coex: pid = $coex_pid" - kill -TERM $coex_pid - # this shell doesn't exit now -- wait returns for normal exit -} - -# mimic coex options parsing -- maybe a waste of effort -USAGE="${0} [-o] [-c] [-r] [-i] [-h]" - -while getopts "ocrih" f -do - case $f in - o | c | r | i | h) opt_flags="$opt_flags -$f" ;; - \?) echo $USAGE; exit 1;; - esac -done - -# init does SIGTERM on ctl.stop for service -trap "kill_coex" TERM INT - -#Selectively start coex module -target=`getprop ro.board.platform` - -if [ "$target" == "msm8960" ] && [ "$ath_wlan_supported" != "2" ]; then - logi "btwlancoex/abtfilt is not needed" -else - # Build settings may not produce the coex executable - if ls /system/bin/btwlancoex || ls /system/bin/abtfilt - then - start_coex - wait $coex_pid - logi "Coex stopped" - else - logi "btwlancoex/abtfilt not available" - fi -fi -exit 0 diff --git a/rootdir/bin/init.qcom.crashdata.sh b/rootdir/bin/init.qcom.crashdata.sh deleted file mode 100644 index 59cf68d..0000000 --- a/rootdir/bin/init.qcom.crashdata.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/vendor/bin/sh -# Copyright (c) 2017, 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. -# - -abnormalcnt="persist.vendor.crash.cnt" - -abnormal_cnt=`getprop $abnormalcnt` -crash_detect=`getprop persist.vendor.crash.detect` - -if [ "$abnormal_cnt" = "" ] -then -setprop $abnormalcnt 0 -fi - -if [ "$crash_detect" = "true" ] -then -abnormal_cnt=`expr $abnormal_cnt + 1` -setprop $abnormalcnt $abnormal_cnt -elif [ "$crash_detect" = "false" ];then -setprop persist.vendor.crash.detect true -else -setprop persist.vendor.crash.detect true -fi diff --git a/rootdir/bin/init.qcom.early_boot.sh b/rootdir/bin/init.qcom.early_boot.sh deleted file mode 100644 index 59847d4..0000000 --- a/rootdir/bin/init.qcom.early_boot.sh +++ /dev/null @@ -1,476 +0,0 @@ -#! /vendor/bin/sh - -# Copyright (c) 2012-2013,2016,2018,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. -# - -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'" - -#For drm based display driver -vbfile=/sys/module/drm/parameters/vblankoffdelay -if [ -w $vbfile ]; then - echo -1 > $vbfile -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 - *) - if [ $fb_width -le 1600 ]; then - setprop vendor.display.lcd_density 560 - else - setprop vendor.display.lcd_density 640 - fi - ;; - esac - ;; - "lito") - case "$soc_hwplatform" in - *) - 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 - ;; - "bengal") - case "$soc_hwplatform" in - *) - 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.version 1 - fi - ;; - esac - ;; - "sdm710" | "msmpeafowl") - case "$soc_hwplatform" in - *) - 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_hwid" in - 385) - setprop vendor.media.target.version 1 - esac - ;; -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 - echo 940800000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq - echo 940800000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/min_freq - ;; - *) - ;; -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 - 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 - -# 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 - -boot_reason=`cat /proc/sys/kernel/boot_reason` -reboot_reason=`getprop ro.boot.alarmboot` -if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then - setprop ro.vendor.alarm_boot true -else - setprop ro.vendor.alarm_boot false -fi - -# copy GPU frequencies to vendor property -if [ -f /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies ]; then - gpu_freq=`cat /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies` 2> /dev/null - setprop vendor.gpu.available_frequencies "$gpu_freq" -fi diff --git a/rootdir/bin/init.qcom.efs.sync.sh b/rootdir/bin/init.qcom.efs.sync.sh deleted file mode 100644 index 5e7bfa1..0000000 --- a/rootdir/bin/init.qcom.efs.sync.sh +++ /dev/null @@ -1,35 +0,0 @@ -#! /vendor/bin/sh - -# Copyright (c) 2012, 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. -# -# - -PATH=/system/bin:$PATH -export PATH -cat /sys/devices/platform/rs300000a7.65536/force_sync -cat /sys/devices/platform/rs300100a7.65536/force_sync diff --git a/rootdir/bin/init.qcom.post_boot.sh b/rootdir/bin/init.qcom.post_boot.sh index 6465a98..d752e4a 100644 --- a/rootdir/bin/init.qcom.post_boot.sh +++ b/rootdir/bin/init.qcom.post_boot.sh @@ -27,347 +27,12 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -function 8953_sched_dcvs_eas() -{ - #governor settings - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpufreq/schedutil/rate_limit_us - #set the hispeed_freq - echo 1401600 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_freq - #default value for hispeed_load is 90, for 8953 and sdm450 it should be 85 - echo 85 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_load -} - -function 8917_sched_dcvs_eas() -{ - #governor settings - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpufreq/schedutil/rate_limit_us - #set the hispeed_freq - echo 1094400 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_freq - #default value for hispeed_load is 90, for 8917 it should be 85 - echo 85 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_load -} - -function 8937_sched_dcvs_eas() -{ - # enable governor for perf cluster - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us - #set the hispeed_freq - echo 1094400 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq - #default value for hispeed_load is 90, for 8937 it should be 85 - echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load - ## enable governor for power cluster - echo 1 > /sys/devices/system/cpu/cpu4/online - echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us - #set the hispeed_freq - echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq - #default value for hispeed_load is 90, for 8937 it should be 85 - echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load - -} - -function configure_automotive_sku_parameters() { - - echo 1036800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 1171200 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq - echo 1785600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - -#read feature id from nvram -reg_val=`cat /sys/devices/platform/soc/780130.qfprom/qfprom0/nvmem | od -An -t d4` -feature_id=$(((reg_val >> 20) & 0xFF)) -log -t BOOT -p i "feature id '$feature_id'" -if [ $feature_id == 0 ]; then - echo " SKU Configured : SA8155P" - echo 2131200 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - echo 2419200 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq - echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel -elif [ $feature_id == 1 ]; then - echo "SKU Configured : SA8150P" - echo 1920000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - echo 2227200 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq - echo 3 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel -else - echo "unknown feature_id value" $feature_id -fi -} - -function configure_sku_parameters() { - -#read feature id from nvram -reg_val=`cat /sys/devices/platform/soc/780130.qfprom/qfprom0/nvmem | od -An -t d4` -feature_id=$(((reg_val >> 20) & 0xFF)) -log -t BOOT -p i "feature id '$feature_id'" -if [ $feature_id == 6 ]; then - echo " SKU Configured : SA6145" - echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq - echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq - echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq - echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq - echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq - echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq - echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq - echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq - echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq - echo 1017600000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq - echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq - echo 1017600000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq - echo 3 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel - echo {class:ddr, res:fixed, val: 1016} > /sys/kernel/debug/aop_send_message - setprop vendor.sku_identified 1 -elif [ $feature_id == 5 ]; then - echo "SKU Configured : SA6150" - echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq - echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq - echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq - echo 998400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - echo 998400 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq - echo 998400 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq - echo 998400 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq - echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - echo 998400 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq - echo 1708800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq - echo 1708800 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq - echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq - echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq - echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq - echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq - echo 2 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel - echo {class:ddr, res:fixed, val: 1333} > /sys/kernel/debug/aop_send_message - setprop vendor.sku_identified 1 -elif [ $feature_id == 4 || $feature_id == 3 ]; then - echo "SKU Configured : SA6155" - echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq - echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq - echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq - echo 1593600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq - echo 1900800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq - echo 1900800 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq - echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq - echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq - echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq - echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq - echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel - echo {class:ddr, res:fixed, val: 1555} > /sys/kernel/debug/aop_send_message - setprop vendor.sku_identified 1 -else - echo "unknown feature_id value" $feature_id - echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq - echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq - echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq - echo 1593600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - echo 1593600 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq - echo 1900800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq - echo 1900800 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq - echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq - echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq - echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq - echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq - echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel - echo {class:ddr, res:fixed, val: 1555} > /sys/kernel/debug/aop_send_message - setprop vendor.sku_identified 1 -fi -} - -function 8953_sched_dcvs_hmp() -{ - #scheduler settings - echo 3 > /proc/sys/kernel/sched_window_stats_policy - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - #task packing settings - echo 0 > /sys/devices/system/cpu/cpu0/sched_static_cpu_pwr_cost - echo 0 > /sys/devices/system/cpu/cpu1/sched_static_cpu_pwr_cost - echo 0 > /sys/devices/system/cpu/cpu2/sched_static_cpu_pwr_cost - echo 0 > /sys/devices/system/cpu/cpu3/sched_static_cpu_pwr_cost - echo 0 > /sys/devices/system/cpu/cpu4/sched_static_cpu_pwr_cost - echo 0 > /sys/devices/system/cpu/cpu5/sched_static_cpu_pwr_cost - echo 0 > /sys/devices/system/cpu/cpu6/sched_static_cpu_pwr_cost - echo 0 > /sys/devices/system/cpu/cpu7/sched_static_cpu_pwr_cost - # spill load is set to 100% by default in the kernel - echo 3 > /proc/sys/kernel/sched_spill_nr_run - # Apply inter-cluster load balancer restrictions - echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill - # set sync wakee policy tunable - echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker - - #governor settings - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "19000 1401600:39000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay - echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate - echo 1401600 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - echo "85 1401600:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads - echo 39000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor - echo 19 > /proc/sys/kernel/sched_upmigrate_min_nice - # Enable sched guided freq control - echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif - echo 200000 > /proc/sys/kernel/sched_freq_inc_notify - echo 200000 > /proc/sys/kernel/sched_freq_dec_notify - -} - -function 8917_sched_dcvs_hmp() -{ - # HMP scheduler settings - echo 3 > /proc/sys/kernel/sched_window_stats_policy - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - echo 1 > /proc/sys/kernel/sched_restrict_tasks_spread - # HMP Task packing settings - echo 20 > /proc/sys/kernel/sched_small_task - echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load - - echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run - - echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle - - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "19000 1094400:39000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay - echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate - echo 1094400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - echo "1 960000:85 1094400:90" > /sys/devices/system/cpu/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor - - # Enable sched guided freq control - echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif - echo 50000 > /proc/sys/kernel/sched_freq_inc_notify - echo 50000 > /proc/sys/kernel/sched_freq_dec_notify -} - -function 8937_sched_dcvs_hmp() -{ - # HMP scheduler settings - echo 3 > /proc/sys/kernel/sched_window_stats_policy - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - # HMP Task packing settings - echo 20 > /proc/sys/kernel/sched_small_task - echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load - - echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run - - echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle - # enable governor for perf cluster - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "19000 1094400:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 1094400 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo "1 960000:85 1094400:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor - - # enable governor for power cluster - echo 1 > /sys/devices/system/cpu/cpu4/online - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo "1 768000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor - - # Enable sched guided freq control - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif - echo 50000 > /proc/sys/kernel/sched_freq_inc_notify - echo 50000 > /proc/sys/kernel/sched_freq_dec_notify - -} -target=`getprop ro.board.platform` - 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 devices. - # For 512MB Go device, size = 384MB, set same for Non-Go. - # For 1GB Go device, size = 768MB, set same for Non-Go. # For >=2GB Non-Go devices, size = 50% of RAM size. Limit the size to 4GB. - # And enable lz4 zram compression for Go targets. RamSizeGB=`echo "($MemTotal / 1048576 ) + 1" | bc` zRamSizeBytes=`echo "$RamSizeGB * 1024 * 1024 * 1024 / 2" | bc` @@ -375,41 +40,14 @@ function configure_zram_parameters() { zRamSizeBytes=4294967296 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 - if [ $MemTotal -le 524288 ]; then - echo 402653184 > /sys/block/zram0/disksize - elif [ $MemTotal -le 1048576 ]; then - echo 805306368 > /sys/block/zram0/disksize - else echo $zRamSizeBytes > /sys/block/zram0/disksize - 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} - - # Set 128 for <= 3GB & # set 512 for >= 4GB targets. - if [ $MemTotal -le 3145728 ]; then - echo 128 > /sys/block/mmcblk0/bdi/read_ahead_kb - echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb - echo 128 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb - echo 128 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb - echo 128 > /sys/block/dm-0/queue/read_ahead_kb - echo 128 > /sys/block/dm-1/queue/read_ahead_kb - echo 128 > /sys/block/dm-2/queue/read_ahead_kb - else 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 @@ -417,37 +55,6 @@ function configure_read_ahead_kb_values() { 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 - fi -} - -function disable_core_ctl() { - if [ -f /sys/devices/system/cpu/cpu0/core_ctl/enable ]; then - echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable - else - echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/disable - fi -} - -function enable_swap() { - MemTotalStr=`cat /proc/meminfo | grep MemTotal` - MemTotal=${MemTotalStr:16:8} - - SWAP_ENABLE_THRESHOLD=1048576 - swap_enable=`getprop ro.vendor.qti.config.swap` - - # Enable swap initially only for 1 GB targets - if [ "$MemTotal" -le "$SWAP_ENABLE_THRESHOLD" ] && [ "$swap_enable" == "true" ]; then - # Static swiftness - echo 1 > /proc/sys/vm/swap_ratio_enable - echo 70 > /proc/sys/vm/swap_ratio - - # Swap disk - 200MB size - if [ ! -f /data/vendor/swap/swapfile ]; then - dd if=/dev/zero of=/data/vendor/swap/swapfile bs=1m count=200 - fi - mkswap /data/vendor/swap/swapfile - swapon /data/vendor/swap/swapfile -p 32758 - fi } function configure_memory_parameters() { @@ -470,33 +77,9 @@ function configure_memory_parameters() { # Set allocstall_threshold to 0 for all targets. # -ProductName=`getprop ro.product.name` -low_ram=`getprop ro.config.low_ram` - -if [ "$ProductName" == "msmnile" ] || [ "$ProductName" == "kona" ] || [ "$ProductName" == "sdmshrike_au" ]; then - # Enable ZRAM - configure_zram_parameters - configure_read_ahead_kb_values - echo 0 > /proc/sys/vm/page-cluster - echo 100 > /proc/sys/vm/swappiness -else - arch_type=`uname -m` MemTotalStr=`cat /proc/meminfo | grep MemTotal` MemTotal=${MemTotalStr:16:8} - # Set parameters for 32-bit Go targets. - if [ $MemTotal -le 1048576 ] && [ "$low_ram" == "true" ]; then - # Disable KLMK, ALMK, PPR & Core Control for Go devices - echo 0 > /sys/module/lowmemorykiller/parameters/enable_lmk - echo 0 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk - echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim - disable_core_ctl - # Enable oom_reaper for Go devices - if [ -f /proc/sys/vm/reap_mem_on_sigkill ]; then - echo 1 > /proc/sys/vm/reap_mem_on_sigkill - fi - else - # 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` @@ -513,7 +96,6 @@ else # Calculate vmpressure_file_min as below & set for 64 bit: # vmpressure_file_min = last_lmk_bin + (last_lmk_bin - last_but_one_lmk_bin) - if [ "$arch_type" == "aarch64" ]; then 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%%,*}" @@ -530,41 +112,14 @@ else else echo "18432,23040,27648,32256,55296,80640" > /sys/module/lowmemorykiller/parameters/minfree fi - else - # Set LMK series, vmpressure_file_min for 32 bit non-go targets. - # Disable Core Control, enable KLMK for non-go 8909. - if [ "$ProductName" == "msm8909" ]; then - disable_core_ctl - echo 1 > /sys/module/lowmemorykiller/parameters/enable_lmk - fi - echo "15360,19200,23040,26880,34415,43737" > /sys/module/lowmemorykiller/parameters/minfree - echo 53059 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min - 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 - if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper - fi - # Set PPR parameters - 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 - - case "$soc_id" in - # Do not set PPR parameters for premium targets - # sdm845 - 321, 341 - # msm8998 - 292, 319 - # msm8996 - 246, 291, 305, 312 - "321" | "341" | "292" | "319" | "246" | "291" | "305" | "312") - ;; - *) #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 @@ -572,9 +127,6 @@ else 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 - ;; - esac - fi # Set allocstall_threshold to 0 for all targets. # Set swappiness to 100 for all targets @@ -588,3013 +140,9 @@ else configure_zram_parameters configure_read_ahead_kb_values - - enable_swap -fi } -function enable_memory_features() -{ - MemTotalStr=`cat /proc/meminfo | grep MemTotal` - MemTotal=${MemTotalStr:16:8} - - if [ $MemTotal -le 2097152 ]; then - #Enable B service adj transition for 2GB or less memory - setprop ro.vendor.qti.sys.fw.bservice_enable true - setprop ro.vendor.qti.sys.fw.bservice_limit 5 - setprop ro.vendor.qti.sys.fw.bservice_age 5000 - - #Enable Delay Service Restart - setprop ro.vendor.qti.am.reschedule_service true - fi -} - -function start_hbtp() -{ - # Start the Host based Touch processing but not in the power off mode. - bootmode=`getprop ro.bootmode` - if [ "charger" != $bootmode ]; then - start vendor.hbtp - fi -} - -case "$target" in - "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627a" | "msm7627_surf" | \ - "qsd8250_surf" | "qsd8250_ffa" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "qsd8650a_st1x") - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - ;; -esac - -case "$target" in - "msm7201a_ffa" | "msm7201a_surf") - echo 500000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - ;; -esac - -case "$target" in - "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") - echo 75000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 1 > /sys/module/pm2/parameters/idle_sleep_mode - ;; -esac - -case "$target" in - "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627_surf" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm7627a" ) - echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - ;; -esac - -case "$target" in - "msm8660") - echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache - echo 1 > /sys/module/rpm_resources/enable_low_power/pxo - echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_dig - echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_mem - echo 1 > /sys/module/rpm_resources/enable_low_power/rpm_cpu - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - chown -h root.system /sys/devices/system/cpu/mfreq - chmod -h 220 /sys/devices/system/cpu/mfreq - chown -h root.system /sys/devices/system/cpu/cpu1/online - chmod -h 664 /sys/devices/system/cpu/cpu1/online - ;; -esac - -case "$target" in - "msm8960") - echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache - echo 1 > /sys/module/rpm_resources/enable_low_power/pxo - echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_dig - echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_mem - echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential - echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core - echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core - echo 918000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq - echo 1026000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq - echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load - chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - chown -h system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 384000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 384000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - chown -h system /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - chown -h system /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - echo 1 > /sys/module/msm_thermal/core_control/enabled - chown -h root.system /sys/devices/system/cpu/mfreq - chmod -h 220 /sys/devices/system/cpu/mfreq - chown -h root.system /sys/devices/system/cpu/cpu1/online - chown -h root.system /sys/devices/system/cpu/cpu2/online - chown -h root.system /sys/devices/system/cpu/cpu3/online - chmod -h 664 /sys/devices/system/cpu/cpu1/online - chmod -h 664 /sys/devices/system/cpu/cpu2/online - chmod -h 664 /sys/devices/system/cpu/cpu3/online - # set DCVS parameters for CPU - echo 40000 > /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us - echo 40000 > /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us - echo 100000 > /sys/module/msm_dcvs/cores/cpu0/em_win_size_min_us - echo 500000 > /sys/module/msm_dcvs/cores/cpu0/em_win_size_max_us - echo 0 > /sys/module/msm_dcvs/cores/cpu0/slack_mode_dynamic - echo 1000000 > /sys/module/msm_dcvs/cores/cpu0/disable_pc_threshold - echo 25000 > /sys/module/msm_dcvs/cores/cpu1/slack_time_max_us - echo 25000 > /sys/module/msm_dcvs/cores/cpu1/slack_time_min_us - echo 100000 > /sys/module/msm_dcvs/cores/cpu1/em_win_size_min_us - echo 500000 > /sys/module/msm_dcvs/cores/cpu1/em_win_size_max_us - echo 0 > /sys/module/msm_dcvs/cores/cpu1/slack_mode_dynamic - echo 1000000 > /sys/module/msm_dcvs/cores/cpu1/disable_pc_threshold - echo 25000 > /sys/module/msm_dcvs/cores/cpu2/slack_time_max_us - echo 25000 > /sys/module/msm_dcvs/cores/cpu2/slack_time_min_us - echo 100000 > /sys/module/msm_dcvs/cores/cpu2/em_win_size_min_us - echo 500000 > /sys/module/msm_dcvs/cores/cpu2/em_win_size_max_us - echo 0 > /sys/module/msm_dcvs/cores/cpu2/slack_mode_dynamic - echo 1000000 > /sys/module/msm_dcvs/cores/cpu2/disable_pc_threshold - echo 25000 > /sys/module/msm_dcvs/cores/cpu3/slack_time_max_us - echo 25000 > /sys/module/msm_dcvs/cores/cpu3/slack_time_min_us - echo 100000 > /sys/module/msm_dcvs/cores/cpu3/em_win_size_min_us - echo 500000 > /sys/module/msm_dcvs/cores/cpu3/em_win_size_max_us - echo 0 > /sys/module/msm_dcvs/cores/cpu3/slack_mode_dynamic - echo 1000000 > /sys/module/msm_dcvs/cores/cpu3/disable_pc_threshold - # set DCVS parameters for GPU - echo 20000 > /sys/module/msm_dcvs/cores/gpu0/slack_time_max_us - echo 20000 > /sys/module/msm_dcvs/cores/gpu0/slack_time_min_us - echo 0 > /sys/module/msm_dcvs/cores/gpu0/slack_mode_dynamic - # set msm_mpdecision parameters - echo 45000 > /sys/module/msm_mpdecision/slack_time_max_us - echo 15000 > /sys/module/msm_mpdecision/slack_time_min_us - echo 100000 > /sys/module/msm_mpdecision/em_win_size_min_us - echo 1000000 > /sys/module/msm_mpdecision/em_win_size_max_us - echo 3 > /sys/module/msm_mpdecision/online_util_pct_min - echo 25 > /sys/module/msm_mpdecision/online_util_pct_max - echo 97 > /sys/module/msm_mpdecision/em_max_util_pct - echo 2 > /sys/module/msm_mpdecision/rq_avg_poll_ms - echo 10 > /sys/module/msm_mpdecision/mp_em_rounding_point_min - echo 85 > /sys/module/msm_mpdecision/mp_em_rounding_point_max - echo 50 > /sys/module/msm_mpdecision/iowait_threshold_pct - #set permissions for the nodes needed by display on/off hook - chown -h system /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us - chown -h system /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us - chown -h system /sys/module/msm_mpdecision/slack_time_max_us - chown -h system /sys/module/msm_mpdecision/slack_time_min_us - chmod -h 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us - chmod -h 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us - chmod -h 664 /sys/module/msm_mpdecision/slack_time_max_us - chmod -h 664 /sys/module/msm_mpdecision/slack_time_min_us - 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 - case "$soc_id" in - "130") - echo 230 > /sys/class/gpio/export - echo 228 > /sys/class/gpio/export - echo 229 > /sys/class/gpio/export - echo "in" > /sys/class/gpio/gpio230/direction - echo "rising" > /sys/class/gpio/gpio230/edge - echo "in" > /sys/class/gpio/gpio228/direction - echo "rising" > /sys/class/gpio/gpio228/edge - echo "in" > /sys/class/gpio/gpio229/direction - echo "rising" > /sys/class/gpio/gpio229/edge - echo 253 > /sys/class/gpio/export - echo 254 > /sys/class/gpio/export - echo 257 > /sys/class/gpio/export - echo 258 > /sys/class/gpio/export - echo 259 > /sys/class/gpio/export - echo "out" > /sys/class/gpio/gpio253/direction - echo "out" > /sys/class/gpio/gpio254/direction - echo "out" > /sys/class/gpio/gpio257/direction - echo "out" > /sys/class/gpio/gpio258/direction - echo "out" > /sys/class/gpio/gpio259/direction - chown -h media /sys/class/gpio/gpio253/value - chown -h media /sys/class/gpio/gpio254/value - chown -h media /sys/class/gpio/gpio257/value - chown -h media /sys/class/gpio/gpio258/value - chown -h media /sys/class/gpio/gpio259/value - chown -h media /sys/class/gpio/gpio253/direction - chown -h media /sys/class/gpio/gpio254/direction - chown -h media /sys/class/gpio/gpio257/direction - chown -h media /sys/class/gpio/gpio258/direction - chown -h media /sys/class/gpio/gpio259/direction - echo 0 > /sys/module/rpm_resources/enable_low_power/vdd_dig - echo 0 > /sys/module/rpm_resources/enable_low_power/vdd_mem - ;; - esac - ;; -esac - -case "$target" in - "msm8974") - echo 4 > /sys/module/lpm_levels/enable_low_power/l2 - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/retention/idle_enabled - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - 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 - case "$soc_id" in - "208" | "211" | "214" | "217" | "209" | "212" | "215" | "218" | "194" | "210" | "213" | "216") - for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor - do - echo "cpubw_hwmon" > $devfreq_gov - done - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - echo "interactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - echo "20000 1400000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time - echo 20 > /sys/module/cpu_boost/parameters/boost_ms - echo 1728000 > /sys/module/cpu_boost/parameters/sync_threshold - echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor - echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms - ;; - *) - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential - echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core - echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core - echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq - echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq - echo 1190400 > /sys/devices/system/cpu/cpufreq/ondemand/input_boost - echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load - ;; - esac - echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 1 > /sys/module/msm_thermal/core_control/enabled - chown -h root.system /sys/devices/system/cpu/mfreq - chmod -h 220 /sys/devices/system/cpu/mfreq - chown -h root.system /sys/devices/system/cpu/cpu1/online - chown -h root.system /sys/devices/system/cpu/cpu2/online - chown -h root.system /sys/devices/system/cpu/cpu3/online - chmod -h 664 /sys/devices/system/cpu/cpu1/online - chmod -h 664 /sys/devices/system/cpu/cpu2/online - chmod -h 664 /sys/devices/system/cpu/cpu3/online - echo 1 > /dev/cpuctl/apps/cpu.notify_on_migrate - ;; -esac - -case "$target" in - "msm8916") - 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 - case "$soc_id" in - "206") - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 2 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus - ;; - "247" | "248" | "249" | "250") - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - ;; - "239" | "241" | "263") - if [ -f /sys/devices/soc0/revision ]; then - revision=`cat /sys/devices/soc0/revision` - else - revision=`cat /sys/devices/system/soc/soc0/revision` - fi - echo 10 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus - 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" | "2") - start_hbtp - ;; - esac - ;; - "MTP") - case "$platform_subtype_id" in - "3") - start_hbtp - ;; - esac - ;; - esac - ;; - esac - ;; - "268" | "269" | "270" | "271") - echo 10 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus - ;; - "233" | "240" | "242") - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - ;; - esac - ;; -esac - -case "$target" in - "msm8226") - echo 4 > /sys/module/lpm_levels/enable_low_power/l2 - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential - echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core - echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core - echo 787200 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq - echo 300000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq - echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load - echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown -h root.system /sys/devices/system/cpu/cpu1/online - chown -h root.system /sys/devices/system/cpu/cpu2/online - chown -h root.system /sys/devices/system/cpu/cpu3/online - chmod -h 664 /sys/devices/system/cpu/cpu1/online - chmod -h 664 /sys/devices/system/cpu/cpu2/online - chmod -h 664 /sys/devices/system/cpu/cpu3/online - ;; -esac - -case "$target" in - "msm8610") - echo 4 > /sys/module/lpm_levels/enable_low_power/l2 - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential - echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core - echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core - echo 787200 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq - echo 300000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq - echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load - echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - setprop ro.qualcomm.perf.min_freq 7 - echo 1 > /sys/kernel/mm/ksm/deferred_timer - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown -h root.system /sys/devices/system/cpu/cpu1/online - chown -h root.system /sys/devices/system/cpu/cpu2/online - chown -h root.system /sys/devices/system/cpu/cpu3/online - chmod -h 664 /sys/devices/system/cpu/cpu1/online - chmod -h 664 /sys/devices/system/cpu/cpu2/online - chmod -h 664 /sys/devices/system/cpu/cpu3/online - ;; -esac - -case "$target" in - "msm8916") - - 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 - - # HMP scheduler settings for 8916, 8936, 8939, 8929 - echo 3 > /proc/sys/kernel/sched_window_stats_policy - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - - # Apply governor settings for 8916 - case "$soc_id" in - "206" | "247" | "248" | "249" | "250") - - # HMP scheduler load tracking settings - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - - # HMP Task packing settings for 8916 - echo 20 > /proc/sys/kernel/sched_small_task - echo 30 > /proc/sys/kernel/sched_mostly_idle_load - echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run - - # disable thermal core_control to update scaling_min_freq - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - # enable thermal core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - - echo "25000 1094400:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate - echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - echo "1 800000:85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads - echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time - echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - ;; - esac - - # Apply governor settings for 8936 - case "$soc_id" in - "233" | "240" | "242") - - # HMP scheduler load tracking settings - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - - # HMP Task packing settings for 8936 - echo 50 > /proc/sys/kernel/sched_small_task - echo 50 > /proc/sys/kernel/sched_mostly_idle_load - echo 10 > /proc/sys/kernel/sched_mostly_idle_nr_run - - # disable thermal core_control to update scaling_min_freq, interactive gov - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - # enable thermal core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - - echo "25000 1113600:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate - echo 960000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - echo "1 800000:85 1113600:90 1267200:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads - echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time - echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - - # Enable low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - ;; - esac - - # Apply governor settings for 8939 - case "$soc_id" in - "239" | "241" | "263" | "268" | "269" | "270" | "271") - - if [ `cat /sys/devices/soc0/revision` != "3.0" ]; then - # Apply 1.0 and 2.0 specific Sched & Governor settings - - # HMP scheduler load tracking settings - echo 5 > /proc/sys/kernel/sched_ravg_hist_size - - # HMP Task packing settings for 8939, 8929 - echo 20 > /proc/sys/kernel/sched_small_task - - for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor - do - echo "cpufreq" > $devfreq_gov - done - - for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor - do - echo "bw_hwmon" > $devfreq_gov - for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent - do - echo 20 > $cpu_io_percent - done - done - - for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - # disable thermal core_control to update interactive gov settings - echo 0 > /sys/module/msm_thermal/core_control/enabled - - # enable governor for perf cluster - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "20000 1113600:50000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo "1 960000:85 1113600:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - # enable governor for power cluster - echo 1 > /sys/devices/system/cpu/cpu4/online - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo "25000 800000:50000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo "1 800000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor - echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - - # enable thermal core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - # Enable low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - # HMP scheduler (big.Little cluster related) settings - echo 75 > /proc/sys/kernel/sched_upmigrate - echo 60 > /proc/sys/kernel/sched_downmigrate - - # cpu idle load threshold - echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load - - # cpu idle nr run threshold - echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run - - else - # Apply 3.0 specific Sched & Governor settings - # HMP scheduler settings for 8939 V3.0 - echo 3 > /proc/sys/kernel/sched_window_stats_policy - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - echo 20000000 > /proc/sys/kernel/sched_ravg_window - - # HMP Task packing settings for 8939 V3.0 - echo 20 > /proc/sys/kernel/sched_small_task - echo 30 > /proc/sys/kernel/sched_mostly_idle_load - echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run - - echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle - - for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor - do - echo "cpufreq" > $devfreq_gov - done - - for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor - do - echo "bw_hwmon" > $devfreq_gov - for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent - do - echo 20 > $cpu_io_percent - done - done - - for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - # disable thermal core_control to update interactive gov settings - echo 0 > /sys/module/msm_thermal/core_control/enabled - - # enable governor for perf cluster - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "19000 1113600:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo "1 960000:85 1113600:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - # enable governor for power cluster - echo 1 > /sys/devices/system/cpu/cpu4/online - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo "1 800000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor - echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - - # enable thermal core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - # Enable low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - # HMP scheduler (big.Little cluster related) settings - echo 93 > /proc/sys/kernel/sched_upmigrate - echo 83 > /proc/sys/kernel/sched_downmigrate - - # Enable sched guided freq control - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif - echo 50000 > /proc/sys/kernel/sched_freq_inc_notify - echo 50000 > /proc/sys/kernel/sched_freq_dec_notify - - # Enable core control -# insmod /system/lib/modules/core_ctl.ko - echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus - echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus - echo 68 > /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 - case "$revision" in - "3.0") - # Enable dynamic clock gatin - echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating - ;; - esac - fi - ;; - esac - # Set Memory parameters - configure_memory_parameters - ;; -esac - -case "$target" in - "msm8952") - - 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 - case "$soc_id" in - "264" | "289") - # Apply Scheduler and Governor settings for 8952 - - # HMP scheduler settings - echo 3 > /proc/sys/kernel/sched_window_stats_policy - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - echo 20000000 > /proc/sys/kernel/sched_ravg_window - - # HMP Task packing settings - echo 20 > /proc/sys/kernel/sched_small_task - echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load - - echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run - - echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle - - echo 0 > /proc/sys/kernel/sched_boost - - for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor - do - echo "cpufreq" > $devfreq_gov - done - - for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor - do - echo "bw_hwmon" > $devfreq_gov - for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent - do - echo 20 > $cpu_io_percent - done - for cpu_guard_band in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/guard_band_mbps - do - echo 30 > $cpu_guard_band - done - done - - for gpu_bimc_io_percent in /sys/class/devfreq/qcom,gpubw*/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - # disable thermal & BCL core_control to update interactive gov settings - echo 0 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - bcl_hotplug_mask=`cat $hotplug_mask` - echo 0 > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - bcl_soc_hotplug_mask=`cat $hotplug_soc_mask` - echo 0 > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - # enable governor for perf cluster - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "19000 1113600:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo "1 960000:85 1113600:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - # enable governor for power cluster - echo 1 > /sys/devices/system/cpu/cpu4/online - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 806400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo "1 806400:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor - echo 806400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - # Enable Low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - # HMP scheduler (big.Little cluster related) settings - echo 93 > /proc/sys/kernel/sched_upmigrate - echo 83 > /proc/sys/kernel/sched_downmigrate - - # Enable sched guided freq control - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif - echo 50000 > /proc/sys/kernel/sched_freq_inc_notify - echo 50000 > /proc/sys/kernel/sched_freq_dec_notify - - # Enable core control - echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus - echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus - echo 68 > /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 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster - - # re-enable thermal & BCL core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - echo $bcl_hotplug_mask > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - echo $bcl_soc_hotplug_mask > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - # Enable dynamic clock gating - echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating - # Enable timer migration to little cluster - echo 1 > /proc/sys/kernel/power_aware_timer_migration - - # Set Memory parameters - configure_memory_parameters - - ;; - *) - panel=`cat /sys/class/graphics/fb0/modes` - if [ "${panel:5:1}" == "x" ]; then - panel=${panel:2:3} - else - panel=${panel:2:4} - fi - - # Apply Scheduler and Governor settings for 8976 - # SoC IDs are 266, 274, 277, 278 - - # HMP scheduler (big.Little cluster related) settings - echo 95 > /proc/sys/kernel/sched_upmigrate - echo 85 > /proc/sys/kernel/sched_downmigrate - - echo 2 > /proc/sys/kernel/sched_window_stats_policy - echo 5 > /proc/sys/kernel/sched_ravg_hist_size - - echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run - - for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor - do - echo "cpufreq" > $devfreq_gov - done - - for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor - do - echo "bw_hwmon" > $devfreq_gov - for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent - do - echo 20 > $cpu_io_percent - done - for cpu_guard_band in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/guard_band_mbps - do - echo 30 > $cpu_guard_band - done - done - - for gpu_bimc_io_percent in /sys/class/devfreq/qcom,gpubw*/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - # disable thermal & BCL core_control to update interactive gov settings - echo 0 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - bcl_hotplug_mask=`cat $hotplug_mask` - echo 0 > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - bcl_soc_hotplug_mask=`cat $hotplug_soc_mask` - echo 0 > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - # enable governor for power cluster - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 691200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - # enable governor for perf cluster - echo 1 > /sys/devices/system/cpu/cpu4/online - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor - echo 883200 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 60000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis - - if [ $panel -gt 1080 ]; then - #set texture cache size for resolution greater than 1080p - setprop ro.hwui.texture_cache_size 72 - fi - - echo 59000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo "1 691200:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 1382400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo "19000 1382400:39000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo "85 1382400:90 1747200:80" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - # HMP Task packing settings for 8976 - echo 30 > /proc/sys/kernel/sched_small_task - echo 20 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load - echo 20 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load - echo 20 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load - echo 20 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load - echo 20 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load - echo 20 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load - echo 20 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load - echo 20 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load - - echo 0 > /proc/sys/kernel/sched_boost - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - #Disable CPU retention modes for 32bit builds - ProductName=`getprop ro.product.name` - if [ "$ProductName" == "msm8952_32" ] || [ "$ProductName" == "msm8952_32_LMT" ]; then - echo N > /sys/module/lpm_levels/system/a72/cpu4/retention/idle_enabled - echo N > /sys/module/lpm_levels/system/a72/cpu5/retention/idle_enabled - echo N > /sys/module/lpm_levels/system/a72/cpu6/retention/idle_enabled - echo N > /sys/module/lpm_levels/system/a72/cpu7/retention/idle_enabled - fi - - if [ `cat /sys/devices/soc0/revision` == "1.0" ]; then - # Disable l2-pc and l2-gdhs low power modes - echo N > /sys/module/lpm_levels/system/a53/a53-l2-gdhs/idle_enabled - echo N > /sys/module/lpm_levels/system/a72/a72-l2-gdhs/idle_enabled - echo N > /sys/module/lpm_levels/system/a53/a53-l2-pc/idle_enabled - echo N > /sys/module/lpm_levels/system/a72/a72-l2-pc/idle_enabled - fi - - # Enable LPM Prediction - echo 1 > /sys/module/lpm_levels/parameters/lpm_prediction - - # Enable Low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - # Disable L2 GDHS on 8976 - echo N > /sys/module/lpm_levels/system/a53/a53-l2-gdhs/idle_enabled - echo N > /sys/module/lpm_levels/system/a72/a72-l2-gdhs/idle_enabled - - # Enable sched guided freq control - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif - echo 50000 > /proc/sys/kernel/sched_freq_inc_notify - echo 50000 > /proc/sys/kernel/sched_freq_dec_notify - - # Enable core control - #for 8976 - echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus - echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/max_cpus - echo 68 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres - echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres - echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms - echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster - - # re-enable thermal & BCL core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - echo $bcl_hotplug_mask > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - echo $bcl_soc_hotplug_mask > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - # Enable timer migration to little cluster - echo 1 > /proc/sys/kernel/power_aware_timer_migration - - case "$soc_id" in - "277" | "278") - # Start energy-awareness for 8976 - start energy-awareness - ;; - esac - - #enable sched colocation and colocation inheritance - echo 130 > /proc/sys/kernel/sched_grp_upmigrate - echo 110 > /proc/sys/kernel/sched_grp_downmigrate - echo 1 > /proc/sys/kernel/sched_enable_thread_grouping - - # Set Memory parameters - configure_memory_parameters - - ;; - esac - #Enable Memory Features - enable_memory_features - restorecon -R /sys/devices/system/cpu - ;; -esac - -case "$target" in - "msm8953") - - 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 [ -f /sys/devices/soc0/platform_subtype_id ]; then - platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id` - fi - - echo 0 > /proc/sys/kernel/sched_boost - - case "$soc_id" in - "293" | "304" | "338" | "351") - - # Start Host based Touch processing - case "$hw_platform" in - "MTP" | "Surf" | "RCM" ) - #if this directory is present, it means that a - #1200p panel is connected to the device. - dir="/sys/bus/i2c/devices/3-0038" - if [ ! -d "$dir" ]; then - start_hbtp - fi - ;; - esac - - if [ $soc_id -eq "338" ]; then - case "$hw_platform" in - "QRD" ) - if [ $platform_subtype_id -eq "1" ]; then - start_hbtp - fi - ;; - esac - fi - - #init task load, restrict wakeups to preferred cluster - echo 15 > /proc/sys/kernel/sched_init_task_load - - for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor - do - echo "cpufreq" > $devfreq_gov - done - - for devfreq_gov in /sys/class/devfreq/soc:qcom,cpubw/governor - do - echo "bw_hwmon" > $devfreq_gov - for cpu_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent - do - echo 34 > $cpu_io_percent - done - for cpu_guard_band in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps - do - echo 0 > $cpu_guard_band - done - for cpu_hist_memory in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hist_memory - do - echo 20 > $cpu_hist_memory - done - for cpu_hyst_length in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_length - do - echo 10 > $cpu_hyst_length - done - for cpu_idle_mbps in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/idle_mbps - do - echo 1600 > $cpu_idle_mbps - done - for cpu_low_power_delay in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/low_power_delay - do - echo 20 > $cpu_low_power_delay - done - for cpu_low_power_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/low_power_io_percent - do - echo 34 > $cpu_low_power_io_percent - done - for cpu_mbps_zones in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/mbps_zones - do - echo "1611 3221 5859 6445 7104" > $cpu_mbps_zones - done - for cpu_sample_ms in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/sample_ms - do - echo 4 > $cpu_sample_ms - done - for cpu_up_scale in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/up_scale - do - echo 250 > $cpu_up_scale - done - for cpu_min_freq in /sys/class/devfreq/soc:qcom,cpubw/min_freq - do - echo 1611 > $cpu_min_freq - done - done - - for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - - # disable thermal & BCL core_control to update interactive gov settings - echo 0 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - bcl_hotplug_mask=`cat $hotplug_mask` - echo 0 > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - bcl_soc_hotplug_mask=`cat $hotplug_soc_mask` - echo 0 > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - #if the kernel version >=4.9,use the schedutil governor - KernelVersionStr=`cat /proc/sys/kernel/osrelease` - KernelVersionS=${KernelVersionStr:2:2} - KernelVersionA=${KernelVersionStr:0:1} - KernelVersionB=${KernelVersionS%.*} - if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 9 ]; then - 8953_sched_dcvs_eas - else - 8953_sched_dcvs_hmp - fi - echo 652800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - # Enable low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - # re-enable thermal & BCL core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - echo $bcl_hotplug_mask > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - echo $bcl_soc_hotplug_mask > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - # SMP scheduler - echo 85 > /proc/sys/kernel/sched_upmigrate - echo 85 > /proc/sys/kernel/sched_downmigrate - - # Set Memory parameters - configure_memory_parameters - ;; - esac - case "$soc_id" in - "349" | "350") - - # Start Host based Touch processing - case "$hw_platform" in - "MTP" | "Surf" | "RCM" | "QRD" ) - start_hbtp - ;; - esac - - for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor - do - echo "cpufreq" > $devfreq_gov - done - for cpubw in /sys/class/devfreq/*qcom,cpubw* - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo "1611 3221 5859 6445 7104" > $cpubw/bw_hwmon/mbps_zones - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 34 > $cpubw/bw_hwmon/io_percent - echo 20 > $cpubw/bw_hwmon/hist_memory - echo 80 > $cpubw/bw_hwmon/down_thres - echo 0 > $cpubw/bw_hwmon/hyst_length - echo 0 > $cpubw/bw_hwmon/guard_band_mbps - echo 250 > $cpubw/bw_hwmon/up_scale - echo 1600 > $cpubw/bw_hwmon/idle_mbps - done - - # Configure DCC module to capture critical register contents when device crashes - for DCC_PATH in /sys/bus/platform/devices/*.dcc* - do - echo 0 > $DCC_PATH/enable - echo cap > $DCC_PATH/func_type - echo sram > $DCC_PATH/data_sink - echo 1 > $DCC_PATH/config_reset - - # Register specifies APC CPR closed-loop settled voltage for current voltage corner - echo 0xb1d2c18 1 > $DCC_PATH/config - - # Register specifies SW programmed open-loop voltage for current voltage corner - echo 0xb1d2900 1 > $DCC_PATH/config - - # Register specifies APM switch settings and APM FSM state - echo 0xb1112b0 1 > $DCC_PATH/config - - # Register specifies CPR mode change state and also #online cores input to CPR HW - echo 0xb018798 1 > $DCC_PATH/config - - echo 1 > $DCC_PATH/enable - done - - # disable thermal & BCL core_control to update interactive gov settings - echo 0 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - bcl_hotplug_mask=`cat $hotplug_mask` - echo 0 > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - bcl_soc_hotplug_mask=`cat $hotplug_soc_mask` - echo 0 > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - # configure governor settings for little cluster - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us - echo 1363200 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq - #default value for hispeed_load is 90, for sdm632 it should be 85 - echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load - # sched_load_boost as -6 is equivalent to target load as 85. - echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost - - # configure governor settings for big cluster - echo 1 > /sys/devices/system/cpu/cpu4/online - echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us - echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq - #default value for hispeed_load is 90, for sdm632 it should be 85 - echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load - # sched_load_boost as -6 is equivalent to target load as 85. - echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost - - echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 633600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - - # cpuset settings - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/cpus - # choose idle CPU for top app tasks - echo 1 > /dev/stune/top-app/schedtune.prefer_idle - - # re-enable thermal & BCL core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - echo $bcl_hotplug_mask > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - echo $bcl_soc_hotplug_mask > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - # Disable Core control - echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable - echo 0 > /sys/devices/system/cpu/cpu4/core_ctl/enable - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - # Enable low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - # Set Memory parameters - configure_memory_parameters - - # Setting b.L scheduler parameters - echo 76 > /proc/sys/kernel/sched_downmigrate - echo 86 > /proc/sys/kernel/sched_upmigrate - echo 80 > /proc/sys/kernel/sched_group_downmigrate - echo 90 > /proc/sys/kernel/sched_group_upmigrate - echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks - - # Enable min frequency adjustment for big cluster - if [ -f /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster ]; then - echo "4-7" > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster - fi - echo 1 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_adjust - - ;; - esac - ;; -esac - -case "$target" in - "msm8937") - - 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 [ -f /sys/devices/soc0/platform_subtype_id ]; then - platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id` - fi - - # Socid 386 = Pukeena - case "$soc_id" in - "303" | "307" | "308" | "309" | "320" | "386" | "436") - - # Start Host based Touch processing - case "$hw_platform" in - "MTP" ) - start_hbtp - ;; - esac - - case "$hw_platform" in - "Surf" | "RCM" ) - if [ $platform_subtype_id -ne "4" ]; then - start_hbtp - fi - ;; - esac - # Apply Scheduler and Governor settings for 8917 / 8920 - - echo 20000000 > /proc/sys/kernel/sched_ravg_window - - #disable sched_boost in 8917 - echo 0 > /proc/sys/kernel/sched_boost - - # core_ctl is not needed for 8917. Disable it. - disable_core_ctl - - for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor - do - echo "cpufreq" > $devfreq_gov - done - - for devfreq_gov in /sys/class/devfreq/soc:qcom,cpubw/governor - do - echo "bw_hwmon" > $devfreq_gov - for cpu_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent - do - echo 20 > $cpu_io_percent - done - for cpu_guard_band in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps - do - echo 30 > $cpu_guard_band - done - done - - for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - - # disable thermal core_control to update interactive gov settings - echo 0 > /sys/module/msm_thermal/core_control/enabled - - KernelVersionStr=`cat /proc/sys/kernel/osrelease` - KernelVersionS=${KernelVersionStr:2:2} - KernelVersionA=${KernelVersionStr:0:1} - KernelVersionB=${KernelVersionS%.*} - if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 9 ]; then - 8917_sched_dcvs_eas - else - 8917_sched_dcvs_hmp - fi - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - # re-enable thermal core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - - # Disable L2-GDHS low power modes - echo N > /sys/module/lpm_levels/perf/perf-l2-gdhs/idle_enabled - echo N > /sys/module/lpm_levels/perf/perf-l2-gdhs/suspend_enabled - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - - # Enable low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - # Set rps mask - echo 2 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus - - # Enable dynamic clock gating - echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating - # Enable timer migration to little cluster - echo 1 > /proc/sys/kernel/power_aware_timer_migration - # Set Memory parameters - configure_memory_parameters - ;; - *) - ;; - esac - - case "$soc_id" in - "294" | "295" | "313" ) - - # Start Host based Touch processing - case "$hw_platform" in - "MTP" | "Surf" | "RCM" ) - start_hbtp - ;; - esac - - # Apply Scheduler and Governor settings for 8937/8940 - - # HMP scheduler settings - echo 3 > /proc/sys/kernel/sched_window_stats_policy - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - echo 20000000 > /proc/sys/kernel/sched_ravg_window - - #disable sched_boost in 8937 - echo 0 > /proc/sys/kernel/sched_boost - - for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor - do - echo "cpufreq" > $devfreq_gov - done - - for devfreq_gov in /sys/class/devfreq/soc:qcom,cpubw/governor - do - echo "bw_hwmon" > $devfreq_gov - for cpu_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent - do - echo 20 > $cpu_io_percent - done - for cpu_guard_band in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps - do - echo 30 > $cpu_guard_band - done - done - - for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - - # disable thermal core_control to update interactive gov and core_ctl settings - echo 0 > /sys/module/msm_thermal/core_control/enabled - - KernelVersionStr=`cat /proc/sys/kernel/osrelease` - KernelVersionS=${KernelVersionStr:2:2} - KernelVersionA=${KernelVersionStr:0:1} - KernelVersionB=${KernelVersionS%.*} - if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 9 ]; then - 8937_sched_dcvs_eas - else - 8937_sched_dcvs_hmp - fi - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - # Disable L2-GDHS low power modes - echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/suspend_enabled - echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/suspend_enabled - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - # Enable low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - # HMP scheduler (big.Little cluster related) settings - echo 93 > /proc/sys/kernel/sched_upmigrate - echo 83 > /proc/sys/kernel/sched_downmigrate - - # Enable core control - echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus - echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus - echo 68 > /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 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster - - # re-enable thermal core_control - echo 1 > /sys/module/msm_thermal/core_control/enabled - - # Enable dynamic clock gating - echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating - # Enable timer migration to little cluster - echo 1 > /proc/sys/kernel/power_aware_timer_migration - # Set Memory parameters - configure_memory_parameters - ;; - *) - - ;; - esac - - case "$soc_id" in - "354" | "364" | "353" | "363" ) - - # Start Host based Touch processing - case "$hw_platform" in - "MTP" | "Surf" | "RCM" | "QRD" ) - start_hbtp - ;; - esac - - # Apply settings for sdm429/sda429/sdm439/sda439 - - for cpubw in /sys/class/devfreq/*qcom,mincpubw* - do - echo "cpufreq" > $cpubw/governor - done - - for cpubw in /sys/class/devfreq/*qcom,cpubw* - do - echo "bw_hwmon" > $cpubw/governor - echo 20 > $cpubw/bw_hwmon/io_percent - echo 30 > $cpubw/bw_hwmon/guard_band_mbps - done - - for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - - case "$soc_id" in - "353" | "363" ) - # Apply settings for sdm439/sda439 - # configure schedutil governor settings - # enable governor for perf cluster - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us - #set the hispeed_freq - echo 1497600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq - echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - # sched_load_boost as -6 is equivalent to target load as 85. - echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost - - ## enable governor for power cluster - echo 1 > /sys/devices/system/cpu/cpu4/online - echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us - #set the hispeed_freq - echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq - echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load - echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - # sched_load_boost as -6 is equivalent to target load as 85. - echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost - - # EAS scheduler (big.Little cluster related) settings - echo 93 > /proc/sys/kernel/sched_upmigrate - echo 83 > /proc/sys/kernel/sched_downmigrate - echo 140 > /proc/sys/kernel/sched_group_upmigrate - echo 120 > /proc/sys/kernel/sched_group_downmigrate - - # cpuset settings - #echo 0-3 > /dev/cpuset/background/cpus - #echo 0-3 > /dev/cpuset/system-background/cpus - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - # Enable core control - echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus - echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus - echo 68 > /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 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster - echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres - - # Big cluster min frequency adjust settings - if [ -f /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster ]; then - echo "0-3" > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster - fi - echo 1305600 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_floor - ;; - *) - # Apply settings for sdm429/sda429 - # configure schedutil governor settings - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us - #set the hispeed_freq - echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq - echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - # sched_load_boost as -6 is equivalent to target load as 85. - echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - ;; - esac - - # Set Memory parameters - configure_memory_parameters - - #disable sched_boost - echo 0 > /proc/sys/kernel/sched_boost - - # Disable L2-GDHS low power modes - echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/suspend_enabled - echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/suspend_enabled - - # Enable low power modes - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - case "$soc_id" in - "353" | "363" ) - echo 1 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_adjust - ;; - esac - ;; - esac - - case "$soc_id" in - "386" | "436") - - # Start Host based Touch processing - case "$hw_platform" in - "QRD" ) - start_hbtp - ;; - esac - ;; - esac - ;; -esac - -case "$target" in - "sdm660") - - # Set the default IRQ affinity to the primary cluster. When a - # CPU is isolated/hotplugged, the IRQ affinity is adjusted - # to one of the CPU from the default IRQ affinity mask. - echo f > /proc/irq/default_smp_affinity - - 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 - - panel=`cat /sys/class/graphics/fb0/modes` - if [ "${panel:5:1}" == "x" ]; then - panel=${panel:2:3} - else - panel=${panel:2:4} - fi - - if [ $panel -gt 1080 ]; then - echo 2 > /proc/sys/kernel/sched_window_stats_policy - echo 5 > /proc/sys/kernel/sched_ravg_hist_size - else - echo 3 > /proc/sys/kernel/sched_window_stats_policy - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - fi - #Apply settings for sdm660, sdm636,sda636 - case "$soc_id" in - "317" | "324" | "325" | "326" | "345" | "346" ) - - 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 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster - echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres - - # Setting b.L scheduler parameters - echo 96 > /proc/sys/kernel/sched_upmigrate - echo 90 > /proc/sys/kernel/sched_downmigrate - echo 140 > /proc/sys/kernel/sched_group_upmigrate - echo 120 > /proc/sys/kernel/sched_group_downmigrate - echo 0 > /proc/sys/kernel/sched_select_prev_cpu_us - echo 400000 > /proc/sys/kernel/sched_freq_inc_notify - echo 400000 > /proc/sys/kernel/sched_freq_dec_notify - echo 5 > /proc/sys/kernel/sched_spill_nr_run - echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill - echo 100000 > /proc/sys/kernel/sched_short_burst_ns - echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker - echo 20 > /proc/sys/kernel/sched_small_wakee_task_load - - # cpuset settings - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/cpus - - # disable thermal bcl hotplug to switch governor - echo 0 > /sys/module/msm_thermal/core_control/enabled - - # online CPU0 - echo 1 > /sys/devices/system/cpu/cpu0/online - # configure governor settings for little cluster - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo "19000 1401600:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 1401600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo "85 1747200:95" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 39000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis - echo 633600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down - # online CPU4 - echo 1 > /sys/devices/system/cpu/cpu4/online - # configure governor settings for big cluster - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif - echo "19000 1401600:39000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo "85 1401600:90 2150400:95" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 59000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis - echo 1113600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/fast_ramp_down - - # bring all cores online - echo 1 > /sys/devices/system/cpu/cpu0/online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - # configure LPM - echo N > /sys/module/lpm_levels/system/pwr/cpu0/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu1/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu2/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu3/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu4/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu5/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu6/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu7/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-dynret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/perf-l2-dynret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/perf-l2-ret/idle_enabled - # enable LPM - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - # re-enable thermal and BCL hotplug - echo 1 > /sys/module/msm_thermal/core_control/enabled - - # Set Memory parameters - configure_memory_parameters - - # Enable bus-dcvs - for cpubw in /sys/class/devfreq/*qcom,cpubw* - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo 762 > $cpubw/min_freq - echo "1525 3143 5859 7759 9887 10327 11863 13763" > $cpubw/bw_hwmon/mbps_zones - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 85 > $cpubw/bw_hwmon/io_percent - echo 100 > $cpubw/bw_hwmon/decay_rate - echo 50 > $cpubw/bw_hwmon/bw_step - 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/low_power_ceil_mbps - echo 34 > $cpubw/bw_hwmon/low_power_io_percent - echo 20 > $cpubw/bw_hwmon/low_power_delay - echo 0 > $cpubw/bw_hwmon/guard_band_mbps - echo 250 > $cpubw/bw_hwmon/up_scale - echo 1600 > $cpubw/bw_hwmon/idle_mbps - done - - for memlat in /sys/class/devfreq/*qcom,memlat-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - echo 400 > $memlat/mem_latency/ratio_ceil - done - echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor - - # Start cdsprpcd only for sdm660 and disable for sdm630 - start vendor.cdsprpcd - - # Start Host based Touch processing - case "$hw_platform" in - "MTP" | "Surf" | "RCM" | "QRD" ) - start_hbtp - ;; - esac - ;; - esac - #Apply settings for sdm630 and Tahaa - case "$soc_id" in - "318" | "327" | "385" ) - - # Start Host based Touch processing - case "$hw_platform" in - "MTP" | "Surf" | "RCM" | "QRD" ) - start_hbtp - ;; - esac - - # Setting b.L scheduler parameters - echo 85 > /proc/sys/kernel/sched_upmigrate - echo 85 > /proc/sys/kernel/sched_downmigrate - echo 900 > /proc/sys/kernel/sched_group_upmigrate - echo 900 > /proc/sys/kernel/sched_group_downmigrate - echo 0 > /proc/sys/kernel/sched_select_prev_cpu_us - echo 400000 > /proc/sys/kernel/sched_freq_inc_notify - echo 400000 > /proc/sys/kernel/sched_freq_dec_notify - echo 3 > /proc/sys/kernel/sched_spill_nr_run - - #init task load, restrict wakeups to preferred cluster - echo 15 > /proc/sys/kernel/sched_init_task_load - echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill - echo 50000 > /proc/sys/kernel/sched_short_burst_ns - - # cpuset settings - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/cpus - - # disable thermal bcl hotplug to switch governor - echo 0 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - bcl_hotplug_mask=`cat $hotplug_mask` - echo 0 > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - bcl_soc_hotplug_mask=`cat $hotplug_soc_mask` - echo 0 > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - # online CPU0 - echo 1 > /sys/devices/system/cpu/cpu0/online - # configure governor settings for Big cluster(CPU0 to CPU3) - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo "19000 1344000:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 1344000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo "85 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 39000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis - echo 787200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif - - # online CPU4 - echo 1 > /sys/devices/system/cpu/cpu4/online - # configure governor settings for Little cluster(CPU4 to CPU7) - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif - echo "19000 1094400:39000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 1094400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo "85 1094400:80" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis - echo 614400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif - - # bring all cores online - echo 1 > /sys/devices/system/cpu/cpu0/online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 1 > /sys/devices/system/cpu/cpu4/online - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - - # configure LPM - echo N > /sys/module/lpm_levels/system/perf/cpu0/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu1/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu2/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu3/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu4/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu5/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu6/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu7/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-dynret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/perf-l2-dynret/idle_enabled - # enable LPM - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - # re-enable thermal and BCL hotplug - echo 1 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - echo $bcl_hotplug_mask > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - echo $bcl_soc_hotplug_mask > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - - # Set Memory parameters - configure_memory_parameters - - # Enable bus-dcvs - for cpubw in /sys/class/devfreq/*qcom,cpubw* - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo 762 > $cpubw/min_freq - echo "1525 3143 4173 5195 5859 7759 9887 10327" > $cpubw/bw_hwmon/mbps_zones - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 85 > $cpubw/bw_hwmon/io_percent - echo 20 > $cpubw/bw_hwmon/hist_memory - echo 0 > $cpubw/bw_hwmon/hyst_length - echo 100 > $cpubw/bw_hwmon/decay_rate - echo 50 > $cpubw/bw_hwmon/bw_step - echo 80 > $cpubw/bw_hwmon/down_thres - echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps - echo 50 > $cpubw/bw_hwmon/low_power_io_percent - echo 20 > $cpubw/bw_hwmon/low_power_delay - echo 0 > $cpubw/bw_hwmon/guard_band_mbps - echo 250 > $cpubw/bw_hwmon/up_scale - echo 1600 > $cpubw/bw_hwmon/idle_mbps - done - - for memlat in /sys/class/devfreq/*qcom,memlat-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - echo 400 > $memlat/mem_latency/ratio_ceil - done - - echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor - ;; - esac - ;; -esac - -case "$target" in - "sdm710") - - #Apply settings for sdm710 - # Set the default IRQ affinity to the silver cluster. When a - # CPU is isolated/hotplugged, the IRQ affinity is adjusted - # to one of the CPU from the default IRQ affinity mask. - echo 3f > /proc/irq/default_smp_affinity - - 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" ) - - # Start Host based Touch processing - case "$hw_platform" in - "MTP" | "Surf" | "RCM" | "QRD" ) - start_hbtp - ;; - esac - - # 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 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster - echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres - - # Setting b.L scheduler parameters - echo 96 > /proc/sys/kernel/sched_upmigrate - echo 90 > /proc/sys/kernel/sched_downmigrate - echo 140 > /proc/sys/kernel/sched_group_upmigrate - echo 120 > /proc/sys/kernel/sched_group_downmigrate - echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks - - # 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/rate_limit_us - echo 1209600 > /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/rate_limit_us - echo 1344000 > /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 - - echo "0:1209600" > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms - - # Set Memory parameters - configure_memory_parameters - - # Enable bus-dcvs - for cpubw in /sys/class/devfreq/*qcom,cpubw* - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo "1144 1720 2086 2929 3879 5931 6881" > $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 - - #Enable mem_latency governor for DDR scaling - for memlat in /sys/class/devfreq/*qcom,memlat-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - echo 400 > $memlat/mem_latency/ratio_ceil - done - - #Enable mem_latency governor for L3 scaling - for memlat in /sys/class/devfreq/*qcom,l3-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - echo 400 > $memlat/mem_latency/ratio_ceil - done - - #Enable userspace governor for L3 cdsp nodes - for l3cdsp in /sys/class/devfreq/*qcom,l3-cdsp* - do - echo "userspace" > $l3cdsp/governor - chown -h system $l3cdsp/userspace/set_freq - done - - echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor - - # Disable CPU Retention - echo N > /sys/module/lpm_levels/L3/cpu0/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu1/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu2/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu3/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu4/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu5/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu6/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu7/ret/idle_enabled - - # cpuset parameters - echo 0-5 > /dev/cpuset/background/cpus - echo 0-5 > /dev/cpuset/system-background/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 - ;; - esac - ;; -esac - -case "$target" in - "trinket") - - 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 - - case "$soc_id" in - "394" ) - - # Core control parameters on big - echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus - echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres - echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres - echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms - echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster - echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres - - # Setting b.L scheduler parameters - echo 67 > /proc/sys/kernel/sched_downmigrate - echo 77 > /proc/sys/kernel/sched_upmigrate - echo 85 > /proc/sys/kernel/sched_group_downmigrate - echo 100 > /proc/sys/kernel/sched_group_upmigrate - - # cpuset settings - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/cpus - - - # 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 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq - echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - # configure governor settings for big cluster - echo "schedutil" > /sys/devices/system/cpu/cpu4/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 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq - echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - - echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks - - # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable. - echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost - 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/cpu0/cpufreq/schedutil/hispeed_load - echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load - - # Set Memory parameters - configure_memory_parameters - - # Enable bus-dcvs - ddr_type=`od -An -tx /proc/device-tree/memory/ddr_device_type` - ddr_type4="07" - ddr_type3="05" - - for device in /sys/devices/platform/soc - do - for cpubw in $device/*cpu-cpu-ddr-bw/devfreq/*cpu-cpu-ddr-bw - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo 762 > $cpubw/min_freq - if [ ${ddr_type:4:2} == $ddr_type4 ]; then - # LPDDR4 - echo "2288 3440 4173 5195 5859 7759 10322 11863 13763" > $cpubw/bw_hwmon/mbps_zones - echo 85 > $cpubw/bw_hwmon/io_percent - fi - if [ ${ddr_type:4:2} == $ddr_type3 ]; then - # LPDDR3 - echo "1525 3440 5195 5859 7102" > $cpubw/bw_hwmon/mbps_zones - echo 34 > $cpubw/bw_hwmon/io_percent - fi - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 90 > $cpubw/bw_hwmon/decay_rate - echo 190 > $cpubw/bw_hwmon/bw_step - 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 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 - - for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor* - do - echo "compute" > $latfloor/governor - echo 10 > $latfloor/polling_interval - done - - done - - # colcoation v3 disabled - echo 0 > /proc/sys/kernel/sched_min_task_util_for_boost - echo 0 > /proc/sys/kernel/sched_min_task_util_for_colocation - echo 0 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz - - # 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 - - ;; - esac - ;; -esac - -case "$target" in - "sm6150") - - #Apply settings for sm6150 - # Set the default IRQ affinity to the silver cluster. When a - # CPU is isolated/hotplugged, the IRQ affinity is adjusted - # to one of the CPU from the default IRQ affinity mask. - echo 3f > /proc/irq/default_smp_affinity - - 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 - - case "$soc_id" in - "355" | "369" | "377" | "380" | "384" ) - target_type=`getprop ro.hardware.type` - if [ "$target_type" == "automotive" ]; then - # update frequencies - configure_sku_parameters - sku_identified=`getprop vendor.sku_identified` - else - sku_identified=0 - fi - - # 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 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster - 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 90 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 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq - if [ $sku_identified != 1 ]; then - echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - fi - - # 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 1209600 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq - if [ $sku_identified != 1 ]; then - echo 768000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq - fi - - # 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 - - echo "0:1209600" > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/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" > $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 - - #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 - - #Gold L3 ratio ceil - echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil - - #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 - - #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-5 > /dev/cpuset/background/cpus - echo 0-5 > /dev/cpuset/system-background/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 - ;; - esac - - #Apply settings for moorea - case "$soc_id" in - "365" | "366" ) - - # 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 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster - 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 71 and 65 - 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 1324600 > /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 - - echo "0:1248000" > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/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" > $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" > $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 - - #Gold L3 ratio ceil - echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil - - #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 - - #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-5 > /dev/cpuset/background/cpus - echo 0-5 > /dev/cpuset/system-background/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 - ;; - esac - - ;; -esac - - -case "$target" in - "lito") - - # 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 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres - echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms - - # Disable Core control on gold, prime - echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable - echo 0 > /sys/devices/system/cpu/cpu7/core_ctl/enable - - # Setting b.L scheduler parameters - echo 65 85 > /proc/sys/kernel/sched_downmigrate - echo 71 95 > /proc/sys/kernel/sched_upmigrate - 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 - echo 0 > /proc/sys/kernel/sched_coloc_busy_hyst_ns - echo 0 > /proc/sys/kernel/sched_coloc_busy_hysteresis_enable_cpus - echo 0 > /proc/sys/kernel/sched_coloc_busy_hyst_max_ms - - # disable unfiltering - echo 20000000 > /proc/sys/kernel/sched_task_unfilter_period - echo 1 > /proc/sys/kernel/sched_task_unfilter_nr_windows - - # 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/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us - echo 1228800 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl - echo 576000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq - echo 650000 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/rtg_boost_freq - - # configure governor settings for gold cluster - echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy6/scaling_governor - echo 0 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/down_rate_limit_us - echo 1228800 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/hispeed_freq - echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load - echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost - echo 0 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/pl - echo 672000 > /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq - echo 0 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/rtg_boost_freq - - # 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/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/down_rate_limit_us - echo 1228800 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq - echo 85 > /sys/devices/system/cpu/cpu7/cpufreq/schedutil/hispeed_load - echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost - echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl - echo 672000 > /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq - echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/rtg_boost_freq - - # colocation v3 settings - echo 51 > /proc/sys/kernel/sched_min_task_util_for_boost - echo 35 > /proc/sys/kernel/sched_min_task_util_for_colocation - - # Enable conservative pl - echo 1 > /proc/sys/kernel/sched_conservative_pl - - echo "0:1228800" > /sys/devices/system/cpu/cpu_boost/input_boost_freq - echo 40 > /sys/devices/system/cpu/cpu_boost/input_boost_ms - - # Set Memory parameters - configure_memory_parameters - - if [ `cat /sys/devices/soc0/revision` == "2.0" ]; then - # r2.0 related changes - echo "0:1075200" > /sys/devices/system/cpu/cpu_boost/input_boost_freq - echo 610000 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/rtg_boost_freq - echo 1075200 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq - echo 1152000 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/hispeed_freq - echo 1401600 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq - echo 614400 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq - echo 652800 > /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq - echo 806400 > /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq - echo 83 > /proc/sys/kernel/sched_asym_cap_sibling_freq_match_pct - fi - - # 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 16265" > $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 50 > $llccbw/polling_interval - echo "1144 1720 2086 2929 3879 5931 6881 7980" > $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*-ddr-bw/devfreq/*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 7980" > $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 - - for npullccbw in $device/*npu*-llcc-bw/devfreq/*npu*-llcc-bw - do - echo 1 > /sys/devices/virtual/npu/msm_npu/pwr - echo "bw_hwmon" > $npullccbw/governor - echo 40 > $npullccbw/polling_interval - echo "2288 4577 7110 9155 12298 14236 16265" > $npullccbw/bw_hwmon/mbps_zones - echo 4 > $npullccbw/bw_hwmon/sample_ms - echo 100 > $npullccbw/bw_hwmon/io_percent - echo 20 > $npullccbw/bw_hwmon/hist_memory - echo 10 > $npullccbw/bw_hwmon/hyst_length - echo 30 > $npullccbw/bw_hwmon/down_thres - echo 0 > $npullccbw/bw_hwmon/guard_band_mbps - echo 250 > $npullccbw/bw_hwmon/up_scale - echo 0 > /sys/devices/virtual/npu/msm_npu/pwr - done - - #Enable mem_latency governor for L3, LLCC, and DDR scaling - for memlat in $device/*qcom,devfreq-l3/*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/*qcom,devfreq-l3/*cdsp-l3-lat/devfreq/*cdsp-l3-lat - do - echo "cdspl3" > $l3cdsp/governor - done - - #Enable mem_latency governor for 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 - - #Gold L3 ratio ceil - for l3gold in $device/*qcom,devfreq-l3/*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/*qcom,devfreq-l3/*cpu7-cpu-l3-lat/devfreq/*cpu7-cpu-l3-lat - do - echo 4000 > $l3prime/mem_latency/ratio_ceil - done - - #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-5 > /dev/cpuset/background/cpus - echo 0-5 > /dev/cpuset/system-background/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 - ;; -esac - #Apply settings for atoll -case "$target" in - "atoll") # Core control parameters on silver echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred @@ -3734,1835 +282,11 @@ case "$target" in # Turn on sleep modes echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - ;; -esac - - -case "$target" in - "bengal") - - 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 - - case "$soc_id" in - "417" ) - - # Core control is temporarily disabled till bring up - echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable - echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus - # Core control parameters on big - echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres - echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres - echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms - echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres - - # Setting b.L scheduler parameters - echo 67 > /proc/sys/kernel/sched_downmigrate - echo 77 > /proc/sys/kernel/sched_upmigrate - echo 85 > /proc/sys/kernel/sched_group_downmigrate - echo 100 > /proc/sys/kernel/sched_group_upmigrate - - # cpuset settings - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/cpus - - - # 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 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq - echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rtg_boost_freq - - # configure governor settings for big cluster - echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/down_rate_limit_us - echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq - echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rtg_boost_freq - - echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks - - # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable. - echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost - echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost - 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/cpu0/cpufreq/schedutil/hispeed_load - echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load - - # Set Memory parameters - configure_memory_parameters - - # Enable bus-dcvs - ddr_type=`od -An -tx /proc/device-tree/memory/ddr_device_type` - ddr_type4="07" - ddr_type3="05" - - for device in /sys/devices/platform/soc - do - for cpubw in $device/*cpu-cpu-ddr-bw/devfreq/*cpu-cpu-ddr-bw - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo 762 > $cpubw/min_freq - if [ ${ddr_type:4:2} == $ddr_type4 ]; then - # LPDDR4 - echo "2288 3440 4173 5195 5859 7759 10322 11863 13763" > $cpubw/bw_hwmon/mbps_zones - echo 85 > $cpubw/bw_hwmon/io_percent - fi - if [ ${ddr_type:4:2} == $ddr_type3 ]; then - # LPDDR3 - echo "1525 3440 5195 5859 7102" > $cpubw/bw_hwmon/mbps_zones - echo 34 > $cpubw/bw_hwmon/io_percent - fi - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 90 > $cpubw/bw_hwmon/decay_rate - echo 190 > $cpubw/bw_hwmon/bw_step - 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 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 - - for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor* - do - echo "compute" > $latfloor/governor - echo 10 > $latfloor/polling_interval - done - - done - - # colcoation v3 disabled - echo 0 > /proc/sys/kernel/sched_min_task_util_for_boost - echo 0 > /proc/sys/kernel/sched_min_task_util_for_colocation - - # 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 - - ;; - esac - ;; -esac - -case "$target" in - "qcs605") - - #Apply settings for qcs605 - # Set the default IRQ affinity to the silver cluster. When a - # CPU is isolated/hotplugged, the IRQ affinity is adjusted - # to one of the CPU from the default IRQ affinity mask. - echo 3f > /proc/irq/default_smp_affinity - - 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 [ -f /sys/devices/soc0/platform_subtype_id ]; then - platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id` - fi - - case "$soc_id" in - "347" ) - - # Start Host based Touch processing - case "$hw_platform" in - "Surf" | "RCM" | "QRD" ) - start_hbtp - ;; - "MTP" ) - if [ $platform_subtype_id != 5 ]; then - start_hbtp - fi - ;; - esac - - # Core control parameters on silver - 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 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster - echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres - - # Setting b.L scheduler parameters - echo 96 > /proc/sys/kernel/sched_upmigrate - echo 90 > /proc/sys/kernel/sched_downmigrate - echo 140 > /proc/sys/kernel/sched_group_upmigrate - echo 120 > /proc/sys/kernel/sched_group_downmigrate - - # 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/rate_limit_us - echo 1209600 > /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/rate_limit_us - echo 1344000 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq - echo 825600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq - - echo "0:1209600" > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms - - # Enable bus-dcvs - for cpubw in /sys/class/devfreq/*qcom,cpubw* - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo "1144 1720 2086 2929 3879 5931 6881" > $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/low_power_ceil_mbps - echo 68 > $cpubw/bw_hwmon/low_power_io_percent - echo 20 > $cpubw/bw_hwmon/low_power_delay - echo 0 > $cpubw/bw_hwmon/guard_band_mbps - echo 250 > $cpubw/bw_hwmon/up_scale - echo 1600 > $cpubw/bw_hwmon/idle_mbps - done - - #Enable mem_latency governor for DDR scaling - for memlat in /sys/class/devfreq/*qcom,memlat-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - echo 400 > $memlat/mem_latency/ratio_ceil - done - - #Enable mem_latency governor for L3 scaling - for memlat in /sys/class/devfreq/*qcom,l3-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - echo 400 > $memlat/mem_latency/ratio_ceil - done - - echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor - - # cpuset parameters - echo 0-5 > /dev/cpuset/background/cpus - echo 0-5 > /dev/cpuset/system-background/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 - echo 100 > /proc/sys/vm/swappiness - ;; - esac - ;; -esac - -case "$target" in - "apq8084") - echo 4 > /sys/module/lpm_levels/enable_low_power/l2 - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/retention/idle_enabled - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor - do - echo "cpubw_hwmon" > $devfreq_gov - done - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - echo "interactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - echo "20000 1400000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - echo 1497600 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq - echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time - echo 20 > /sys/module/cpu_boost/parameters/boost_ms - echo 1728000 > /sys/module/cpu_boost/parameters/sync_threshold - echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor - echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms - echo 1 > /dev/cpuctl/apps/cpu.notify_on_migrate - echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - echo 1 > /sys/module/msm_thermal/core_control/enabled - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown -h root.system /sys/devices/system/cpu/mfreq - chmod -h 220 /sys/devices/system/cpu/mfreq - chown -h root.system /sys/devices/system/cpu/cpu1/online - chown -h root.system /sys/devices/system/cpu/cpu2/online - chown -h root.system /sys/devices/system/cpu/cpu3/online - chmod -h 664 /sys/devices/system/cpu/cpu1/online - chmod -h 664 /sys/devices/system/cpu/cpu2/online - chmod -h 664 /sys/devices/system/cpu/cpu3/online - ;; -esac - -case "$target" in - "mpq8092") - echo 4 > /sys/module/lpm_levels/enable_low_power/l2 - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu1/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu2/retention/idle_enabled - echo 1 > /sys/module/msm_pm/modes/cpu3/retention/idle_enabled - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - echo 1 > /sys/module/msm_thermal/core_control/enabled - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown -h root.system /sys/devices/system/cpu/mfreq - chmod -h 220 /sys/devices/system/cpu/mfreq - chown -h root.system /sys/devices/system/cpu/cpu1/online - chown -h root.system /sys/devices/system/cpu/cpu2/online - chown -h root.system /sys/devices/system/cpu/cpu3/online - chmod -h 664 /sys/devices/system/cpu/cpu1/online - chmod -h 664 /sys/devices/system/cpu/cpu2/online - chmod -h 664 /sys/devices/system/cpu/cpu3/online - ;; -esac - -case "$target" in - "msm8992") - # disable thermal bcl hotplug to switch governor - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo -n disable > /sys/devices/soc.*/qcom,bcl.*/mode - bcl_hotplug_mask=`cat /sys/devices/soc.*/qcom,bcl.*/hotplug_mask` - echo 0 > /sys/devices/soc.*/qcom,bcl.*/hotplug_mask - echo -n enable > /sys/devices/soc.*/qcom,bcl.*/mode - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - # configure governor settings for little cluster - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 80000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis - echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - # online CPU4 - echo 1 > /sys/devices/system/cpu/cpu4/online - # configure governor settings for big cluster - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif - echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 1536000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 80000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis - echo 384000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - # re-enable thermal and BCL hotplug - echo 1 > /sys/module/msm_thermal/core_control/enabled - echo -n disable > /sys/devices/soc.*/qcom,bcl.*/mode - echo $bcl_hotplug_mask > /sys/devices/soc.*/qcom,bcl.*/hotplug_mask - echo $bcl_soc_hotplug_mask > /sys/devices/soc.*/qcom,bcl.*/hotplug_soc_mask - echo -n enable > /sys/devices/soc.*/qcom,bcl.*/mode - # plugin remaining A57s - echo 1 > /sys/devices/system/cpu/cpu5/online - # input boost configuration - echo 0:1248000 > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms - # Enable task migration fixups in the scheduler - echo 1 > /proc/sys/kernel/sched_migration_fixup - for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor - do - echo "bw_hwmon" > $devfreq_gov - done - #enable rps static configuration - echo 8 > /sys/class/net/rmnet_ipa0/queues/rx-0/rps_cpus - echo 30 > /proc/sys/kernel/sched_small_task - ;; -esac - -case "$target" in - "msm8994") - # ensure at most one A57 is online when thermal hotplug is disabled - echo 0 > /sys/devices/system/cpu/cpu5/online - echo 0 > /sys/devices/system/cpu/cpu6/online - echo 0 > /sys/devices/system/cpu/cpu7/online - # in case CPU4 is online, limit its frequency - echo 960000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - # Limit A57 max freq from msm_perf module in case CPU 4 is offline - echo "4:960000 5:960000 6:960000 7:960000" > /sys/module/msm_performance/parameters/cpu_max_freq - # disable thermal bcl hotplug to switch governor - echo 0 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - bcl_hotplug_mask=`cat $hotplug_mask` - echo 0 > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - bcl_soc_hotplug_mask=`cat $hotplug_soc_mask` - echo 0 > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - # configure governor settings for little cluster - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 80000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis - echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - # online CPU4 - echo 1 > /sys/devices/system/cpu/cpu4/online - # Best effort limiting for first time boot if msm_performance module is absent - echo 960000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - # configure governor settings for big cluster - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif - echo "19000 1400000:39000 1700000:19000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 1248000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 80000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis - echo 384000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - # restore A57's max - cat /sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - # re-enable thermal and BCL hotplug - echo 1 > /sys/module/msm_thermal/core_control/enabled - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n disable > $mode - done - for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask - do - echo $bcl_hotplug_mask > $hotplug_mask - done - for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask - do - echo $bcl_soc_hotplug_mask > $hotplug_soc_mask - done - for mode in /sys/devices/soc.0/qcom,bcl.*/mode - do - echo -n enable > $mode - done - # plugin remaining A57s - echo 1 > /sys/devices/system/cpu/cpu5/online - echo 1 > /sys/devices/system/cpu/cpu6/online - echo 1 > /sys/devices/system/cpu/cpu7/online - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - # Restore CPU 4 max freq from msm_performance - echo "4:4294967295 5:4294967295 6:4294967295 7:4294967295" > /sys/module/msm_performance/parameters/cpu_max_freq - # input boost configuration - echo 0:1344000 > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms - # Setting b.L scheduler parameters - echo 1 > /proc/sys/kernel/sched_migration_fixup - echo 30 > /proc/sys/kernel/sched_small_task - echo 20 > /proc/sys/kernel/sched_mostly_idle_load - echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run - echo 99 > /proc/sys/kernel/sched_upmigrate - echo 85 > /proc/sys/kernel/sched_downmigrate - echo 400000 > /proc/sys/kernel/sched_freq_inc_notify - echo 400000 > /proc/sys/kernel/sched_freq_dec_notify - #enable rps static configuration - echo 8 > /sys/class/net/rmnet_ipa0/queues/rx-0/rps_cpus - for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor - do - echo "bw_hwmon" > $devfreq_gov - done - ;; -esac - -case "$target" in - "msm8996") - # disable thermal bcl hotplug to switch governor - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo -n disable > /sys/devices/soc/soc:qcom,bcl/mode - bcl_hotplug_mask=`cat /sys/devices/soc/soc:qcom,bcl/hotplug_mask` - echo 0 > /sys/devices/soc/soc:qcom,bcl/hotplug_mask - bcl_soc_hotplug_mask=`cat /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask` - echo 0 > /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask - echo -n enable > /sys/devices/soc/soc:qcom,bcl/mode - # set sync wakee policy tunable - echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker - # configure governor settings for little cluster - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 79000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis - echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif - # online CPU2 - echo 1 > /sys/devices/system/cpu/cpu2/online - # configure governor settings for big cluster - echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_migration_notif - echo "19000 1400000:39000 1700000:19000 2100000:79000" > /sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/timer_rate - echo 1248000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/io_is_busy - echo "85 1500000:90 1800000:70 2100000:95" > /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads - echo 19000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time - echo 79000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis - echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/ignore_hispeed_on_notif - # re-enable thermal and BCL hotplug - echo 1 > /sys/module/msm_thermal/core_control/enabled - echo -n disable > /sys/devices/soc/soc:qcom,bcl/mode - echo $bcl_hotplug_mask > /sys/devices/soc/soc:qcom,bcl/hotplug_mask - echo $bcl_soc_hotplug_mask > /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask - echo -n enable > /sys/devices/soc/soc:qcom,bcl/mode - # input boost configuration - echo "0:1324800 2:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms - # Setting b.L scheduler parameters - echo 0 > /proc/sys/kernel/sched_boost - echo 1 > /proc/sys/kernel/sched_migration_fixup - echo 45 > /proc/sys/kernel/sched_downmigrate - echo 45 > /proc/sys/kernel/sched_upmigrate - echo 400000 > /proc/sys/kernel/sched_freq_inc_notify - echo 400000 > /proc/sys/kernel/sched_freq_dec_notify - echo 3 > /proc/sys/kernel/sched_spill_nr_run - echo 100 > /proc/sys/kernel/sched_init_task_load - # Enable bus-dcvs - for cpubw in /sys/class/devfreq/*qcom,cpubw* - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo 1525 > $cpubw/min_freq - echo "1525 5195 11863 13763" > $cpubw/bw_hwmon/mbps_zones - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 34 > $cpubw/bw_hwmon/io_percent - echo 20 > $cpubw/bw_hwmon/hist_memory - echo 10 > $cpubw/bw_hwmon/hyst_length - echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps - echo 34 > $cpubw/bw_hwmon/low_power_io_percent - echo 20 > $cpubw/bw_hwmon/low_power_delay - echo 0 > $cpubw/bw_hwmon/guard_band_mbps - echo 250 > $cpubw/bw_hwmon/up_scale - echo 1600 > $cpubw/bw_hwmon/idle_mbps - done - - for memlat in /sys/class/devfreq/*qcom,memlat-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - done - echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor - - soc_revision=`cat /sys/devices/soc0/revision` - if [ "$soc_revision" == "2.0" ]; then - #Disable suspend for v2.0 - echo pwr_dbg > /sys/power/wake_lock - elif [ "$soc_revision" == "2.1" ]; then - # Enable C4.D4.E4.M3 LPM modes - # Disable D3 state - echo 0 > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled - echo 0 > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled - # Disable DEF-FPC mode - echo N > /sys/module/lpm_levels/system/pwr/cpu0/fpc-def/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu1/fpc-def/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu2/fpc-def/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu3/fpc-def/idle_enabled - else - # Enable all LPMs by default - # This will enable C4, D4, D3, E4 and M3 LPMs - echo N > /sys/module/lpm_levels/parameters/sleep_disabled - fi - echo N > /sys/module/lpm_levels/parameters/sleep_disabled - # Starting io prefetcher service - start iop - - # Set Memory parameters - configure_memory_parameters - ;; -esac - -case "$target" in - "sdm845") - - # Set the default IRQ affinity to the silver cluster. When a - # CPU is isolated/hotplugged, the IRQ affinity is adjusted - # to one of the CPU from the default IRQ affinity mask. - echo f > /proc/irq/default_smp_affinity - - 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` - fi - - if [ -f /sys/devices/soc0/platform_subtype_id ]; then - platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id` - fi - - case "$soc_id" in - "321" | "341") - # Start Host based Touch processing - case "$hw_platform" in - "QRD" ) - case "$platform_subtype_id" in - "32") #QVR845 do nothing - ;; - *) - start_hbtp - ;; - esac - ;; - *) - start_hbtp - ;; - esac - ;; - esac - # Core control parameters - 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 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster - echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres - - # Setting b.L scheduler parameters - echo 95 > /proc/sys/kernel/sched_upmigrate - echo 85 > /proc/sys/kernel/sched_downmigrate - echo 100 > /proc/sys/kernel/sched_group_upmigrate - echo 95 > /proc/sys/kernel/sched_group_downmigrate - echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks - - # 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/rate_limit_us - echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/pl - echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - # configure governor settings for big cluster - echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us - echo 1574400 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/pl - echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq - echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms - # Limit the min frequency to 825MHz - echo 825000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - - # Enable oom_reaper - echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper - - # Enable bus-dcvs - for cpubw in /sys/class/devfreq/*qcom,cpubw* - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo "2288 4577 6500 8132 9155 10681" > $cpubw/bw_hwmon/mbps_zones - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 50 > $cpubw/bw_hwmon/io_percent - echo 20 > $cpubw/bw_hwmon/hist_memory - echo 10 > $cpubw/bw_hwmon/hyst_length - 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 /sys/class/devfreq/*qcom,llccbw* - do - echo "bw_hwmon" > $llccbw/governor - echo 50 > $llccbw/polling_interval - echo "1720 2929 3879 5931 6881" > $llccbw/bw_hwmon/mbps_zones - 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 0 > $llccbw/bw_hwmon/guard_band_mbps - echo 250 > $llccbw/bw_hwmon/up_scale - echo 1600 > $llccbw/bw_hwmon/idle_mbps - done - - #Enable mem_latency governor for DDR scaling - for memlat in /sys/class/devfreq/*qcom,memlat-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - echo 400 > $memlat/mem_latency/ratio_ceil - done - - #Enable mem_latency governor for L3 scaling - for memlat in /sys/class/devfreq/*qcom,l3-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - echo 400 > $memlat/mem_latency/ratio_ceil - done - - #Enable userspace governor for L3 cdsp nodes - for l3cdsp in /sys/class/devfreq/*qcom,l3-cdsp* - do - echo "userspace" > $l3cdsp/governor - chown -h system $l3cdsp/userspace/set_freq - done - - #Gold L3 ratio ceil - echo 4000 > /sys/class/devfreq/soc:qcom,l3-cpu4/mem_latency/ratio_ceil - - echo "compute" > /sys/class/devfreq/soc:qcom,mincpubw/governor - echo 10 > /sys/class/devfreq/soc:qcom,mincpubw/polling_interval - - # cpuset parameters - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/cpus - - # Turn off scheduler boost at the end - echo 0 > /proc/sys/kernel/sched_boost - # Disable CPU Retention - echo N > /sys/module/lpm_levels/L3/cpu0/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu1/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu2/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu3/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu4/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu5/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu6/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/cpu7/ret/idle_enabled - echo N > /sys/module/lpm_levels/L3/l3-dyn-ret/idle_enabled - # Turn on sleep modes. - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - echo 100 > /proc/sys/vm/swappiness - echo 120 > /proc/sys/vm/watermark_scale_factor - ;; -esac - -case "$target" in - "msmnile") - # 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 10 > /proc/sys/kernel/sched_group_downmigrate - echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks - - # cpuset parameters - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/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/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us - echo 1209600 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq - echo 576000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq - echo 1 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl - - # 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/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us - echo 1612800 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq - 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/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us - echo 1612800 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl - - # configure input boost settings - echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq - echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms - - # Disable wsf, beacause we are using efk. - # wsf Range : 1..1000 So set to bare minimum value 1. - echo 1 > /proc/sys/vm/watermark_scale_factor - - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/cpus - - # Enable oom_reaper - if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then - echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper - else - echo 1 > /proc/sys/vm/reap_mem_on_sigkill - fi - - # 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 40 > $cpubw/polling_interval - echo "2288 4577 7110 9155 12298 14236 15258" > $cpubw/bw_hwmon/mbps_zones - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 50 > $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 14236 > $cpubw/max_freq - 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 "1720 2929 3879 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones - 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 6881 > $llccbw/max_freq - 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 "1720 2929 3879 5931 6881 7980" > $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 6 > $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 userspace governor for L3 cdsp nodes - for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat - do - echo "cdspl3" > $l3cdsp/governor - done - - #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 - - #Gold 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 - - #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 - done - - 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 [ -f /sys/devices/soc0/platform_subtype_id ]; then - platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id` - fi - - case "$hw_platform" in - "MTP" | "Surf" | "RCM" ) - # Start Host based Touch processing - case "$platform_subtype_id" in - "0" | "1" | "2" | "4") - start_hbtp - ;; - esac - ;; - "HDK" ) - if [ -d /sys/kernel/hbtpsensor ] ; then - start_hbtp - fi - ;; - esac - - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - configure_memory_parameters - target_type=`getprop ro.hardware.type` - if [ "$target_type" == "automotive" ]; then - # update frequencies - configure_automotive_sku_parameters - fi - - ;; -esac - -case "$target" in - "sdmshrike") - # 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 10 > /proc/sys/kernel/sched_group_downmigrate - echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks - - # cpuset parameters - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/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/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us - echo 1209600 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq - echo 576000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq - echo 1 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl - - # 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/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/down_rate_limit_us - echo 1612800 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq - 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/up_rate_limit_us - echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/down_rate_limit_us - echo 1612800 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl - - # configure input boost settings - echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq - echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms - - # Disable wsf, beacause we are using efk. - # wsf Range : 1..1000 So set to bare minimum value 1. - echo 1 > /proc/sys/vm/watermark_scale_factor - - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/cpus - - # Enable oom_reaper - if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then - echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper - else - echo 1 > /proc/sys/vm/reap_mem_on_sigkill - fi - - # 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 40 > $cpubw/polling_interval - echo "2288 4577 7110 9155 12298 14236 15258" > $cpubw/bw_hwmon/mbps_zones - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 50 > $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 14236 > $cpubw/max_freq - 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 "1720 2929 3879 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones - 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 6881 > $llccbw/max_freq - 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 "1720 2929 3879 5931 6881 7980" > $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 6 > $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 userspace governor for L3 cdsp nodes - for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat - do - echo "cdspl3" > $l3cdsp/governor - done - - #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 - - #Gold 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 - - #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 - done - - 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 [ -f /sys/devices/soc0/platform_subtype_id ]; then - platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id` - fi - - case "$hw_platform" in - "MTP" | "Surf" | "RCM" ) - # Start Host based Touch processing - case "$platform_subtype_id" in - "0" | "1") - start_hbtp - ;; - esac - ;; - "HDK" ) - if [ -d /sys/kernel/hbtpsensor ] ; then - start_hbtp - fi - ;; - esac - - #Setting the min and max supported frequencies - reg_val=`cat /sys/devices/platform/soc/780130.qfprom/qfprom0/nvmem | od -An -t d4` - feature_id=$(((reg_val >> 20) & 0xFF)) - - #Setting the min supported frequencies - echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 1113600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 1113600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 1113600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - echo 1171200 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 1171200 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq - echo 1171200 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq - echo 1171200 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq - #setting min gpu freq to 392 MHz - echo 4 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel - if [ $feature_id == 0 ]; then - echo "feature_id is 0 for SA8185P" - - #setting max gpu freq to 530 MHz - echo 3 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel - echo {class:ddr, res:fixed, val: 1804} > /sys/kernel/debug/aop_send_message - elif [ $feature_id == 1 ]; then - echo "feature_id is 1 for SA8195P" - - #setting max gpu freq to 670 MHz - echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel - echo {class:ddr, res:fixed, val: 2092} > /sys/kernel/debug/aop_send_message - else - echo "unknown feature_id value" $feature_id - fi - - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - configure_memory_parameters - ;; -esac - -case "$target" in - "kona") - - 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 - - # cpuset parameters - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/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 [ `cat /sys/devices/soc0/revision` == "2.0" ]; then - echo 1248000 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq - else - echo 1228800 > /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 - echo "0:1324800" > /sys/devices/system/cpu/cpu_boost/input_boost_freq - echo 120 > /sys/devices/system/cpu/cpu_boost/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 - echo 1574400 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq - 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 [ `cat /sys/devices/soc0/revision` == "2.0" ]; then - echo 1632000 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq - else - echo 1612800 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq - fi - echo 1 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl - - # 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 40 > $cpubw/polling_interval - echo "4577 7110 9155 12298 14236 15258" > $cpubw/bw_hwmon/mbps_zones - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 50 > $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 14236 > $cpubw/max_freq - 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 - if [ ${ddr_type:4:2} == $ddr_type4 ]; then - echo "1720 2086 2929 3879 5161 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones - elif [ ${ddr_type:4:2} == $ddr_type5 ]; then - echo "1720 2086 2929 3879 5931 6881 7980 10437" > $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 6881 > $llccbw/max_freq - done - - for npubw in $device/*npu*-ddr-bw/devfreq/*npu*-ddr-bw - do - echo 1 > /sys/devices/virtual/npu/msm_npu/pwr - echo "bw_hwmon" > $npubw/governor - echo 40 > $npubw/polling_interval - if [ ${ddr_type:4:2} == $ddr_type4 ]; then - echo "1720 2086 2929 3879 5931 6881 7980" > $npubw/bw_hwmon/mbps_zones - elif [ ${ddr_type:4:2} == $ddr_type5 ]; then - echo "1720 2086 2929 3879 5931 6881 7980 10437" > $npubw/bw_hwmon/mbps_zones - fi - echo 4 > $npubw/bw_hwmon/sample_ms - echo 160 > $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 1600 > $npubw/bw_hwmon/idle_mbps - echo 0 > /sys/devices/virtual/npu/msm_npu/pwr - done - - for npullccbw in $device/*npu*-llcc-bw/devfreq/*npu*-llcc-bw - do - echo 1 > /sys/devices/virtual/npu/msm_npu/pwr - echo "bw_hwmon" > $npullccbw/governor - echo 40 > $npullccbw/polling_interval - echo "4577 7110 9155 12298 14236 15258" > $npullccbw/bw_hwmon/mbps_zones - echo 4 > $npullccbw/bw_hwmon/sample_ms - echo 160 > $npullccbw/bw_hwmon/io_percent - echo 20 > $npullccbw/bw_hwmon/hist_memory - echo 10 > $npullccbw/bw_hwmon/hyst_length - echo 30 > $npullccbw/bw_hwmon/down_thres - echo 0 > $npullccbw/bw_hwmon/guard_band_mbps - echo 250 > $npullccbw/bw_hwmon/up_scale - echo 1600 > $npullccbw/bw_hwmon/idle_mbps - echo 0 > /sys/devices/virtual/npu/msm_npu/pwr - done - #Enable mem_latency governor for L3 scaling - for memlat in $device/*qcom,devfreq-l3/*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/*qcom,devfreq-l3/*cdsp-l3-lat/devfreq/*cdsp-l3-lat - do - echo "cdspl3" > $l3cdsp/governor - done - - #Enable mem_latency governor for 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 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 - - #Gold L3 ratio ceil - for l3gold in $device/*qcom,devfreq-l3/*cpu4-cpu-l3-lat/devfreq/*cpu4-cpu-l3-lat - do - echo 4000 > $l3gold/mem_latency/ratio_ceil - done - - #Prime L3 ratio ceil - for l3prime in $device/*qcom,devfreq-l3/*cpu7-cpu-l3-lat/devfreq/*cpu7-cpu-l3-lat - do - echo 20000 > $l3prime/mem_latency/ratio_ceil - done - - #Enable mem_latency governor for qoslat - for qoslat in $device/*qoslat/devfreq/*qoslat - do - echo "mem_latency" > $qoslat/governor - echo 10 > $qoslat/polling_interval - echo 50 > $qoslat/mem_latency/ratio_ceil - done - done - echo N > /sys/module/lpm_levels/parameters/sleep_disabled - configure_memory_parameters - ;; -esac - -case "$target" in - "msm8998" | "apq8098_latv") - - 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 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster - echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres - - # Setting b.L scheduler parameters - echo 1 > /proc/sys/kernel/sched_migration_fixup - echo 95 > /proc/sys/kernel/sched_upmigrate - echo 90 > /proc/sys/kernel/sched_downmigrate - echo 100 > /proc/sys/kernel/sched_group_upmigrate - echo 95 > /proc/sys/kernel/sched_group_downmigrate - echo 0 > /proc/sys/kernel/sched_select_prev_cpu_us - echo 400000 > /proc/sys/kernel/sched_freq_inc_notify - echo 400000 > /proc/sys/kernel/sched_freq_dec_notify - echo 5 > /proc/sys/kernel/sched_spill_nr_run - echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill - echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker - start iop - - # disable thermal bcl hotplug to switch governor - echo 0 > /sys/module/msm_thermal/core_control/enabled - - # online CPU0 - echo 1 > /sys/devices/system/cpu/cpu0/online - # configure governor settings for little cluster - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif - echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate - echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy - echo "83 1804800:95" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads - echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time - echo 79000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis - echo 518400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif - # online CPU4 - echo 1 > /sys/devices/system/cpu/cpu4/online - # configure governor settings for big cluster - echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif - echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load - echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate - echo 1574400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy - echo "83 1939200:90 2016000:95" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads - echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time - echo 79000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis - echo 806400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq - echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif - - # re-enable thermal and BCL hotplug - echo 1 > /sys/module/msm_thermal/core_control/enabled - - # Enable input boost configuration - echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq - echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms - # Enable bus-dcvs - for cpubw in /sys/class/devfreq/*qcom,cpubw* - do - echo "bw_hwmon" > $cpubw/governor - echo 50 > $cpubw/polling_interval - echo 1525 > $cpubw/min_freq - echo "3143 5859 11863 13763" > $cpubw/bw_hwmon/mbps_zones - echo 4 > $cpubw/bw_hwmon/sample_ms - echo 34 > $cpubw/bw_hwmon/io_percent - echo 20 > $cpubw/bw_hwmon/hist_memory - echo 10 > $cpubw/bw_hwmon/hyst_length - echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps - echo 34 > $cpubw/bw_hwmon/low_power_io_percent - echo 20 > $cpubw/bw_hwmon/low_power_delay - echo 0 > $cpubw/bw_hwmon/guard_band_mbps - echo 250 > $cpubw/bw_hwmon/up_scale - echo 1600 > $cpubw/bw_hwmon/idle_mbps - done - - for memlat in /sys/class/devfreq/*qcom,memlat-cpu* - do - echo "mem_latency" > $memlat/governor - echo 10 > $memlat/polling_interval - echo 400 > $memlat/mem_latency/ratio_ceil - done - echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor - 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 [ -f /sys/devices/soc0/platform_version ]; then - platform_version=`cat /sys/devices/soc0/platform_version` - platform_major_version=$((10#${platform_version}>>16)) - fi - - if [ -f /sys/devices/soc0/platform_subtype_id ]; then - platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id` - fi - - case "$soc_id" in - "292") #msm8998 apq8098_latv - # Start Host based Touch processing - case "$hw_platform" in - "QRD") - case "$platform_subtype_id" in - "0") - start_hbtp - ;; - "16") - if [ $platform_major_version -lt 6 ]; then - start_hbtp - fi - ;; - esac - - ;; - esac - ;; - esac - - echo N > /sys/module/lpm_levels/system/pwr/cpu0/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu1/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu2/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/cpu3/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu4/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu5/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu6/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/cpu7/ret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-dynret/idle_enabled - echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-ret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/perf-l2-dynret/idle_enabled - echo N > /sys/module/lpm_levels/system/perf/perf-l2-ret/idle_enabled - echo N > /sys/module/lpm_levels/parameters/sleep_disabled - - echo 0-3 > /dev/cpuset/background/cpus - echo 0-3 > /dev/cpuset/system-background/cpus - echo 0 > /proc/sys/kernel/sched_boost - - # Set Memory parameters - configure_memory_parameters - ;; -esac - -case "$target" in - "msm8909") - - 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 - - # HMP scheduler settings for 8909 similiar to 8917 - echo 3 > /proc/sys/kernel/sched_window_stats_policy - echo 3 > /proc/sys/kernel/sched_ravg_hist_size - - echo 1 > /proc/sys/kernel/sched_restrict_tasks_spread - - echo 20 > /proc/sys/kernel/sched_small_task - echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load - echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load - - echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run - echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run - - echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle - echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle - - # Apply governor settings for 8909 - - # disable thermal core_control to update scaling_min_freq - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo 1 > /sys/devices/system/cpu/cpu0/online - echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - # enable thermal core_control now - echo 1 > /sys/module/msm_thermal/core_control/enabled - - echo "29000 1094400:49000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay - echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate - echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq - echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - echo "1 800000:85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads - echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time - echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor - - # Bring up all cores online - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - - for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor - do - echo "bw_hwmon" > $devfreq_gov - for cpu_bimc_bw_step in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/bw_step - do - echo 60 > $cpu_bimc_bw_step - done - for cpu_guard_band_mbps in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/guard_band_mbps - do - echo 30 > $cpu_guard_band_mbps - done - done - - for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent - do - echo 40 > $gpu_bimc_io_percent - done - for gpu_bimc_bw_step in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/bw_step - do - echo 60 > $gpu_bimc_bw_step - done - for gpu_bimc_guard_band_mbps in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/guard_band_mbps - do - echo 30 > $gpu_bimc_guard_band_mbps - done - - # Set Memory parameters - configure_memory_parameters - restorecon -R /sys/devices/system/cpu - ;; -esac - -case "$target" in - "msm7627_ffa" | "msm7627_surf" | "msm7627_6x") - echo 25000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - ;; -esac - -case "$target" in - "qsd8250_surf" | "qsd8250_ffa" | "qsd8650a_st1x") - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - ;; -esac - -case "$target" in - "qsd8650a_st1x") - mount -t debugfs none /sys/kernel/debug - ;; -esac - -chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate -chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor -chown -h system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - -emmc_boot=`getprop vendor.boot.emmc` -case "$emmc_boot" - in "true") - chown -h system /sys/devices/platform/rs300000a7.65536/force_sync - chown -h system /sys/devices/platform/rs300000a7.65536/sync_sts - chown -h system /sys/devices/platform/rs300100a7.65536/force_sync - chown -h system /sys/devices/platform/rs300100a7.65536/sync_sts - ;; -esac - -case "$target" in - "msm8960" | "msm8660" | "msm7630_surf") - echo 10 > /sys/devices/platform/msm_sdcc.3/idle_timeout - ;; - "msm7627a") - echo 10 > /sys/devices/platform/msm_sdcc.1/idle_timeout - ;; -esac # Post-setup services -case "$target" in - "msm8660" | "msm8960" | "msm8226" | "msm8610" | "mpq8092" ) - start mpdecision - ;; - "msm8974") - start mpdecision - echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb - ;; - "msm8909" | "msm8916" | "msm8937" | "msm8952" | "msm8953" | "msm8994" | "msm8992" | "msm8996" | "msm8998" | "sdm660" | "apq8098_latv" | "sdm845" | "sdm710" | "qcs605" |"msmnile" | "sdmshrike" |"msmsteppe" | "sm6150" | "kona" | "lito" | "trinket" | "atoll" | "bengal" ) setprop vendor.post_boot.parsed 1 - ;; - "apq8084") - rm /data/system/perfd/default_values - start mpdecision - echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb - echo 512 > /sys/block/sda/bdi/read_ahead_kb - echo 512 > /sys/block/sdb/bdi/read_ahead_kb - echo 512 > /sys/block/sdc/bdi/read_ahead_kb - echo 512 > /sys/block/sdd/bdi/read_ahead_kb - echo 512 > /sys/block/sde/bdi/read_ahead_kb - echo 512 > /sys/block/sdf/bdi/read_ahead_kb - echo 512 > /sys/block/sdg/bdi/read_ahead_kb - echo 512 > /sys/block/sdh/bdi/read_ahead_kb - ;; - "msm7627a") - 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 - case "$soc_id" in - "127" | "128" | "129") - start mpdecision - ;; - esac - ;; -esac - -# Enable Power modes and set the CPU Freq Sampling rates -case "$target" in - "msm7627a") - start qosmgrd - echo 1 > /sys/module/pm2/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm2/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm2/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm2/modes/cpu1/standalone_power_collapse/suspend_enabled - #SuspendPC: - echo 1 > /sys/module/pm2/modes/cpu0/power_collapse/suspend_enabled - #IdlePC: - echo 1 > /sys/module/pm2/modes/cpu0/power_collapse/idle_enabled - echo 25000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - ;; -esac - -# Change adj level and min_free_kbytes setting for lowmemory killer to kick in -case "$target" in - "msm7627a") - echo 0,1,2,4,9,12 > /sys/module/lowmemorykiller/parameters/adj - echo 5120 > /proc/sys/vm/min_free_kbytes - ;; -esac - -# Install AdrenoTest.apk if not already installed -if [ -f /data/prebuilt/AdrenoTest.apk ]; then - if [ ! -d /data/data/com.qualcomm.adrenotest ]; then - pm install /data/prebuilt/AdrenoTest.apk - fi -fi - -# Install SWE_Browser.apk if not already installed -if [ -f /data/prebuilt/SWE_AndroidBrowser.apk ]; then - if [ ! -d /data/data/com.android.swe.browser ]; then - pm install /data/prebuilt/SWE_AndroidBrowser.apk - fi -fi - -# Change adj level and min_free_kbytes setting for lowmemory killer to kick in -case "$target" in - "msm8660") - start qosmgrd - echo 0,1,2,4,9,12 > /sys/module/lowmemorykiller/parameters/adj - echo 5120 > /proc/sys/vm/min_free_kbytes - ;; -esac # 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+=":" @@ -5575,21 +299,3 @@ if [ -f /sys/devices/soc0/select_image ]; then 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 - -# Parse misc partition path and set property -misc_link=$(ls -l /dev/block/bootdevice/by-name/misc) -real_path=${misc_link##*>} -setprop persist.vendor.mmi.misc_dev_path $real_path diff --git a/rootdir/bin/init.qcom.sdio.sh b/rootdir/bin/init.qcom.sdio.sh deleted file mode 100644 index df77745..0000000 --- a/rootdir/bin/init.qcom.sdio.sh +++ /dev/null @@ -1,78 +0,0 @@ -#! /vendor/bin/sh - -# Copyright (c) 2010, 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. -# - -# For successful WLAN card detection, WLAN needs SDIO polling turned on. -# This script can be used to turn on/off SDIO polling on appropriate -# SDIO slot on the MSM target (e.g. slot 3 on 7x30 surf). - -arg=$1 -target=`getprop ro.board.platform` - -case "$target" in - "msm7627_6x") - echo 1 > /sys/devices/platform/msm_sdcc.1/polling - echo 1 > /sys/devices/platform/msm_sdcc.2/polling - ;; - - "msm7627_ffa") - echo 1 > /sys/devices/platform/msm_sdcc.2/polling - ;; - - "msm7627_surf") - echo 1 > /sys/devices/platform/msm_sdcc.1/polling - echo 1 > /sys/devices/platform/msm_sdcc.2/polling - ;; - - "msm7627a") - echo 1 > /sys/devices/platform/msm_sdcc.2/polling - ;; - - "msm7630_surf") - echo 1 > /sys/devices/platform/msm_sdcc.3/polling - ;; - - "msm7630_1x") - echo 1 > /sys/devices/platform/msm_sdcc.3/polling - ;; - - "msm7630_fusion") - echo 1 > /sys/devices/platform/msm_sdcc.3/polling - ;; - - "msm8660") - echo 1 > /sys/devices/platform/msm_sdcc.4/polling - ;; - - "msm8660_csfb") - echo 1 > /sys/devices/platform/msm_sdcc.4/polling - ;; -esac - -exit 0 diff --git a/rootdir/bin/init.qcom.sensors.sh b/rootdir/bin/init.qcom.sensors.sh deleted file mode 100644 index daf7de2..0000000 --- a/rootdir/bin/init.qcom.sensors.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/vendor/bin/sh -# Copyright (c) 2015,2018 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 -# -start_sensors() -{ - - chmod -h 664 /persist/sensors/sensors_settings - chown -h -R system.system /persist/sensors - start vendor.sensors.qti - - # Only for SLPI - if [ -c /dev/msm_dsps -o -c /dev/sensors ] ; then - start vendor.sensors - fi -} - -start_sensors diff --git a/rootdir/bin/init.qcom.sh b/rootdir/bin/init.qcom.sh index 02c0394..b48f971 100644 --- a/rootdir/bin/init.qcom.sh +++ b/rootdir/bin/init.qcom.sh @@ -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 diff --git a/rootdir/bin/init.qcom.usb.sh b/rootdir/bin/init.qcom.usb.sh deleted file mode 100644 index 870c487..0000000 --- a/rootdir/bin/init.qcom.usb.sh +++ /dev/null @@ -1,250 +0,0 @@ -#!/vendor/bin/sh -# Copyright (c) 2012-2018, 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. -# -# - -# Set platform variables -soc_hwplatform=`cat /sys/devices/soc0/hw_platform 2> /dev/null` -soc_machine=`cat /sys/devices/soc0/machine 2> /dev/null` -soc_machine=${soc_machine:0:2} -soc_id=`cat /sys/devices/soc0/soc_id 2> /dev/null` - -# -# Check ESOC for external modem -# -# Note: currently only a single MDM/SDX is supported -# -esoc_name=`cat /sys/bus/esoc/devices/esoc0/esoc_name 2> /dev/null` - -target=`getprop ro.board.platform` - -if [ -f /sys/class/android_usb/f_mass_storage/lun/nofua ]; then - echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua -fi - -# -# Override USB default composition -# -# If USB persist config not set, set default configuration - -fota_oem =`getprop ro.fota.oem` -debuggable=`getprop ro.debuggable` - -if [ "$(getprop persist.vendor.usb.config)" == "" -a \ - "$(getprop init.svc.vendor.usb-gadget-hal-1-0)" != "running" ]; then - if [ "$esoc_name" != "" ]; then - setprop persist.vendor.usb.config diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb - else - case "$(getprop ro.baseband)" in - "apq") - setprop persist.vendor.usb.config diag,adb - ;; - *) - case "$soc_hwplatform" in - "Dragon" | "SBC") - setprop persist.vendor.usb.config diag,adb - ;; - *) - case "$soc_machine" in - "SA") - setprop persist.vendor.usb.config diag,adb - ;; - *) - case "$target" in - "msm8996") - setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb - ;; - "msm8909") - setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb - ;; - "msm8937") - if [ -d /config/usb_gadget ]; then - setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb - else - case "$soc_id" in - "313" | "320") - setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb - ;; - *) - setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb - ;; - esac - fi - ;; - "msm8953") - if [ -d /config/usb_gadget ]; then - setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb - else - setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb - fi - ;; - "msm8998" | "sdm660" | "apq8098_latv") - setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb - ;; - "sdm845" | "sdm710") - setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb - ;; - "msmnile" | "sm6150" | "trinket" | "lito" | "atoll" | "bengal" | "curtana" | "curtanacn" | "durandal" | "excalibur" | "joyeuse" | "gram") - case "$debuggable" in - "1") - setprop persist.vendor.usb.config adb - ;; - *) - setprop persist.vendor.usb.config none - ;; - esac - ;; - *) - setprop persist.vendor.usb.config diag,adb - ;; - esac - ;; - esac - ;; - esac - ;; - esac - fi -fi - -# Start peripheral mode on primary USB controllers for Automotive platforms -case "$soc_machine" in - "SA") - if [ -f /sys/bus/platform/devices/a600000.ssusb/mode ]; then - default_mode=`cat /sys/bus/platform/devices/a600000.ssusb/mode` - case "$default_mode" in - "none") - echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode - ;; - esac - fi - ;; -esac - -# set rndis transport to BAM2BAM_IPA for 8920 and 8940 -if [ "$target" == "msm8937" ]; then - if [ ! -d /config/usb_gadget ]; then - case "$soc_id" in - "313" | "320") - echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports - ;; - *) - ;; - esac - fi -fi - -# check configfs is mounted or not -if [ -d /config/usb_gadget ]; then - # Chip-serial is used for unique MSM identification in Product string - msm_serial=`cat /sys/devices/soc0/serial_number`; - msm_serial_hex=`printf %08X $msm_serial` - machine_type=`cat /sys/devices/soc0/machine` - product_string="$machine_type-$soc_hwplatform _SN:$msm_serial_hex" - echo "$product_string" > /config/usb_gadget/g1/strings/0x409/product - - # ADB requires valid iSerialNumber; if ro.serialno is missing, use dummy - serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber 2> /dev/null` - if [ "$serialnumber" == "" ]; then - serialno=1234567 - echo $serialno > /config/usb_gadget/g1/strings/0x409/serialnumber - fi - setprop vendor.usb.configfs 1 -fi - -# -# Initialize RNDIS Diag option. If unset, set it to 'none'. -# -diag_extra=`getprop persist.vendor.usb.config.extra` -if [ "$diag_extra" == "" ]; then - setprop persist.vendor.usb.config.extra none -fi - -# enable rps cpus on msm8937 target -setprop vendor.usb.rps_mask 0 -case "$soc_id" in - "294" | "295" | "353" | "354") - setprop vendor.usb.rps_mask 40 - ;; -esac - -# -# Initialize UVC conifguration. -# -if [ -d /config/usb_gadget/g1/functions/uvc.0 ]; then - cd /config/usb_gadget/g1/functions/uvc.0 - - echo 3072 > streaming_maxpacket - echo 1 > streaming_maxburst - mkdir control/header/h - ln -s control/header/h control/class/fs/ - ln -s control/header/h control/class/ss - - mkdir -p streaming/uncompressed/u/360p - echo "666666\n1000000\n5000000\n" > streaming/uncompressed/u/360p/dwFrameInterval - - mkdir -p streaming/uncompressed/u/720p - echo 1280 > streaming/uncompressed/u/720p/wWidth - echo 720 > streaming/uncompressed/u/720p/wWidth - echo 29491200 > streaming/uncompressed/u/720p/dwMinBitRate - echo 29491200 > streaming/uncompressed/u/720p/dwMaxBitRate - echo 1843200 > streaming/uncompressed/u/720p/dwMaxVideoFrameBufferSize - echo 5000000 > streaming/uncompressed/u/720p/dwDefaultFrameInterval - echo "5000000\n" > streaming/uncompressed/u/720p/dwFrameInterval - - mkdir -p streaming/mjpeg/m/360p - echo "666666\n1000000\n5000000\n" > streaming/mjpeg/m/360p/dwFrameInterval - - mkdir -p streaming/mjpeg/m/720p - echo 1280 > streaming/mjpeg/m/720p/wWidth - echo 720 > streaming/mjpeg/m/720p/wWidth - echo 29491200 > streaming/mjpeg/m/720p/dwMinBitRate - echo 29491200 > streaming/mjpeg/m/720p/dwMaxBitRate - echo 1843200 > streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize - echo 5000000 > streaming/mjpeg/m/720p/dwDefaultFrameInterval - echo "5000000\n" > streaming/mjpeg/m/720p/dwFrameInterval - - echo 0x04 > /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmaControls - - mkdir -p streaming/h264/h/960p - echo 1920 > streaming/h264/h/960p/wWidth - echo 960 > streaming/h264/h/960p/wWidth - echo 40 > streaming/h264/h/960p/bLevelIDC - echo "333667\n" > streaming/h264/h/960p/dwFrameInterval - - mkdir -p streaming/h264/h/1920p - echo "333667\n" > streaming/h264/h/1920p/dwFrameInterval - - mkdir streaming/header/h - ln -s streaming/uncompressed/u streaming/header/h - ln -s streaming/mjpeg/m streaming/header/h - ln -s streaming/h264/h streaming/header/h - ln -s streaming/header/h streaming/class/fs/ - ln -s streaming/header/h streaming/class/hs/ - ln -s streaming/header/h streaming/class/ss/ -fi diff --git a/rootdir/bin/init.qti.fm.sh b/rootdir/bin/init.qti.fm.sh deleted file mode 100644 index 9c73685..0000000 --- a/rootdir/bin/init.qti.fm.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/vendor/bin/sh -# Copyright (c) 2019 Qualcomm Technologies, Inc. -# All Rights Reserved. -# Confidential and Proprietary - Qualcomm Technologies, Inc. -# -# Copyright (c) 2009-2011, 2015, 2017 The Linux Foundation. All rights reserved. -# - -setprop vendor.hw.fm.init 0 - -mode=`getprop vendor.hw.fm.mode` -version=199217 - -LOG_TAG="qti-fm" -LOG_NAME="${0}:" - -loge () -{ - /vendor/bin/log -t $LOG_TAG -p e "$LOG_NAME $@" -} - -logi () -{ - /vendor/bin/log -t $LOG_TAG -p i "$LOG_NAME $@" -} - -failed () -{ - loge "$1: exit code $2" - exit $2 -} - -logi "In FM shell Script" -logi "mode: $mode" -logi "Version : $version" - -#$fm_qsoc_patches -# -case $mode in - "normal") - logi "inserting the radio transport module" - echo 1 > /sys/module/radio_iris_transport/parameters/fmsmd_set - /vendor/bin/fm_qsoc_patches $version 0 - ;; - "wa_enable") - /vendor/bin/fm_qsoc_patches $version 1 - ;; - "wa_disable") - /vendor/bin/fm_qsoc_patches $version 2 - ;; - *) - logi "Shell: Default case" - /vendor/bin/fm_qsoc_patches $version 0 - ;; -esac - -exit_code_fm_qsoc_patches=$? - -case $exit_code_fm_qsoc_patches in - 0) - logi "FM QSoC calibration and firmware download succeeded" - ;; - *) - failed "FM QSoC firmware download and/or calibration failed" $exit_code_fm_qsoc_patches - ;; -esac - -setprop vendor.hw.fm.init 1 - -exit 0 diff --git a/rootdir/etc/init.msm.usb.configfs.rc b/rootdir/etc/init.msm.usb.configfs.rc deleted file mode 100644 index 0525890..0000000 --- a/rootdir/etc/init.msm.usb.configfs.rc +++ /dev/null @@ -1,1416 +0,0 @@ -# Copyright (c) 2016-2018, 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. -# - -# USB compositions -on property:sys.usb.config=none && property:sys.usb.configfs=1 - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - -on property:sys.usb.config=mass_storage && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "msc" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x2717 - write /config/usb_gadget/g1/idProduct 0xFF20 - symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f1 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb_msc" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x2717 - write /config/usb_gadget/g1/idProduct 0xFF28 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x901D - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x900E - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default composition" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9091 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,rmnet && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default comp without ADB" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9092 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,serial_cdev_nmea,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,serial_cdev_nmea,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_nmea_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9020 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/cser.nmea.1 /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:vendor.usb.tethering=true - write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${vendor.usb.rps_mask} - -on property:sys.usb.config=rndis - setprop sys.usb.config rndis,${persist.vendor.usb.config.extra} - -on property:sys.usb.config=rndis,none && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x2717 - write /config/usb_gadget/g1/idProduct 0xFF80 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,sec && property:sys.usb.configfs=1 - write /config/usb_gadget/g2/configs/b.1/strings/0x409/configuration "rndis" - rm /config/usb_gadget/g2/configs/b.1/f1 - write /config/usb_gadget/g2/idVendor 0x05C6 - write /config/usb_gadget/g2/idProduct 0xF00E - symlink /config/usb_gadget/g2/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g2/configs/b.1/f1 - write /config/usb_gadget/g2/UDC ${persist.vendor.usb.controller.secondary} - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,adb - setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb - -on property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x2717 - write /config/usb_gadget/g1/idProduct 0xFF88 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x902C - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x902D - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=rndis,serial_cdev && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90B3 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90B4 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=rndis,serial_cdev,diag && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90B5 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90B6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=mtp,diag && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x901B - symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x903A - symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x904A - write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9060 - write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,rmnet && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9083 - write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9084 - write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9081 - write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9082 - write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ncm && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0xA4A1 - symlink /config/usb_gadget/g1/functions/ncm.0 /config/usb_gadget/g1/configs/b.1/f1 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x908C - symlink /config/usb_gadget/g1/functions/ncm.0 /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9004 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb_dun" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x901f - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,rmnet,dpl && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90b7 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90b8 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,diag,dpl && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90bf - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90c0 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=ccid && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90CE - symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ccid,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90CF - symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ccid,diag && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90D0 - symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90D1 - symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,rmnet,ccid && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90D2 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90D3 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90D7 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90D8 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_dpl_rmnet" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90DD - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_dpl_rmnet_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90DE - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_qdss" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90DC - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f5 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_qdss_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90DB - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f6 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,uac2,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uac2,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90CA - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,uac2 && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x901C - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,uvc,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uvc,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uvc_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90CB - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,uvc && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uvc" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90DF - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f2 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,uac2,uvc,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uac2,uvc,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_uvc_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90CC - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,uac2,uvc && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_uvc" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90E0 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_qdss_qdss_mdm_dun_dpl_rmnet" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90E4 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_qdss_qdss_mdm_dun_dpl_rmnet_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90E5 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_qdss_qdss_mdm_dun_dpl" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90E6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_qdss_qdss_mdm_dun_dpl_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90E7 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=diag,diag_mdm,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90D9 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,rmnet && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_diag_mdm2_qdss_qdss_mdm_dun_dpl_rmnet" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90F6 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm2 /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_diag_mdm2_qdss_qdss_mdm_dun_dpl_rmnet_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90F7 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm2 /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_diag_mdm2_qdss_qdss_mdm_dun_dpl" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90F8 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm2 /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f7 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f8 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_diag_mdm2_qdss_qdss_mdm_dun_dpl_adb" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x90F9 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm2 /config/usb_gadget/g1/configs/b.1/f4 - symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5 - symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f6 - symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f7 - symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f8 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=diag,diag_mdm,ccid && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_ccid" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9045 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f3 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,adb,ccid && property:sys.usb.configfs=1 - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,adb,ccid && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_adb_ccid" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x05C6 - write /config/usb_gadget/g1/idProduct 0x9044 - symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 - symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 - symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x2717 - write /config/usb_gadget/g1/idProduct 0xFF08 - -on property:sys.usb.config=mtp && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x2717 - write /config/usb_gadget/g1/idProduct 0xFF40 - -on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x2717 - write /config/usb_gadget/g1/idProduct 0xFF48 - -on property:sys.usb.config=ptp && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x2717 - write /config/usb_gadget/g1/idProduct 0xFF10 - -on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x2717 - write /config/usb_gadget/g1/idProduct 0xFF18 - -on property:sys.usb.config=accessory && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x18d1 - write /config/usb_gadget/g1/idProduct 0x2d00 - -on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x18d1 - write /config/usb_gadget/g1/idProduct 0x2d01 - -on property:sys.usb.config=audio_source && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x18d1 - write /config/usb_gadget/g1/idProduct 0x2d02 - -on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x18d1 - write /config/usb_gadget/g1/idProduct 0x2d03 - -on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x18d1 - write /config/usb_gadget/g1/idProduct 0x2d04 - -on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x18d1 - write /config/usb_gadget/g1/idProduct 0x2d05 - -on property:sys.usb.config=midi && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x18d1 - write /config/usb_gadget/g1/idProduct 0x4ee8 - -on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x18d1 - write /config/usb_gadget/g1/idProduct 0x4ee9 - -on property:vendor.usb.eud=1 - write /config/usb_gadget/g1/configs/b.1/MaxPower 1 - write /sys/module/eud/parameters/enable 1 - write /sys/kernel/debug/pmic-votable/USB_ICL/force_active 1 - write /sys/kernel/debug/pmic-votable/USB_ICL/force_val 500 - -on property:vendor.usb.eud=0 - write /sys/kernel/debug/pmic-votable/USB_ICL/force_active 0 - write /sys/kernel/debug/pmic-votable/USB_ICL/force_val 0 - write /config/usb_gadget/g1/configs/b.1/MaxPower 0 - write /sys/module/eud/parameters/enable 0 diff --git a/rootdir/etc/init.qcom.factory.rc b/rootdir/etc/init.qcom.factory.rc deleted file mode 100644 index 6c490e4..0000000 --- a/rootdir/etc/init.qcom.factory.rc +++ /dev/null @@ -1,255 +0,0 @@ -# -# Copyright (c) 2009-2016, 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. -# - -# Define fastmmi -service fastmmi /system/bin/mmi - user root - group root - disabled - -service vendor.mmid /vendor/bin/mmid - user root - group root - disabled - -service mmi_diag /system/bin/mmi_diag - class main - user root - group root oem_2901 - disabled - -on property:vendor.sys.boot_mode=ffbm - write ${persist.vendor.mmi.misc_dev_path} "ffbm-01" - -on property:vendor.sys.boot_mode=qmmi - write ${persist.vendor.mmi.misc_dev_path} "ffbm-02" - -on property:vendor.sys.boot_mode=normal - write ${persist.vendor.mmi.misc_dev_path} "normal" - -# Creating a scratch storage on /data for factory testing. -on factory-fs && property:ro.bootmode=ffbm-00 - mount tmpfs tmpfs /data - -on factory-fs && property:ro.bootmode=ffbm-01 - mount tmpfs tmpfs /data - -# aligned the usb port with system standard, otherwise if only diag be added -# Then in QMMI mode, the whole Andoid be booted, but due to the ro.bootmode is -# not normal/unknow, then when it apply the default funcs, it will turn to MTP -# which cause the diag/Wwan/modem port all be lost in qmmi mode. Details: -# UsbDeviceManager.java---->getDefaultFunctions and trySetEnabledFunctions -on property:persist.vendor.usb.config=* - setprop persist.sys.usb.ffbm-02.func ${persist.vendor.usb.config} - -on mmi && property:ro.bootmode=ffbm-00 - # ======================================================== - # This is FFBM only settings. - # ======================================================== - #mkdir for factory data files. - mkdir /mnt/vendor/persist/FTM_AP 0750 system system - - start fastmmi - # start qcom-post-boot to set the misc partition path property value - start qcom-post-boot - start mmi_diag - -on mmi && property:ro.bootmode=ffbm-01 - # ======================================================== - # This is FFBM only settings. - # ======================================================== - #mkdir for factory data files. - mkdir /mnt/vendor/persist/FTM_AP 0750 system system - - start fastmmi - ## start qcom-post-boot to set the misc partition path property value - start qcom-post-boot - start mmi_diag - -on property:persist.vendor.usb.config=* && property:ro.bootmode=ffbm-00 - setprop sys.usb.config ${persist.vendor.usb.config} - -on property:persist.vendor.usb.config=* && property:ro.bootmode=ffbm-01 - setprop sys.usb.config ${persist.vendor.usb.config} - -on property:persist.vendor.usb.config=* && property:ro.bootmode=ffbm-02 - setprop sys.usb.config ${persist.vendor.usb.config} - -on ffbm - trigger early-fs - trigger factory-fs - trigger fs - trigger post-fs - - # Mount fstab in init.{$device}.rc by mount_all with '--late' parameter - # to only mount entries with 'latemount'. This is needed if '--early' is - # specified in the previous mount_all command on the fs stage. - # With /system mounted and properties form /system + /factory available, - # some services can be started. - trigger late-fs - - # Now we can mount /data. File encryption requires keymaster to decrypt - # /data, which in turn can only be loaded when system properties are present. - trigger post-fs-data - - # Now we can start zygote for devices with file based encryption - trigger zygote-start - - # Load persist properties and override properties (if enabled) from /data. - trigger load_persist_props_action - - # Remove a file to wake up anything waiting for firmware. - trigger firmware_mounts_complete - - trigger early-boot - trigger boot - trigger mmi - - -# ======================================================== -# Start for audio TC -# ======================================================== - -service vendor.audio_tc53 /vendor/bin/mm-audio-ftm -tc 53 - user audio - group audio - disabled - oneshot - - -service vendor.audio_tc51 /vendor/bin/mm-audio-ftm -tc 51 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc56 /vendor/bin/mm-audio-ftm -tc 56 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc222 /vendor/bin/mm-audio-ftm -tc 222 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc228 /vendor/bin/mm-audio-ftm -tc 228 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc229 /vendor/bin/mm-audio-ftm -tc 229 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc230 /vendor/bin/mm-audio-ftm -tc 230 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc225 /vendor/bin/mm-audio-ftm -tc 225 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc246 /vendor/bin/mm-audio-ftm -tc 246 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc247 /vendor/bin/mm-audio-ftm -tc 247 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc250 /vendor/bin/mm-audio-ftm -tc 250 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc251 /vendor/bin/mm-audio-ftm -tc 251 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc252 /vendor/bin/mm-audio-ftm -tc 252 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc253 /vendor/bin/mm-audio-ftm -tc 253 - user audio - group audio - disabled - oneshot - -service vendor.audio_tc11 /vendor/bin/mm-audio-ftm -tc 11 -file /data/vendor/audio/ftm_headset_mic_record.wav - user audio - group audio - disabled - oneshot - -service vendor.audio_tc101 /vendor/bin/mm-audio-ftm -tc 101 -file /data/vendor/audio/ftm_mic1_record.wav - user audio - group audio - disabled - oneshot - -service vendor.audio_tc102 /vendor/bin/mm-audio-ftm -tc 102 -file /data/vendor/audio/ftm_mic2_record.wav - user audio - group audio - disabled - oneshot - -service vendor.audio_tc103 /vendor/bin/mm-audio-ftm -tc 103 -file /data/vendor/audio/ftm_mic3_record.wav - user audio - group audio - disabled - oneshot - -service vendor.audio_tc104 /vendor/bin/mm-audio-ftm -tc 104 -file /data/vendor/audio/ftm_mic4_record.wav - user audio - group audio - disabled - oneshot - -# ======================================================== -# End for audio TC -# ======================================================== diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 51e99b8..86d27cb 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -26,10 +26,7 @@ # import /vendor/etc/init/hw/init.qcom.usb.rc -import /vendor/etc/init/hw/init.msm.usb.configfs.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 @@ -83,7 +80,10 @@ on early-boot write /sys/devices/virtual/npu/msm_npu/boot 1 write /sys/kernel/boot_slpi/boot 1 write /sys/devices/virtual/cvp/cvp/boot 1 - exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh + + write /sys/class/drm/card0-DSI-1/status "detect" + write /sys/module/drm/parameters/vblankoffdelay -1 + exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qti.can.sh # for backward compatibility @@ -437,6 +437,11 @@ on post-fs-data #Start move time data to /data/vendor once post-fs-data done start vendor.move_time_data + start vendor.qcrild + start vendor.qcrild2 + start vendor.dataqti + start vendor.dataadpl + service nqnfcinfo /system/vendor/bin/nqnfcinfo class late_start group nfc @@ -523,12 +528,6 @@ on property:sys.boot_completed=1 chown media audio /sys/kernel/wdsp0/boot chown media audio /sys/kernel/wcd_cpe0/fw_name -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 @@ -555,19 +554,7 @@ on property:vendor.bluetooth.startbtlogger=false on property:vendor.media.target.version=* setprop vendor.sys.media.target.version ${vendor.media.target.version} -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 on property:persist.env.fastdorm.enabled=true @@ -621,7 +608,6 @@ service vendor.sensors.qti /vendor/bin/sensors.qti class core user system group system - disabled # Adjust socket buffer to enlarge TCP receive window for high bandwidth # but only if ro.data.large_tcp_window_size property is set. @@ -815,16 +801,6 @@ service qcom-sh /vendor/bin/init.qcom.sh group root system radio oneshot -service vendor-sensor-sh /vendor/bin/init.qcom.sensors.sh - class core - user root - oneshot - -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 @@ -832,18 +808,6 @@ service qcom-post-boot /vendor/bin/init.qcom.post_boot.sh 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 @@ -993,7 +957,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 diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc index 5b5fe74..110c451 100644 --- a/rootdir/etc/init.qcom.usb.rc +++ b/rootdir/etc/init.qcom.usb.rc @@ -44,8 +44,6 @@ on charger symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 write /sys/class/android_usb/android0/f_ffs/aliases adb - enable vendor.qcom-usb-sh - start vendor.qcom-usb-sh setprop sys.usb.config mass_storage on boot @@ -105,1570 +103,12 @@ on boot write /sys/class/android_usb/android0/f_ffs/aliases adb setprop sys.mtp.device_type 2 setprop vendor.usb.controller ${sys.usb.controller} - enable vendor.qcom-usb-sh - -service vendor.qcom-usb-sh /vendor/bin/init.qcom.usb.sh - class core - user root - oneshot - disabled on property:persist.vendor.usb.config=* setprop persist.sys.usb.config ${persist.vendor.usb.config} -on property:sys.usb.config=* - setprop vendor.usb.mimode ${persist.sys.usb.config} - exec u:r:qti_init_shell:s0 -- /vendor/bin/init.mi.usb.sh - on boot && property:ro.boot.usbconfigfs=true setprop sys.usb.configfs 1 on property:vendor.usb.configfs=1 && property:sys.usb.configfs=0 setprop sys.usb.configfs 1 - -# Following are the parameters required for usb functionality. They provide configurable options like -# product_id/vendor id and allows specifying required functions: -# -# Required parameters: -# -# /sys/class/android_usb/android0/enable: Enables/disables usb composition -# Value: 0 (disable), 1 (enable) -# -# /sys/class/android_usb/android0/idVendor: Stores Vendor ID -# Value: 05c6 (Vendor id for Qualcomm Inc) -# -# /sys/class/android_usb/android0/idProduct: Stores Product id corresponding to usb composition -# Value: 0x9xxx for composite interface, 0xFxxx for single interface -# -# /sys/class/android_usb/android0/f_diag/clients: Stores name of clients representing a diag interface. -# Value: Passed one per interface. e.g. diag[,diag_mdm, diag_qsc, diag_mdm2] -# -# /sys/class/android_usb/android0/functions: Stores name of the function drivers used in usb composition. -# Value: Passed one per function driver. e.g. diag[,adb] -# -#Optional parameters: -# -# /sys/class/android_usb/android0/f_serial/transports: Stores type of underlying transports used to -# communicate to serial interface. -# Value: Passed one per interface. One value represents control and data transport together. -# e.g. smd[,sdio,tty,hsic] -# Only required if serial interface is present. -# -# /sys/class/android_usb/android0/f_serial/transport_names: Stores name of the underlying transports -# used to communicate to serial interface. This is used to distinguish between more than one interface -# using same transport type. -# Value: Passed one per interface. One value represents control and data transport together. -# e.g. serial_hsic[,serial_hsusb] -# Only required for transport type hsic, optional for other transport types. -# -# /sys/class/android_usb/android0/f_rmnet/transports: Stores type of underlying transports used to -# communicate to rmnet interface. -# Value: Passed two per interface as control, data transport type pair. -# e.g. smd,bam[,hsuart,hsuart] -# Only required if rmnet interface is present. -# -# /sys/class/android_usb/android0/f_rmnet/transport_names: Stores name of the underlying transports -# used to communicate to rmnet interface. This is used to distinguish between more than one interface -# using same transport type. -# Value: Passed one per interface. One value represents control and data transport together. -# e.g. rmnet_hsic[,rmnet_hsusb] -# Only required for transport type hsic, optional for other transport types. - -# USB compositions -on property:sys.usb.config=diag,serial_tty,serial_smd && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9002 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports tty,smd - write /sys/class/android_usb/android0/functions diag,serial - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_tty,serial_smd,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9020 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd,tty - write /sys/class/android_usb/android0/functions diag,adb,serial - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 901D - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/functions diag,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 900E - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/functions diag - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_bam,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9091 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9091 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam - write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_bam && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9092 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/functions diag,serial,rmnet - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9092 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam - write /sys/class/android_usb/android0/functions diag,serial,rmnet - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9025 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9026 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9025 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd,tty - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903D - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9026 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd,tty - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903E - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9037 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports sdio,smd - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd_sdio,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903B - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd - write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd_sdio,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9038 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports sdio,smd - write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd_sdio,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903C - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd - write /sys/class/android_usb/android0/functions diag,acm,rmnet_smd_sdio,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9031 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports sdio,tty - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_sdio,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903B - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty - write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_sdio,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9032 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports sdio,tty - write /sys/class/android_usb/android0/functions diag,serial,rmnet_sdio,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903C - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty - write /sys/class/android_usb/android0/functions diag,acm,rmnet_sdio,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9025 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports tty,tty - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - start vendor.port-bridge - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903D - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty - write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - start vendor.port-bridge - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9026 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports tty,tty - write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage - write /sys/class/android_usb/android0/enable 1 - start vendor.port-bridge - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903E - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty - write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9025 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd,tty - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903D - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty - write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - start vendor.port-bridge - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9026 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd,tty - write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903E - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty - write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -# RmNet using USB BAM to IPA BAM -on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9025 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd,tty - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9026 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd,tty - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_ipa,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9091 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_ipa && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9092 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,serial,rmnet - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -# Fusion 3 composition -on property:sys.usb.config=diag,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9025 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports hsic,tty - write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic - write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 - write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 - write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 - write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# Fusion 3 composition with diag_mdm and adb -on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9031 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports hsic,tty - write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic - write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 - write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 - write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 - write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# Fusion 3 composition with diag_mdm -on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9032 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports hsic,tty - write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic - write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 - write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 - write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 - write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -# Fusion 3 DSDA composition with adb -on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9065 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc - write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart - write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart - write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 - write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 - write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 - write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# Fusion 3 DSDA composition without adb -on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9066 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc - write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart - write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart - write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 - write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 - write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 - write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -# Fusion 3 DSDA2 composition with adb -on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9065 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2 - write /sys/class/android_usb/android0/f_serial/transports hsic,hsic - write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic - write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 - write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 - write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 - write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# Fusion 3 DSDA2 composition without adb -on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9066 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2 - write /sys/class/android_usb/android0/f_serial/transports hsic,hsic - write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic - write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 - write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 - write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 - write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -# Fusion PCIe composition with diag_mdm and adb -# Serial & RmNet bridged in userspace with tty and qti/ether -on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9035 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports tty - write /sys/class/android_usb/android0/f_rmnet/transports qti,ether - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# Fusion PCIe composition with diag_mdm -# Serial & RmNet bridged in userspace with tty and qti/ether -on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9036 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports tty - write /sys/class/android_usb/android0/f_rmnet/transports qti,ether - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -# Fusion HSIC/PCIe Hybrid composition with diag_mdm and adb -# RmNet is bridged over PCIe using qti,ether ctrl/data transports -on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9035 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports hsic - write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic - write /sys/class/android_usb/android0/f_rmnet/transports qti,ether - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# Fusion HSIC/PCIe Hybrid composition with diag_mdm -# RmNet is bridged over PCIe using qti,ether ctrl/data transports -on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9036 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports hsic - write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic - write /sys/class/android_usb/android0/f_rmnet/transports qti,ether - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -# Fusion PCIe composition with diag_mdm -# Serial & RmNet bridged in userspace with port bridge and qti/ether -on property:sys.usb.config=diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9036 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports char_bridge - write /sys/class/android_usb/android0/f_rmnet/transports qti,ether - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9035 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports char_bridge - write /sys/class/android_usb/android0/f_rmnet/transports qti,ether - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# Fusion 2.2 composition with diag_qsc and adb -on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9053 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc - write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# Fusion 2.2 composition with diag_qsc -on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9054 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc - write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:vendor.usb.tethering=true - write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${vendor.usb.rps_mask} - -on property:sys.usb.config=rndis - setprop sys.usb.config rndis,${persist.vendor.usb.config.extra} - -on property:sys.usb.config=rndis,none && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct F00E - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/functions rndis - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=0 - setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb - -on property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9024 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/functions rndis,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 902C - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/functions rndis,diag - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 902D - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/functions rndis,diag,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state rndis,adb - -# DPL is implemented using QDSS -on property:sys.usb.config=rndis,diag,dpl && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90BF - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions rndis,diag,qdss - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state rndis - -# DPL is implemented using QDSS -on property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90C0 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=rndis,serial_smd && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B3 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/functions rndis,serial - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,serial_smd,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B4 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/functions rndis,serial,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=rndis,serial_smd,diag && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B5 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/functions rndis,serial,diag - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,serial_smd,diag,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B6 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/functions rndis,serial,diag,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=rndis,serial_cdev,diag && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B5 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports char_bridge - write /sys/class/android_usb/android0/functions rndis,serial,diag - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B6 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports char_bridge - write /sys/class/android_usb/android0/functions rndis,serial,diag,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=rndis,diag,diag_mdm && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9041 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/functions rndis,diag - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,diag,diag_mdm,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9042 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/functions rndis,diag,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9086 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc - write /sys/class/android_usb/android0/functions rndis,diag - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state rndis - -on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9087 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc - write /sys/class/android_usb/android0/functions rndis,diag,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state rndis,adb - -on property:sys.usb.config=ptp && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 904D - write /sys/class/android_usb/android0/functions ptp - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 904E - write /sys/class/android_usb/android0/functions ptp,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct F003 - write /sys/class/android_usb/android0/functions mtp - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9039 - write /sys/class/android_usb/android0/functions mtp,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,diag && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 901B - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/functions mtp,diag - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903A - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/functions mtp,diag,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,diag,diag_mdm && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9040 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/functions mtp,diag - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,diag,diag_mdm,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 903F - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/functions mtp,diag,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9088 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc - write /sys/class/android_usb/android0/functions mtp,diag - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9089 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc - write /sys/class/android_usb/android0/functions mtp,diag,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,ccid && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9045 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/functions diag,ccid - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,ccid,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9044 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/functions diag,adb,ccid - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9015 - write /sys/class/android_usb/android0/functions adb,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -#Mass-storage only composition -on property:sys.usb.config=mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct F000 - write /sys/class/android_usb/android0/functions mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 904A - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9060 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9099 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9098 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,rmnet_bam && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9083 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,rmnet - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,rmnet_qti_bam && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9083 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,rmnet - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,rmnet_bam,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9084 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet - write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,rmnet_qti_bam,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9084 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet - write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,rmnet_ipa && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9083 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,rmnet - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,qdss,rmnet_ipa,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9084 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet - write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 909B - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,rmnet - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 909A - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet - write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90A3 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports bam,hsic - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic - write /sys/class/android_usb/android0/functions diag,qdss,rmnet - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90A2 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports bam,hsic - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic - write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet - write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9081 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions rndis,diag,qdss - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 9082 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_qdss/debug_intf 1 - write /sys/class/android_usb/android0/f_qdss/transports bam - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb - write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# same as 9025, plus data packet logging (DPL) using QDSS -on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,dpl,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90AD - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd,tty -# DPL is implemented using QDSS - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage,qdss - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -# same as 9026, plus data packet logging (DPL) -on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,dpl && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B0 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd,tty -# DPL is implemented using QDSS - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage,qdss - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90AD - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty -# DPL is implemented using QDSS - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage,qdss - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B0 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty -# DPL is implemented using QDSS - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage,qdss - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ncm && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 0525 - write /sys/class/android_usb/android0/idProduct A4A1 - write /sys/class/android_usb/android0/functions ncm - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 908C - write /sys/class/android_usb/android0/functions ncm,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=charging && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct F006 - write /sys/class/android_usb/android0/functions charging - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,dpl_qti_bam_dmux && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B7 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam - write /sys/class/android_usb/android0/f_qdss/transports qti,bam_dmux - write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,dpl_qti_bam_dmux,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B8 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam - write /sys/class/android_usb/android0/f_qdss/transports qti,bam_dmux - write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_cnss,serial_smd,serial_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B2 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_cnss - write /sys/class/android_usb/android0/f_serial/transports smd,tty - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/functions diag,diag_cnss,adb,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_cnss,serial_smd,serial_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B3 - write /sys/class/android_usb/android0/f_diag/clients diag,diag_cnss - write /sys/class/android_usb/android0/f_serial/transports smd,tty - write /sys/class/android_usb/android0/f_rmnet/transports smd,bam - write /sys/class/android_usb/android0/functions diag,diag_cnss,serial,rmnet,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=midi && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90BA - write /sys/class/android_usb/android0/functions midi - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=midi,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90BB - write /sys/class/android_usb/android0/functions midi,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_ipa,dpl && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B7 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd -# DPL is implemented using QDSS - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,serial_smd,rmnet_ipa,dpl,adb && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90B8 - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/f_serial/transports smd -# DPL is implemented using QDSS - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam - write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa - write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,adb - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,dpl_ether,mass_storage,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90AE - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports tty - write /sys/class/android_usb/android0/f_rmnet/transports qti,ether - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,ether - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_dpl - write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,qdss,mass_storage - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,dpl_ether,mass_storage - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90AF - write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm - write /sys/class/android_usb/android0/f_serial/transports tty - write /sys/class/android_usb/android0/f_rmnet/transports qti,ether - write /sys/class/android_usb/android0/f_qdss/debug_intf 0 - write /sys/class/android_usb/android0/f_qdss/transports qti,ether - write /sys/class/android_usb/android0/f_qdss/transport_names qdss_dpl - write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,adb,uac2 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90CA - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/functions diag,adb,uac2_func - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,adb,video && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90CB - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/functions diag,adb,video - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,adb,uac2,video && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 05C6 - write /sys/class/android_usb/android0/idProduct 90CC - write /sys/class/android_usb/android0/f_diag/clients diag - write /sys/class/android_usb/android0/functions diag,adb,uac2_func,video - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc index 5c5483e..437e2cc 100644 --- a/rootdir/etc/init.target.rc +++ b/rootdir/etc/init.target.rc @@ -27,10 +27,6 @@ # # -import /vendor/etc/init/init.batterysecret.rc -import init.mishow.ctl.rc -import /vendor/etc/init/init.batteryd.rc - on early-init 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 usf_dlkm pinctrl_lpi_dlkm swr_dlkm platform_dlkm hdmi_dlkm stub_dlkm wcd_core_dlkm wsa881x_dlkm bolero_cdc_dlkm wsa_macro_dlkm va_macro_dlkm rx_macro_dlkm tx_macro_dlkm wcd937x_dlkm wcd937x_slave_dlkm wcd938x_dlkm wcd938x_slave_dlkm tas2562_dlkm machine_dlkm write /proc/sys/kernel/sched_boost 1 @@ -393,10 +389,6 @@ service vendor.imsdatadaemon /system/vendor/bin/imsdatadaemon # 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