sm6250-common: rootdir: import vendor init scripts
This commit is contained in:
parent
ac2d5035c4
commit
91088f7df5
27
common.mk
27
common.mk
@ -45,6 +45,33 @@ PRODUCT_PACKAGES += \
|
||||
android.hidl.manager@1.0 \
|
||||
android.hidl.manager@1.0_system
|
||||
|
||||
# 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
|
||||
|
||||
# Overlays
|
||||
DEVICE_PACKAGE_OVERLAYS += \
|
||||
$(LOCAL_PATH)/overlay \
|
||||
|
153
rootdir/bin/init.class_main.sh
Normal file
153
rootdir/bin/init.class_main.sh
Normal file
@ -0,0 +1,153 @@
|
||||
#! /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
|
35
rootdir/bin/init.crda.sh
Normal file
35
rootdir/bin/init.crda.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#! /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
|
34
rootdir/bin/init.mdm.sh
Normal file
34
rootdir/bin/init.mdm.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#! /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
|
||||
|
7
rootdir/bin/init.mi.usb.sh
Normal file
7
rootdir/bin/init.mi.usb.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/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
|
216
rootdir/bin/init.qcom.class_core.sh
Normal file
216
rootdir/bin/init.qcom.class_core.sh
Normal file
@ -0,0 +1,216 @@
|
||||
#!/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
|
115
rootdir/bin/init.qcom.coex.sh
Normal file
115
rootdir/bin/init.qcom.coex.sh
Normal file
@ -0,0 +1,115 @@
|
||||
#! /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
|
48
rootdir/bin/init.qcom.crashdata.sh
Normal file
48
rootdir/bin/init.qcom.crashdata.sh
Normal file
@ -0,0 +1,48 @@
|
||||
#!/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
|
476
rootdir/bin/init.qcom.early_boot.sh
Normal file
476
rootdir/bin/init.qcom.early_boot.sh
Normal file
@ -0,0 +1,476 @@
|
||||
#! /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 <filename> <ownership> <permission>
|
||||
chown -h $2 $1
|
||||
chmod $3 $1
|
||||
}
|
||||
|
||||
# check for the type of driver FB or DRM
|
||||
fb_driver=/sys/class/graphics/fb0
|
||||
if [ -e "$fb_driver" ]
|
||||
then
|
||||
# check for mdp caps
|
||||
file=/sys/class/graphics/fb0/mdp/caps
|
||||
if [ -f "$file" ]
|
||||
then
|
||||
setprop vendor.gralloc.disable_ubwc 1
|
||||
cat $file | while read line; do
|
||||
case "$line" in
|
||||
*"ubwc"*)
|
||||
setprop vendor.gralloc.enable_fb_ubwc 1
|
||||
setprop vendor.gralloc.disable_ubwc 0
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
set_perms /sys/devices/virtual/hdcp/msm_hdcp/min_level_change system.graphics 0660
|
||||
fi
|
||||
|
||||
# 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
|
35
rootdir/bin/init.qcom.efs.sync.sh
Normal file
35
rootdir/bin/init.qcom.efs.sync.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#! /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
|
5595
rootdir/bin/init.qcom.post_boot.sh
Normal file
5595
rootdir/bin/init.qcom.post_boot.sh
Normal file
File diff suppressed because it is too large
Load Diff
78
rootdir/bin/init.qcom.sdio.sh
Normal file
78
rootdir/bin/init.qcom.sdio.sh
Normal file
@ -0,0 +1,78 @@
|
||||
#! /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
|
45
rootdir/bin/init.qcom.sensors.sh
Normal file
45
rootdir/bin/init.qcom.sensors.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/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
|
465
rootdir/bin/init.qcom.sh
Normal file
465
rootdir/bin/init.qcom.sh
Normal file
@ -0,0 +1,465 @@
|
||||
#! /vendor/bin/sh
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
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
|
||||
#
|
||||
if [ -f /data/vendor/modem_config/ver_info.txt ]; then
|
||||
prev_version_info=`cat /data/vendor/modem_config/ver_info.txt`
|
||||
else
|
||||
prev_version_info=""
|
||||
fi
|
||||
|
||||
cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt`
|
||||
if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
|
||||
# add W for group recursively before delete
|
||||
chmod g+w -R /data/vendor/modem_config/*
|
||||
rm -rf /data/vendor/modem_config/*
|
||||
# preserve the read only mode for all subdir and files
|
||||
cp --preserve=m -dr /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
|
||||
cp --preserve=m -d /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/modem_config/
|
||||
cp --preserve=m -d /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/
|
||||
# the group must be root, otherwise this script could not add "W" for group recursively
|
||||
chown -hR radio.root /data/vendor/modem_config/*
|
||||
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
|
250
rootdir/bin/init.qcom.usb.sh
Normal file
250
rootdir/bin/init.qcom.usb.sh
Normal file
@ -0,0 +1,250 @@
|
||||
#!/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
|
29
rootdir/bin/init.qti.chg_policy.sh
Normal file
29
rootdir/bin/init.qti.chg_policy.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#! /vendor/bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2019 Qualcomm Technologies, Inc.
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#
|
||||
# Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
#
|
||||
|
||||
export PATH=/vendor/bin
|
||||
|
||||
prefix="/sys/class/"
|
||||
#List of folder for ownership update
|
||||
arr=( "power_supply/battery/" "power_supply/usb/" "power_supply/main/" "power_supply/charge_pump_master/" "power_supply/pc_port/" "power_supply/dc/" "power_supply/bms/" "power_supply/parallel/" "usbpd/usbpd0/" "qc-vdm/" "charge_pump/" "qcom-battery/" )
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
for j in `ls "$prefix""$i"`
|
||||
do
|
||||
#skip directories to prevent possible security issues.
|
||||
if [[ -d "$prefix""$i""$j" ]]
|
||||
then
|
||||
continue
|
||||
else
|
||||
chown -h system.system "$prefix""$i""$j"
|
||||
fi
|
||||
done
|
||||
done
|
||||
setprop persist.vendor.hvdcp_opti.start 1
|
70
rootdir/bin/init.qti.fm.sh
Normal file
70
rootdir/bin/init.qti.fm.sh
Normal file
@ -0,0 +1,70 @@
|
||||
#!/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 <fm_chipVersion> <enable/disable WCM>
|
||||
#
|
||||
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
|
57
rootdir/bin/init.qti.ims.sh
Normal file
57
rootdir/bin/init.qti.ims.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2014, 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.
|
||||
#
|
||||
#
|
||||
|
||||
dir0=/data
|
||||
trigger_file=$dir0/ims_disabled
|
||||
ims_disabled=`getprop persist.vendor.ims.disabled`
|
||||
target=`getprop ro.build.product`
|
||||
|
||||
#if [ ! -e $trigger_file ]; then
|
||||
# for future use in doing conditional debugging
|
||||
#else
|
||||
#
|
||||
#fi
|
||||
echo "$ims_disabled"
|
||||
echo "$target"
|
||||
|
||||
if [ "$ims_disabled" = "0" ]; then
|
||||
echo "ims will be enabled"
|
||||
setprop vendor.service.qti.ims.enabled 1
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$ims_disabled" = "1" ] || [ "$target" = "msm8909_512" ]; then
|
||||
echo "ims is disabled"
|
||||
setprop vendor.service.qti.ims.enabled 0
|
||||
else
|
||||
echo "ims is enabled"
|
||||
setprop vendor.service.qti.ims.enabled 1
|
||||
fi
|
1416
rootdir/etc/init.msm.usb.configfs.rc
Normal file
1416
rootdir/etc/init.msm.usb.configfs.rc
Normal file
File diff suppressed because it is too large
Load Diff
255
rootdir/etc/init.qcom.factory.rc
Normal file
255
rootdir/etc/init.qcom.factory.rc
Normal file
@ -0,0 +1,255 @@
|
||||
#
|
||||
# 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
|
||||
# ========================================================
|
1164
rootdir/etc/init.qcom.rc
Normal file
1164
rootdir/etc/init.qcom.rc
Normal file
File diff suppressed because it is too large
Load Diff
1674
rootdir/etc/init.qcom.usb.rc
Normal file
1674
rootdir/etc/init.qcom.usb.rc
Normal file
File diff suppressed because it is too large
Load Diff
752
rootdir/etc/init.target.rc
Normal file
752
rootdir/etc/init.target.rc
Normal file
@ -0,0 +1,752 @@
|
||||
# Copyright (c) 2013-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.
|
||||
#
|
||||
#
|
||||
|
||||
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 audio_q6_pdr audio_q6_notifier audio_snd_event audio_apr audio_adsp_loader audio_q6 audio_native audio_usf audio_pinctrl_lpi audio_swr audio_platform audio_hdmi audio_stub audio_wcd_core audio_wsa881x audio_bolero_cdc audio_wsa_macro audio_va_macro audio_rx_macro audio_tx_macro audio_wcd937x audio_wcd937x_slave audio_wcd938x audio_wcd938x_slave audio_tas2562 audio_machine_atoll
|
||||
write /proc/sys/kernel/sched_boost 1
|
||||
mkdir /dsp 0771 media media
|
||||
mkdir /firmware 0771 system system
|
||||
mkdir /bt_firmware 0771 system system
|
||||
symlink /data/tombstones /tombstones
|
||||
|
||||
on init
|
||||
write /dev/stune/foreground/schedtune.sched_boost_no_override 1
|
||||
write /dev/stune/top-app/schedtune.sched_boost_no_override 1
|
||||
write /dev/stune/schedtune.colocate 0
|
||||
write /dev/stune/background/schedtune.colocate 0
|
||||
write /dev/stune/system-background/schedtune.colocate 0
|
||||
write /dev/stune/foreground/schedtune.colocate 0
|
||||
write /dev/stune/top-app/schedtune.colocate 1
|
||||
write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
|
||||
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
||||
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
|
||||
|
||||
on early-fs
|
||||
start vold
|
||||
|
||||
on fs
|
||||
start hwservicemanager
|
||||
mount_all /vendor/etc/fstab.qcom --early
|
||||
chown root system /mnt/vendor/persist
|
||||
chmod 0771 /mnt/vendor/persist
|
||||
restorecon_recursive /mnt/vendor/persist
|
||||
mkdir /mnt/vendor/persist/data 0700 system system
|
||||
mkdir /mnt/vendor/persist/subsys 0770 root system
|
||||
mkdir /mnt/vendor/persist/audio 0755 system system
|
||||
mkdir /mnt/vendor/persist/haptics 0755 system system
|
||||
mkdir /mnt/vendor/persist/stability 0755 system system
|
||||
mkdir /mnt/vendor/persist/misys 0755 system system
|
||||
#+ add for watermark
|
||||
mkdir /mnt/vendor/persist/camera 0777 root root
|
||||
|
||||
chmod 0664 /sys/class/thermal/thermal_message/sconfig
|
||||
chown system system /sys/class/thermal/thermal_message/sconfig
|
||||
chmod 0666 /sys/class/thermal/thermal_message/temp_state
|
||||
chown system system /sys/class/thermal/thermal_message/temp_state
|
||||
|
||||
on post-fs
|
||||
# set RLIMIT_MEMLOCK to 64MB
|
||||
setrlimit 8 67108864 67108864
|
||||
write /dev/ipa 1
|
||||
|
||||
on late-fs
|
||||
wait_for_prop hwservicemanager.ready true
|
||||
exec_start wait_for_keymaster
|
||||
mount_all /vendor/etc/fstab.qcom --late
|
||||
|
||||
service sec_nvm /vendor/bin/sec_nvm
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
|
||||
on post-fs-data
|
||||
mkdir /data/tombstones 0771 system system
|
||||
mkdir /tombstones/modem 0771 system system
|
||||
mkdir /tombstones/lpass 0771 system system
|
||||
mkdir /tombstones/wcnss 0771 system system
|
||||
mkdir /tombstones/dsps 0771 system system
|
||||
mkdir /data/vendor/hbtp 0750 system system
|
||||
mkdir /persist/qti_fp 0700 system system
|
||||
mkdir /data/vendor/nnhal 0700 system system
|
||||
mkdir /data/vendor/touchpad 0775 system system
|
||||
|
||||
mkdir /data/vendor/thermal 0771 root system
|
||||
mkdir /data/vendor/thermal/config 0771 root system
|
||||
mkdir /data/vendor/mac_addr 0771 system system
|
||||
|
||||
mkdir /data/vendor/wlan_logs 0770 system wifi
|
||||
mkdir /data/vendor/nfc 0770 nfc nfc
|
||||
# For cpusets initialize for Silver Only first and then Silver + Gold
|
||||
# Silver Only configuration cannot work with 0-7
|
||||
#Creat charger log
|
||||
mkdir /data/vendor/charge_logger 0771 system system
|
||||
|
||||
on boot
|
||||
chown system system /sys/kernel/hbtp/display_pwr
|
||||
start rmt_storage
|
||||
start rfs_access
|
||||
write /dev/cpuset/top-app/cpus 0-3
|
||||
write /dev/cpuset/foreground/cpus 0-3
|
||||
write /dev/cpuset/foreground/boost/cpus 0-3
|
||||
write /dev/cpuset/background/cpus 0-3
|
||||
write /dev/cpuset/system-background/cpus 0-3
|
||||
write /dev/cpuset/top-app/cpus 0-7
|
||||
write /dev/cpuset/foreground/cpus 0-7
|
||||
write /dev/cpuset/foreground/boost/cpus 0-7
|
||||
write /dev/cpuset/background/cpus 0-7
|
||||
write /dev/cpuset/system-background/cpus 0-7
|
||||
|
||||
#Set the vbus_offset_mv to 1.04v
|
||||
setprop persist.vendor.cp.vbus_offset_mv 1040
|
||||
|
||||
# Add a cpuset for the camera daemon
|
||||
# We want all cores for camera
|
||||
mkdir /dev/cpuset/camera-daemon
|
||||
write /dev/cpuset/camera-daemon/cpus 0-7
|
||||
write /dev/cpuset/camera-daemon/mems 0
|
||||
chown cameraserver cameraserver /dev/cpuset/camera-daemon
|
||||
chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks
|
||||
chmod 0660 /dev/cpuset/camera-daemon/tasks
|
||||
|
||||
# access permissions for fingerprint
|
||||
chown system system /sys/bus/platform/devices/soc/soc:fpc1020/irq
|
||||
chown system system /sys/bus/platform/devices/soc/soc:fpc1020/wakeup_enable
|
||||
chown system system /sys/bus/platform/devices/soc/soc:fpc1020/modalias
|
||||
chmod 0666 /dev/qseecom
|
||||
chmod 0644 /dev/goodix_fp
|
||||
chown system system /dev/goodix_fp
|
||||
|
||||
#add runin factory charging test
|
||||
chmod 0777 /sys/class/power_supply/battery/input_suspend
|
||||
chmod 0777 /sys/class/power_supply/battery/charging_enabled
|
||||
chmod 0777 /sys/class/power_supply/usb/typec_cc_orientation
|
||||
chown system system /sys/class/power_supply/battery/input_suspend
|
||||
chown system system /sys/class/power_supply/battery/charging_enabled
|
||||
chown system system /sys/class/power_supply/usb/typec_cc_orientation
|
||||
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/cali
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/cali_save
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/f0_save
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/osc_save
|
||||
chmod 0666 sys/devices/platform/soc/890000.i2c/i2c-1/1-005a/osc_cali
|
||||
|
||||
#Load WLAN driver
|
||||
insmod /vendor/lib/modules/qca_cld3_wlan.ko
|
||||
|
||||
#Load exfat driver
|
||||
insmod /vendor/lib/modules/exfat.ko
|
||||
|
||||
#USB controller configuration
|
||||
setprop vendor.usb.rndis.func.name "gsi"
|
||||
setprop vendor.usb.rmnet.func.name "gsi"
|
||||
setprop vendor.usb.rmnet.inst.name "rmnet"
|
||||
setprop vendor.usb.dpl.inst.name "dpl"
|
||||
setprop vendor.usb.qdss.inst.name "qdss"
|
||||
|
||||
#start camera server as daemon
|
||||
#service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||
# class late_start
|
||||
# user camera
|
||||
# group camera system inet input graphics
|
||||
#pd-mapper
|
||||
service vendor.pd_mapper /vendor/bin/pd-mapper
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
|
||||
#Peripheral manager
|
||||
service vendor.per_mgr /vendor/bin/pm-service
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
ioprio rt 4
|
||||
|
||||
service vendor.per_proxy /vendor/bin/pm-proxy
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
|
||||
|
||||
on property:init.svc.vendor.per_mgr=running
|
||||
start vendor.per_proxy
|
||||
|
||||
on property:sys.shutdown.requested=*
|
||||
stop vendor.per_proxy
|
||||
|
||||
on charger
|
||||
mkdir /mnt/vendor/persist
|
||||
chown root system /mnt/vendor/persist
|
||||
chmod 0771 /mnt/vendor/persist
|
||||
mkdir /mnt/vendor/persist/subsys 0770 root system
|
||||
start vendor.power_off_alarm
|
||||
setprop sys.usb.controller a600000.dwc3
|
||||
setprop sys.usb.configfs 1
|
||||
chown system system /sys/class/leds/red/brightness
|
||||
chmod 0666 /sys/class/leds/red/brightness
|
||||
mkdir /data/vendor/charge_logger 0771 system system
|
||||
start charge_logger
|
||||
start vendor.power_off_alarm
|
||||
|
||||
#Set the vbus_offset_mv to 1.04v
|
||||
setprop persist.vendor.cp.vbus_offset_mv 1040
|
||||
|
||||
on property:vendor.display.lcd_density=640
|
||||
setprop dalvik.vm.heapgrowthlimit 512m
|
||||
|
||||
on property:vendor.display.lcd_density=560
|
||||
setprop dalvik.vm.heapgrowthlimit 256m
|
||||
|
||||
on property:vendor.display.lcd_density=480
|
||||
setprop dalvik.vm.heapgrowthlimit 128m
|
||||
|
||||
on property:vendor.display.lcd_density=240
|
||||
setprop dalvik.vm.heapgrowthlimit 96m
|
||||
|
||||
on property:vendor.display.lcd_density=160
|
||||
setprop dalvik.vm.heapgrowthlimit 96m
|
||||
|
||||
## import cne init file
|
||||
#on post-fs
|
||||
# export LD_PRELOAD /vendor/lib/libNimsWrap.so
|
||||
#
|
||||
## Allow usb charging to be disabled peristently
|
||||
#on property:persist.usb.chgdisabled=1
|
||||
# write /sys/class/power_supply/battery/charging_enabled 0
|
||||
#
|
||||
#on property:persist.usb.chgdisabled=0
|
||||
# write /sys/class/power_supply/battery/charging_enabled 1
|
||||
|
||||
# add charge_logger service for dump charge message
|
||||
service charge_logger /vendor/bin/charge_logger
|
||||
class last_start
|
||||
user system
|
||||
group system system wakelock
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start charge_logger
|
||||
|
||||
#qiaojinpeng @20191118 QR_code feature
|
||||
service nv_mac /vendor/bin/nv_mac
|
||||
class late_start
|
||||
user system
|
||||
group system inet net_raw wifi
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start nv_mac
|
||||
#end
|
||||
|
||||
service vibrator_calibration /vendor/bin/vibrator_calibration
|
||||
class late_start
|
||||
user system
|
||||
group system
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start vibrator_calibration
|
||||
|
||||
service spdaemon /vendor/bin/spdaemon
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
|
||||
#service qosmgrd /system/bin/qosmgr /system/etc/qosmgr_rules.xml
|
||||
# user system
|
||||
# group system
|
||||
# disabled
|
||||
#
|
||||
|
||||
#service security-check1 /sbin/security_boot_check system
|
||||
# class core
|
||||
# oneshot
|
||||
#
|
||||
#service security-check2 /sbin/security_boot_check recovery
|
||||
# class core
|
||||
# oneshot
|
||||
#
|
||||
#service time_daemon /system/vendor/bin/time_daemon
|
||||
# class late_start
|
||||
# user root
|
||||
# group root
|
||||
|
||||
#service audiod /vendor/bin/audiod
|
||||
# class late_start
|
||||
# user system
|
||||
# group system
|
||||
#
|
||||
#service usf_tester /vendor/bin/usf_tester
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_epos /vendor/bin/usf_epos
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_gesture /vendor/bin/usf_gesture
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
|
||||
#service usf_sync_gesture /system/bin/usf_sync_gesture
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
|
||||
#service usf_p2p /system/bin/usf_p2p
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_hovering /vendor/bin/usf_hovering
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_proximity /system/bin/usf_proximity
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf-post-boot /system/vendor/bin/sh /system/etc/usf_post_boot.sh
|
||||
# class late_start
|
||||
# user root
|
||||
# disabled
|
||||
# oneshot
|
||||
#
|
||||
#on property:init.svc.bootanim=stopped
|
||||
# start usf-post-boot
|
||||
#
|
||||
#
|
||||
#on boot
|
||||
# insmod /system/lib/modules/adsprpc.ko
|
||||
# insmod /system/lib/modules/mhi.ko
|
||||
## access permission for secure touch
|
||||
# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
|
||||
# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
|
||||
# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
|
||||
# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
|
||||
#
|
||||
#
|
||||
#
|
||||
## imsqmidaemon starts with root and UID will be downgraded to RADIO.
|
||||
service vendor.imsqmidaemon /system/vendor/bin/imsqmidaemon
|
||||
class main
|
||||
user radio
|
||||
socket ims_qmid stream 0660 system radio
|
||||
group radio log diag
|
||||
|
||||
# imsdatadaemon starts with root and UID will be downgraded to RADIO.
|
||||
service vendor.imsdatadaemon /system/vendor/bin/imsdatadaemon
|
||||
class main
|
||||
user radio
|
||||
socket ims_datad stream 0660 system radio
|
||||
group radio wifi inet log diag
|
||||
disabled
|
||||
|
||||
#service mdm_helper /system/bin/mdm_helper
|
||||
# class core
|
||||
# onrestart setprop ro.service.mdm_helper_restarted "true"
|
||||
# disabled
|
||||
#
|
||||
#service mdm_helper_proxy /system/bin/mdm_helper_proxy
|
||||
# class core
|
||||
# disabled
|
||||
#
|
||||
#service mdm_launcher /system/bin/sh /init.mdm.sh
|
||||
# class main
|
||||
# oneshot
|
||||
#
|
||||
#service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||
# class late_start
|
||||
# user camera
|
||||
# group camera system inet input graphics
|
||||
#
|
||||
# Stop mdm_helper_proxy in case of shutdown
|
||||
#on property:sys.shutdown.requested=*
|
||||
# stop mdm_helper_proxy
|
||||
#
|
||||
# Stop mdm_helper_proxy on APQ target
|
||||
#on property:ro.radio.noril=yes
|
||||
# stop mdm_helper_proxy
|
||||
#
|
||||
#on property:persist.airplane.mode.pwr.svg=enabled
|
||||
# setprop ro.mdm_helper_proxy_req false
|
||||
#
|
||||
#on property:init.svc.ril-daemon=running
|
||||
# setprop ro.mdm_helper_proxy_req true
|
||||
#
|
||||
## Start mdm_helper_proxy
|
||||
#on property:ro.mdm_helper_proxy_req=true
|
||||
# start mdm_helper_proxy
|
||||
#
|
||||
## QCA1530 SoC core detect
|
||||
#service gnss-detect /system/vendor/bin/gnss.qca1530.sh detect
|
||||
# class core
|
||||
# oneshot
|
||||
#
|
||||
## QCA1530 SoC late_start group trigger
|
||||
#service gnss-init /system/vendor/bin/gnss.qca1530.sh init
|
||||
# class late_start
|
||||
# oneshot
|
||||
#
|
||||
## QCA1530 SoC Service Daemon
|
||||
#service gnss-svcd /system/vendor/bin/gnss.qca1530.sh start
|
||||
# class late_start
|
||||
# user root
|
||||
# group gps system qcom_diag diag log inet net_raw
|
||||
# disabled
|
||||
|
||||
service vendor.imsrcsservice /system/vendor/bin/imsrcsd
|
||||
class main
|
||||
user radio
|
||||
group radio diag inet log
|
||||
|
||||
on property:vendor.ims.QMI_DAEMON_STATUS=1
|
||||
start vendor.imsdatadaemon
|
||||
|
||||
#on property:vold.decrypt=trigger_restart_framework
|
||||
# start vendor.cnss_diag
|
||||
|
||||
service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
|
||||
class main
|
||||
user system
|
||||
group system wifi inet sdcard_rw media_rw diag
|
||||
disabled
|
||||
|
||||
service vendor.ims_rtp_daemon /system/vendor/bin/ims_rtp_daemon
|
||||
class main
|
||||
user radio
|
||||
group radio vendor_qti_diag inet log
|
||||
|
||||
on property:vendor.ims.DATA_DAEMON_STATUS=1
|
||||
restart vendor.ims_rtp_daemon
|
||||
|
||||
service ppd /vendor/bin/mm-pp-dpps
|
||||
class late_start
|
||||
user system
|
||||
group system graphics
|
||||
socket pps stream 0660 system system
|
||||
disabled
|
||||
|
||||
on property:init.svc.hwcomposer-2-1=stopped
|
||||
stop ppd
|
||||
|
||||
on property:init.svc.hwcomposer-2-1=running
|
||||
start ppd
|
||||
|
||||
on property:init.svc.hwcomposer-2-1=restarting
|
||||
stop ppd
|
||||
|
||||
on property:ro.boot.multisim_config=*
|
||||
setprop persist.radio.multisim.config ${ro.boot.multisim_config}
|
||||
|
||||
#service nqs /system/bin/nqs
|
||||
# class late_start
|
||||
# socket nqs_qsb_comm stream 660 system system
|
||||
# user system
|
||||
# group drmrpc
|
||||
#
|
||||
#service adsprpcd /system/vendor/bin/adsprpcd
|
||||
# class main
|
||||
# user media
|
||||
# group media
|
||||
#
|
||||
##Start picture quality tuning service
|
||||
#service vqttoolservice /system/bin/vqttoolservice
|
||||
# class late_start
|
||||
# socket vqtss stream 0660 system system
|
||||
# user system
|
||||
# group system
|
||||
|
||||
service hbtp /system/vendor/bin/hbtp_daemon
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
|
||||
service qfp-daemon /vendor/bin/qfp-daemon
|
||||
class late_start
|
||||
user system
|
||||
group system drmrpc diag input
|
||||
|
||||
service energy-awareness /system/vendor/bin/energy-awareness
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
oneshot
|
||||
|
||||
service smcinvoked /system/bin/smcinvoked
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
|
||||
# smart pa cal add by lct
|
||||
service smart-pa-cal /vendor/bin/FactoryApp -r -t 25
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:odm.pa-cal=0
|
||||
stop smart-pa-cal
|
||||
|
||||
on property:odm.pa-cal=1
|
||||
start smart-pa-cal
|
||||
|
||||
service smart-pa-test /vendor/bin/FactoryApp -f -t 25
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:odm.pa-test=0
|
||||
stop smart-pa-test
|
||||
|
||||
on property:odm.pa-test=1
|
||||
start smart-pa-test
|
||||
|
||||
service tinyhostless_loop /system/bin/tinyhostless -D 0 -P 30 -C 31 -p 256 -n 2 -c 1 -r 48000
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
# Add for mic2 to speaker loopback test lct_20190501
|
||||
service tinyhostless_spk /system/bin/tinyhostless -D 0 -P 40 -C 31 -p 256 -n 2 -c 1 -r 48000
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service loopback_spk_start /vendor/bin/loopback.sh 1 1
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service loopback_spk_stop /vendor/bin/loopback.sh 1 0
|
||||
user root
|
||||
group root audio
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:odm.loopback-spk=1
|
||||
start loopback_spk_start
|
||||
|
||||
on property:odm.loopback-spk=0
|
||||
start loopback_spk_stop
|
||||
|
||||
#add thermal call node
|
||||
|
||||
on property:odm.thermallct.isincall=1
|
||||
write /sys/class/power_supply/battery/device/thermalcall 1
|
||||
|
||||
on property:odm.thermallct.isincall=0
|
||||
write /sys/class/power_supply/battery/device/thermalcall 0
|
||||
|
||||
#2019.12.30 tianyajun add pocket mode
|
||||
on property:odm.pocket.mode.keygurad.locked=1
|
||||
write /proc/tp_palm 1
|
||||
|
||||
on property:odm.pocket.mode.keygurad.locked=0
|
||||
write /proc/tp_palm 0
|
||||
|
||||
#Add tools for wifi RF test and start by dial *#*#2008#*#* on 20191031
|
||||
service openwifi_L /vendor/bin/sh /vendor/bin/wifitest.sh
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
service closewifi_L /vendor/bin/sh /vendor/bin/wifitest_close.sh
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:odm.openwifi_L=1
|
||||
start openwifi_L
|
||||
on property:odm.closewifi_L=1
|
||||
start closewifi_L
|
||||
|
||||
service wifiFtmdaemon /vendor/bin/ftmdaemon -dd -n
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:vendor.sys.wifiFtmdaemon=1
|
||||
start wifiFtmdaemon
|
||||
on property:vendor.sys.wifiFtmdaemon=0
|
||||
stop wifiFtmdaemon
|
||||
|
||||
service myftmftm /vendor/bin/sh /vendor/bin/myftm.agent.sh
|
||||
oneshot
|
||||
disabled
|
||||
on property:vendor.sys.myftm=1
|
||||
start myftmftm
|
||||
|
||||
#End on 20191031
|
||||
|
||||
#add tools for bt RF test and start by dial *#*#2008#*#* on 20191031
|
||||
service wdsdaemon /vendor/bin/wdsdaemon -su
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:odm.start_wdsdaemon=1
|
||||
start wdsdaemon
|
||||
on property:odm.start_wdsdaemon=0
|
||||
stop wdsdaemon
|
||||
|
||||
service blueduttest /vendor/bin/sh /vendor/bin/bluedut.sh
|
||||
class late_start
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service btclose /vendor/bin/sh /vendor/bin/bt_close.sh
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:odm.closebt=1
|
||||
start btclose
|
||||
|
||||
#End on 20191031
|
||||
|
||||
#add for wifi 9434 log
|
||||
service vendor.tcpdump /system/bin/tcpdump_v2 -i any -W 2 -C 2 -s 134 -w /data/vendor/wlan_logs/tcpdump.pcap
|
||||
class main
|
||||
user root
|
||||
group root wifi inet sdcard_rw media_rw diag
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service sniffer /system/bin/tcpdump_v2 -i wlan0 -w /sdcard/wlan_logs/sniffer.pcap
|
||||
class main
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.user.0.ce_available=true
|
||||
start vendor.cnss_diag
|
||||
start vendor.tcpdump
|
||||
|
||||
service startpktlog /system/vendor/bin/iwpriv wlan0 pktlog 2
|
||||
class main
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service stoppktlog /system/vendor/bin/iwpriv wlan0 pktlog 0
|
||||
class main
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
|
||||
#lcd feature ++{
|
||||
on property:sys.display_hbm=1
|
||||
write /sys/devices/platform/soc/soc:qcom,dsi-display/dsi_display_hbm 1
|
||||
|
||||
on property:sys.display_hbm=2
|
||||
write /sys/devices/platform/soc/soc:qcom,dsi-display/dsi_display_hbm 2
|
||||
|
||||
on property:sys.display_hbm=3
|
||||
write /sys/devices/platform/soc/soc:qcom,dsi-display/dsi_display_hbm 3
|
||||
|
||||
on property:sys.display_hbm=0
|
||||
write /sys/devices/platform/soc/soc:qcom,dsi-display/dsi_display_hbm 0
|
||||
|
||||
#2019.12.02 longcheer zhaoxiangxiang add for cabc start
|
||||
on property:persist.sys.display_cabc=1
|
||||
write /sys/devices/platform/soc/soc:qcom,dsi-display/dsi_display_cabc 1
|
||||
|
||||
on property:persist.sys.display_cabc=0
|
||||
write /sys/devices/platform/soc/soc:qcom,dsi-display/dsi_display_cabc 2
|
||||
|
||||
on property:persist.sys.display_cabc_movie=1
|
||||
write /sys/devices/platform/soc/soc:qcom,dsi-display/dsi_display_cabc_movie 1
|
||||
|
||||
on property:persist.sys.display_cabc_still=1
|
||||
write /sys/devices/platform/soc/soc:qcom,dsi-display/dsi_display_cabc_still 1
|
||||
#2019.12.02 longcheer zhaoxiangxiang add for cabc end
|
||||
|
||||
#service sviswitch add begin
|
||||
service sviswitch /vendor/bin/sviswitch
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
#2019.11.27 longcheer xupengcheng edit for sunlight policy
|
||||
on property:odm.svi.enable=on
|
||||
start sviswitch
|
||||
|
||||
#2019.11.27 longcheer xupengcheng edit for sunlight policy
|
||||
on property:odm.svi.enable=off
|
||||
start sviswitch
|
||||
#service sviswitch add end
|
||||
#lcd feature ++}
|
||||
|
||||
# touch settings
|
||||
on property:vendor.tp_grip_area=90
|
||||
write /proc/tp_grip_area 90
|
||||
on property:vendor.tp_grip_area=270
|
||||
write /proc/tp_grip_area 270
|
||||
on property:vendor.tp_grip_area=0
|
||||
write /proc/tp_grip_area 0
|
||||
on property:vendor.tp_grip_area=1
|
||||
write /proc/tp_grip_area 1
|
||||
on property:vendor.tp_grip_area=180
|
||||
write /proc/tp_grip_area 180
|
||||
#2019.11.25 longcheer puqirui add for misound MIUI patch start
|
||||
service audioshell_service /vendor/bin/audioshell_service
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:ro.vendor.miui.region=*
|
||||
start audioshell_service
|
||||
#2019.11.25 longcheer puqirui add for misound MIUI patch end
|
Loading…
Reference in New Issue
Block a user