clover: commonize init.rc and init.sh files and move them to sdm660-common
This commit is contained in:
parent
3dd0b255e2
commit
f1a50f3598
25 changed files with 13 additions and 11285 deletions
26
device.mk
26
device.mk
|
@ -83,31 +83,7 @@ PRODUCT_COPY_FILES += \
|
|||
|
||||
# Ramdisk
|
||||
PRODUCT_PACKAGES += \
|
||||
init.class_main.sh \
|
||||
init.mdm.sh \
|
||||
init.qcom.class_core.sh \
|
||||
init.qcom.coex.sh \
|
||||
init.qcom.crashdata.sh \
|
||||
init.qcom.early_boot.sh \
|
||||
init.qcom.efs.sync.sh \
|
||||
init.qcom.post_boot.sh \
|
||||
init.qcom.sdio.sh \
|
||||
init.qcom.sensors.sh \
|
||||
init.qcom.sh \
|
||||
init.qcom.syspart_fixup.sh \
|
||||
init.qcom.usb.sh \
|
||||
init.qcom.wifi.sh \
|
||||
init.qti.fm.sh \
|
||||
init.qti.ims.sh \
|
||||
init.qti.qseecomd.sh
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
init.msm.usb.configfs.rc \
|
||||
init.qcom.factory.rc \
|
||||
init.qcom.rc \
|
||||
init.qcom.usb.rc \
|
||||
init.target.rc \
|
||||
ueventd.qcom.rc
|
||||
init.clover.rc
|
||||
|
||||
# Screen density
|
||||
PRODUCT_AAPT_CONFIG := large
|
||||
|
|
|
@ -1,178 +1,9 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.class_main.sh
|
||||
LOCAL_MODULE := init.clover.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.class_main.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.mdm.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.mdm.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.class_core.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.class_core.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.coex.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.coex.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.crashdata.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.crashdata.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.early_boot.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.early_boot.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.efs.sync.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.efs.sync.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.post_boot.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.post_boot.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.sdio.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.sdio.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.sensors.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.sensors.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.syspart_fixup.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.syspart_fixup.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.usb.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.usb.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.wifi.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.wifi.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qti.ims.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qti.ims.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qti.qseecomd.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qti.qseecomd.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.msm.usb.configfs.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.msm.usb.configfs.rc
|
||||
LOCAL_SRC_FILES := etc/init.clover.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.factory.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.factory.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.usb.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.usb.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.target.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.target.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ueventd.qcom.rc
|
||||
LOCAL_MODULE_STEM := ueventd.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/ueventd.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
|
|
@ -1,102 +0,0 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2013-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 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.data.mode`
|
||||
|
||||
case "$baseband" in
|
||||
"apq" | "sda" )
|
||||
setprop ro.radio.noril true
|
||||
stop ril-daemon
|
||||
start ipacm
|
||||
esac
|
||||
|
||||
case "$baseband" in
|
||||
"msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3")
|
||||
start qmuxd
|
||||
esac
|
||||
|
||||
case "$baseband" in
|
||||
"msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx")
|
||||
start ipacm
|
||||
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
|
||||
;;
|
||||
"dsda2")
|
||||
setprop persist.radio.multisim.config dsda
|
||||
esac
|
||||
|
||||
multisim=`getprop persist.radio.multisim.config`
|
||||
|
||||
if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
|
||||
start ril-daemon2
|
||||
elif [ "$multisim" = "tsts" ]; then
|
||||
start ril-daemon2
|
||||
start ril-daemon3
|
||||
fi
|
||||
|
||||
case "$datamode" in
|
||||
"tethered")
|
||||
start qti
|
||||
start port-bridge
|
||||
;;
|
||||
"concurrent")
|
||||
start qti
|
||||
start netmgrd
|
||||
start port-bridge
|
||||
;;
|
||||
*)
|
||||
start netmgrd
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
#
|
||||
# Allow persistent faking of bms
|
||||
# User needs to set fake bms charge in persist.bms.fake_batt_capacity
|
||||
#
|
||||
fake_batt_capacity=`getprop persist.bms.fake_batt_capacity`
|
||||
case "$fake_batt_capacity" in
|
||||
"") ;; #Do nothing here
|
||||
* )
|
||||
echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity
|
||||
;;
|
||||
esac
|
|
@ -1,34 +0,0 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
baseband=`getprop ro.baseband`
|
||||
if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then
|
||||
start mdm_helper
|
||||
fi
|
||||
|
|
@ -1,216 +0,0 @@
|
|||
#!/vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# Set platform variables
|
||||
target=`getprop ro.board.platform`
|
||||
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||
soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
|
||||
else
|
||||
soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
|
||||
fi
|
||||
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||
soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
|
||||
else
|
||||
soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
|
||||
fi
|
||||
if [ -f /sys/devices/soc0/platform_version ]; then
|
||||
soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
|
||||
else
|
||||
soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
|
||||
fi
|
||||
|
||||
|
||||
# Dynamic Memory Managment (DMM) provides a sys file system to the userspace
|
||||
# that can be used to plug in/out memory that has been configured as unstable.
|
||||
# This unstable memory can be in Active or In-Active State.
|
||||
# Each of which the userspace can request by writing to a sys file.
|
||||
#
|
||||
# ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This
|
||||
# property is set in the Android system properties file.
|
||||
#
|
||||
# If ro.dev.dmm.dpd.start_address is set here then the target has a memory
|
||||
# configuration that supports DynamicMemoryManagement.
|
||||
init_DMM()
|
||||
{
|
||||
block=-1
|
||||
|
||||
case "$target" in
|
||||
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm8960")
|
||||
;;
|
||||
*)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
mem="/sys/devices/system/memory"
|
||||
op=`cat $mem/movable_start_bytes`
|
||||
case "$op" in
|
||||
"0")
|
||||
log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op
|
||||
;;
|
||||
|
||||
"$mem/movable_start_bytes: No such file or directory ")
|
||||
log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op
|
||||
;;
|
||||
|
||||
*)
|
||||
log -p i -t DMM DMM available. movable_start_bytes at $op
|
||||
movable_start_bytes=0x`cat $mem/movable_start_bytes`
|
||||
block_size_bytes=0x`cat $mem/block_size_bytes`
|
||||
block=$((#${movable_start_bytes}/${block_size_bytes}))
|
||||
|
||||
chown -h system.system $mem/memory$block/state
|
||||
chown -h system.system $mem/probe
|
||||
chown -h system.system $mem/active
|
||||
chown -h system.system $mem/remove
|
||||
|
||||
case "$target" in
|
||||
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
||||
echo $movable_start_bytes > $mem/probe
|
||||
case "$?" in
|
||||
"0")
|
||||
log -p i -t DMM $movable_start_bytes to physical hotplug succeeded.
|
||||
;;
|
||||
*)
|
||||
log -p e -t DMM $movable_start_bytes to physical hotplug failed.
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
echo online > $mem/memory$block/state
|
||||
case "$?" in
|
||||
"0")
|
||||
log -p i -t DMM \'echo online\' to logical hotplug succeeded.
|
||||
;;
|
||||
*)
|
||||
log -p e -t DMM \'echo online\' to logical hotplug failed.
|
||||
return
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
setprop ro.dev.dmm.dpd.start_address $movable_start_bytes
|
||||
setprop ro.dev.dmm.dpd.block $block
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$target" in
|
||||
"msm8960")
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
# For 7X30 targets:
|
||||
# ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory
|
||||
# configuration. This is also used to indicate that the target is capable of
|
||||
# setting EBI-1 to Deep Power Down or Self Refresh.
|
||||
op=`cat $mem/low_power_memory_start_bytes`
|
||||
case "$op" in
|
||||
"0")
|
||||
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op
|
||||
;;
|
||||
"$mem/low_power_memory_start_bytes No such file or directory ")
|
||||
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op
|
||||
;;
|
||||
*)
|
||||
log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
#
|
||||
# For controlling console and shell on console on 8960 - perist.serial.enable 8960
|
||||
# On other target use default ro.debuggable property.
|
||||
#
|
||||
serial=`getprop persist.serial.enable`
|
||||
dserial=`getprop ro.debuggable`
|
||||
case "$target" in
|
||||
"msm8960")
|
||||
case "$serial" in
|
||||
"0")
|
||||
echo 0 > /sys/devices/platform/msm_serial_hsl.0/console
|
||||
;;
|
||||
"1")
|
||||
echo 1 > /sys/devices/platform/msm_serial_hsl.0/console
|
||||
start console
|
||||
;;
|
||||
*)
|
||||
case "$dserial" in
|
||||
"1")
|
||||
start console
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"msm8610" | "msm8974" | "msm8226")
|
||||
case "$serial" in
|
||||
"0")
|
||||
echo 0 > /sys/devices/f991f000.serial/console
|
||||
;;
|
||||
"1")
|
||||
echo 1 > /sys/devices/f991f000.serial/console
|
||||
start console
|
||||
;;
|
||||
*)
|
||||
case "$dserial" in
|
||||
"1")
|
||||
start console
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
case "$dserial" in
|
||||
"1")
|
||||
start console
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$target" in
|
||||
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
||||
insmod /system/lib/modules/ss_mfcinit.ko
|
||||
insmod /system/lib/modules/ss_vencoder.ko
|
||||
insmod /system/lib/modules/ss_vdecoder.ko
|
||||
chmod -h 0666 /dev/ss_mfc_reg
|
||||
chmod -h 0666 /dev/ss_vdec
|
||||
chmod -h 0666 /dev/ss_venc
|
||||
|
||||
init_DMM
|
||||
;;
|
||||
|
||||
"msm8960")
|
||||
init_DMM
|
||||
;;
|
||||
esac
|
|
@ -1,115 +0,0 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2009-2010, 2012, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
LOG_TAG="qcom-bt-wlan-coex"
|
||||
LOG_NAME="${0}:"
|
||||
|
||||
coex_pid=""
|
||||
ath_wlan_supported=`getprop wlan.driver.ath`
|
||||
|
||||
loge ()
|
||||
{
|
||||
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
logi ()
|
||||
{
|
||||
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
failed ()
|
||||
{
|
||||
loge "$1: exit code $2"
|
||||
exit $2
|
||||
}
|
||||
|
||||
start_coex ()
|
||||
{
|
||||
case "$ath_wlan_supported" in
|
||||
"2")
|
||||
echo "ATH WLAN Chip ID AR6004 is enabled"
|
||||
/system/bin/abtfilt -d -z -n -m -a -w wlan0 &
|
||||
;;
|
||||
"1")
|
||||
echo "ATH WLAN Chip ID is enabled"
|
||||
# Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter.
|
||||
/system/bin/abtfilt -d -z -n -v -q -s -w wlan0 &
|
||||
;;
|
||||
"0")
|
||||
echo "WCN WLAN Chip ID is enabled"
|
||||
# Must have -o turned on to avoid daemon (otherwise we cannot get pid)
|
||||
/system/bin/btwlancoex -o $opt_flags &
|
||||
;;
|
||||
*)
|
||||
echo "NO WLAN Chip ID is enabled, so enabling ATH as default"
|
||||
# Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter.
|
||||
/system/bin/abtfilt -d -z -n -v -q -s -w wlan0 &
|
||||
;;
|
||||
esac
|
||||
coex_pid=$!
|
||||
logi "start_coex: pid = $coex_pid"
|
||||
}
|
||||
|
||||
kill_coex ()
|
||||
{
|
||||
logi "kill_coex: pid = $coex_pid"
|
||||
kill -TERM $coex_pid
|
||||
# this shell doesn't exit now -- wait returns for normal exit
|
||||
}
|
||||
|
||||
# mimic coex options parsing -- maybe a waste of effort
|
||||
USAGE="${0} [-o] [-c] [-r] [-i] [-h]"
|
||||
|
||||
while getopts "ocrih" f
|
||||
do
|
||||
case $f in
|
||||
o | c | r | i | h) opt_flags="$opt_flags -$f" ;;
|
||||
\?) echo $USAGE; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
# init does SIGTERM on ctl.stop for service
|
||||
trap "kill_coex" TERM INT
|
||||
|
||||
#Selectively start coex module
|
||||
target=`getprop ro.board.platform`
|
||||
|
||||
if [ "$target" == "msm8960" ] && [ "$ath_wlan_supported" != "2" ]; then
|
||||
logi "btwlancoex/abtfilt is not needed"
|
||||
else
|
||||
# Build settings may not produce the coex executable
|
||||
if ls /system/bin/btwlancoex || ls /system/bin/abtfilt
|
||||
then
|
||||
start_coex
|
||||
wait $coex_pid
|
||||
logi "Coex stopped"
|
||||
else
|
||||
logi "btwlancoex/abtfilt not available"
|
||||
fi
|
||||
fi
|
||||
exit 0
|
|
@ -1,48 +0,0 @@
|
|||
#!/vendor/bin/sh
|
||||
# Copyright (c) 2017, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
abnormalcnt="persist.vendor.crash.cnt"
|
||||
|
||||
abnormal_cnt=`getprop $abnormalcnt`
|
||||
crash_detect=`getprop persist.vendor.crash.detect`
|
||||
|
||||
if [ "$abnormal_cnt" = "" ]
|
||||
then
|
||||
setprop $abnormalcnt 0
|
||||
fi
|
||||
|
||||
if [ "$crash_detect" = "true" ]
|
||||
then
|
||||
abnormal_cnt=`expr $abnormal_cnt + 1`
|
||||
setprop $abnormalcnt $abnormal_cnt
|
||||
elif [ "$crash_detect" = "false" ];then
|
||||
setprop persist.vendor.crash.detect true
|
||||
else
|
||||
setprop persist.vendor.crash.detect true
|
||||
fi
|
|
@ -1,520 +0,0 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012-2013,2016,2018 The Linux Foundation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED 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/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 ro.sf.lcd_density 320
|
||||
else
|
||||
if [ $fb_width -ge 1440 ]; then
|
||||
setprop ro.sf.lcd_density 560
|
||||
elif [ $fb_width -ge 1080 ]; then
|
||||
setprop ro.sf.lcd_density 480
|
||||
elif [ $fb_width -ge 720 ]; then
|
||||
setprop ro.sf.lcd_density 320 #for 720X1280 resolution
|
||||
elif [ $fb_width -ge 480 ]; then
|
||||
setprop ro.sf.lcd_density 240 #for 480X854 QRD resolution
|
||||
else
|
||||
setprop ro.sf.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 ro.sf.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
|
||||
;;
|
||||
|
||||
"msm8660")
|
||||
case "$soc_hwplatform" in
|
||||
"Fluid")
|
||||
setprop ro.sf.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 ro.sf.lcd_density 160
|
||||
;;
|
||||
"MTP")
|
||||
setprop ro.sf.lcd_density 240
|
||||
;;
|
||||
*)
|
||||
case "$soc_hwid" in
|
||||
"109")
|
||||
setprop ro.sf.lcd_density 160
|
||||
;;
|
||||
*)
|
||||
setprop ro.sf.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 ro.sf.lcd_density 160
|
||||
# Liquid do not have hardware navigation keys, so enable
|
||||
# Android sw navigation bar
|
||||
setprop ro.hw.nav_keys 0
|
||||
;;
|
||||
"Dragon")
|
||||
setprop ro.sf.lcd_density 240
|
||||
;;
|
||||
*)
|
||||
setprop ro.sf.lcd_density 320
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"msm8226")
|
||||
case "$soc_hwplatform" in
|
||||
*)
|
||||
setprop ro.sf.lcd_density 320
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"msm8610" | "apq8084" | "mpq8092")
|
||||
case "$soc_hwplatform" in
|
||||
*)
|
||||
setprop ro.sf.lcd_density 240
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"apq8084")
|
||||
case "$soc_hwplatform" in
|
||||
"Liquid")
|
||||
setprop ro.sf.lcd_density 320
|
||||
# Liquid do not have hardware navigation keys, so enable
|
||||
# Android sw navigation bar
|
||||
setprop ro.hw.nav_keys 0
|
||||
;;
|
||||
"SBC")
|
||||
setprop ro.sf.lcd_density 200
|
||||
# SBC do not have hardware navigation keys, so enable
|
||||
# Android sw navigation bar
|
||||
setprop qemu.hw.mainkeys 0
|
||||
;;
|
||||
*)
|
||||
setprop ro.sf.lcd_density 480
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"msm8996")
|
||||
case "$soc_hwplatform" in
|
||||
"Dragon")
|
||||
setprop ro.sf.lcd_density 240
|
||||
setprop qemu.hw.mainkeys 0
|
||||
;;
|
||||
"ADP")
|
||||
setprop ro.sf.lcd_density 160
|
||||
setprop qemu.hw.mainkeys 0
|
||||
;;
|
||||
"SBC")
|
||||
setprop ro.sf.lcd_density 240
|
||||
setprop qemu.hw.mainkeys 0
|
||||
;;
|
||||
*)
|
||||
setprop ro.sf.lcd_density 560
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"msm8937" | "msm8940")
|
||||
# Set ro.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 ro.opengles.version 196610
|
||||
;;
|
||||
303|307|308|309|320)
|
||||
# Vulkan is not supported for 8917 variants
|
||||
setprop ro.opengles.version 196608
|
||||
setprop persist.graphics.vulkan.disable true
|
||||
;;
|
||||
*)
|
||||
setprop ro.opengles.version 196608
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"msm8909")
|
||||
case "$soc_hwplatform" in
|
||||
*)
|
||||
setprop persist.graphics.vulkan.disable true
|
||||
setprop ro.opengles.version 196608
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"msm8916")
|
||||
case "$soc_hwplatform" in
|
||||
*)
|
||||
setprop persist.graphics.vulkan.disable true
|
||||
setprop ro.opengles.version 196608
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"msm8998" | "apq8098_latv")
|
||||
case "$soc_hwplatform" in
|
||||
*)
|
||||
setprop ro.sf.lcd_density 560
|
||||
if [ ! -e /dev/kgsl-3d0 ]; then
|
||||
setprop persist.sys.force_sw_gles 1
|
||||
setprop sdm.idle_time 0
|
||||
else
|
||||
setprop persist.sys.force_sw_gles 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "$soc_hwid" in
|
||||
"319") #apq8098_latv
|
||||
echo "\n==Loading ALX module==\n"
|
||||
insmod /system/lib/modules/alx.ko
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"sdm845")
|
||||
case "$soc_hwplatform" in
|
||||
*)
|
||||
setprop ro.sf.lcd_density 560
|
||||
if [ ! -e /dev/kgsl-3d0 ]; then
|
||||
setprop persist.sys.force_sw_gles 1
|
||||
setprop sdm.idle_time 0
|
||||
else
|
||||
setprop persist.sys.force_sw_gles 0
|
||||
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 media.msm8953.version 1
|
||||
fi
|
||||
;;
|
||||
"msm8952")
|
||||
case "$soc_hwid" in
|
||||
278)
|
||||
setprop media.msm8956hw 1
|
||||
if [ -f /sys/devices/soc0/platform_version ]; then
|
||||
hw_ver=`cat /sys/devices/soc.0/1d00000.qcom,vidc/version` 2> /dev/null
|
||||
if [ $hw_ver -eq 1 ]; then
|
||||
setprop media.msm8956.version 1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
266|277)
|
||||
setprop media.msm8956hw 1
|
||||
if [ -f /sys/devices/soc0/platform_version ]; then
|
||||
hw_ver=`cat /sys/devices/soc.0/1d00000.qcom,vidc/version` 2> /dev/null
|
||||
if [ $hw_ver -eq 1 ]; then
|
||||
setprop media.msm8956.version 1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
264)
|
||||
setprop persist.graphics.vulkan.disable true
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -f /firmware/verinfo/ver_info.txt ]; then
|
||||
# In mpss AT version is greater than 3.1, need
|
||||
# to use the new vendor-ril which supports L+L feature
|
||||
# otherwise use the existing old one.
|
||||
modem=`cat /firmware/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 /firmware/verinfo/ver_info.txt |
|
||||
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||
sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1`
|
||||
if [ ! -z $version ]; then
|
||||
zygote=`getprop ro.zygote`
|
||||
case "$zygote" in
|
||||
"zygote64_32")
|
||||
if [ "$version" \< "3.1" ]; then
|
||||
setprop vendor.rild.libpath "/vendor/lib64/libril-qc-qmi-1.so"
|
||||
else
|
||||
setprop vendor.rild.libpath "/vendor/lib64/libril-qc-hal-qmi.so"
|
||||
fi
|
||||
;;
|
||||
"zygote32")
|
||||
if [ "$version" \< "3.1" ]; then
|
||||
echo "legacy qmi load for TA less than 3.1"
|
||||
setprop vendor.rild.libpath "/vendor/lib/libril-qc-qmi-1.so"
|
||||
else
|
||||
setprop vendor.rild.libpath "/vendor/lib/libril-qc-hal-qmi.so"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# In mpss TA version is greater than 3.0, need
|
||||
# to use the new vendor-ril which supports L+L feature
|
||||
# otherwise use the existing old one.
|
||||
elif [ "$modem" = "TA" ]; then
|
||||
version=`cat /firmware/verinfo/ver_info.txt |
|
||||
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||
sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1`
|
||||
if [ ! -z $version ]; then
|
||||
zygote=`getprop ro.zygote`
|
||||
case "$zygote" in
|
||||
"zygote64_32")
|
||||
if [ "$version" \< "3.0" ]; then
|
||||
setprop vendor.rild.libpath "/vendor/lib64/libril-qc-qmi-1.so"
|
||||
else
|
||||
setprop vendor.rild.libpath "/vendor/lib64/libril-qc-hal-qmi.so"
|
||||
fi
|
||||
;;
|
||||
"zygote32")
|
||||
if [ "$version" \< "3.0" ]; then
|
||||
setprop vendor.rild.libpath "/vendor/lib/libril-qc-qmi-1.so"
|
||||
else
|
||||
setprop vendor.rild.libpath "/vendor/lib/libril-qc-hal-qmi.so"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi;
|
||||
fi
|
||||
|
||||
baseband=`getprop ro.baseband`
|
||||
#enable atfwd daemon all targets except sda, apq, qcs
|
||||
case "$baseband" in
|
||||
"apq" | "sda" | "qcs" )
|
||||
setprop persist.radio.atfwd.start false;;
|
||||
*)
|
||||
setprop persist.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
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
function setHDMIPermission() {
|
||||
file=/sys/class/graphics/fb$1
|
||||
dev_file=/dev/graphics/fb$1
|
||||
dev_gfx_hdmi=/devices/virtual/switch/hdmi
|
||||
|
||||
set_perms $file/hpd system.graphics 0664
|
||||
set_perms $file/res_info system.graphics 0664
|
||||
set_perms $file/vendor_name system.graphics 0664
|
||||
set_perms $file/product_description system.graphics 0664
|
||||
set_perms $file/video_mode system.graphics 0664
|
||||
set_perms $file/format_3d system.graphics 0664
|
||||
set_perms $file/s3d_mode system.graphics 0664
|
||||
set_perms $file/dynamic_fps system.graphics 0664
|
||||
set_perms $file/msm_fb_dfps_mode system.graphics 0664
|
||||
set_perms $file/hdr_stream system.graphics 0664
|
||||
set_perms $file/cec/enable system.graphics 0664
|
||||
set_perms $file/cec/logical_addr system.graphics 0664
|
||||
set_perms $file/cec/rd_msg system.graphics 0664
|
||||
set_perms $file/pa system.graphics 0664
|
||||
set_perms $file/cec/wr_msg system.graphics 0600
|
||||
set_perms $file/hdcp/tp system.graphics 0664
|
||||
set_perms $file/hdmi_audio_cb audioserver.audio 0600
|
||||
set_perms $file/pll_enable system.graphics 0664
|
||||
set_perms $file/hdmi_ppm system.graphics 0664
|
||||
|
||||
ln -s $dev_file $dev_gfx_hdmi
|
||||
}
|
||||
|
||||
# check for the type of driver FB or DRM
|
||||
fb_driver=/sys/class/graphics/fb0
|
||||
if [ -e "$fb_driver" ]
|
||||
then
|
||||
# check for HDMI connection
|
||||
for fb_cnt in 0 1 2 3
|
||||
do
|
||||
file=/sys/class/graphics/fb$fb_cnt/msm_fb_panel_info
|
||||
if [ -f "$file" ]
|
||||
then
|
||||
cat $file | while read line; do
|
||||
case "$line" in
|
||||
*"is_pluggable"*)
|
||||
case "$line" in
|
||||
*"1"*)
|
||||
setHDMIPermission $fb_cnt
|
||||
esac
|
||||
esac
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
# check for mdp caps
|
||||
file=/sys/class/graphics/fb0/mdp/caps
|
||||
if [ -f "$file" ]
|
||||
then
|
||||
setprop debug.gralloc.gfx_ubwc_disable 1
|
||||
cat $file | while read line; do
|
||||
case "$line" in
|
||||
*"ubwc"*)
|
||||
setprop debug.gralloc.enable_fb_ubwc 1
|
||||
setprop debug.gralloc.gfx_ubwc_disable 0
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
file=/sys/class/graphics/fb0
|
||||
if [ -d "$file" ]
|
||||
then
|
||||
set_perms $file/idle_time system.graphics 0664
|
||||
set_perms $file/dynamic_fps system.graphics 0664
|
||||
set_perms $file/dyn_pu system.graphics 0664
|
||||
set_perms $file/modes system.graphics 0664
|
||||
set_perms $file/mode system.graphics 0664
|
||||
set_perms $file/msm_cmd_autorefresh_en system.graphics 0664
|
||||
fi
|
||||
|
||||
# set lineptr permissions for all displays
|
||||
for fb_cnt in 0 1 2 3
|
||||
do
|
||||
file=/sys/class/graphics/fb$fb_cnt
|
||||
if [ -f "$file/lineptr_value" ]; then
|
||||
set_perms $file/lineptr_value system.graphics 0664
|
||||
fi
|
||||
if [ -f "$file/msm_fb_persist_mode" ]; then
|
||||
set_perms $file/msm_fb_persist_mode system.graphics 0664
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
boot_reason=`cat /proc/sys/kernel/boot_reason`
|
||||
reboot_reason=`getprop ro.boot.alarmboot`
|
||||
power_off_alarm_file=`cat /persist/alarm/powerOffAlarmSet`
|
||||
if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then
|
||||
if [ "$power_off_alarm_file" = "1" ]
|
||||
then
|
||||
setprop ro.alarm_boot true
|
||||
setprop debug.sf.nobootanimation 1
|
||||
fi
|
||||
else
|
||||
setprop ro.alarm_boot false
|
||||
fi
|
||||
|
||||
# copy GPU frequencies to system 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 ro.gpu.available_frequencies "$gpu_freq"
|
||||
fi
|
|
@ -1,35 +0,0 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
#
|
||||
|
||||
PATH=/system/bin:$PATH
|
||||
export PATH
|
||||
cat /sys/devices/platform/rs300000a7.65536/force_sync
|
||||
cat /sys/devices/platform/rs300100a7.65536/force_sync
|
File diff suppressed because it is too large
Load diff
|
@ -1,78 +0,0 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2010, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# For successful WLAN card detection, WLAN needs SDIO polling turned on.
|
||||
# This script can be used to turn on/off SDIO polling on appropriate
|
||||
# SDIO slot on the MSM target (e.g. slot 3 on 7x30 surf).
|
||||
|
||||
arg=$1
|
||||
target=`getprop ro.board.platform`
|
||||
|
||||
case "$target" in
|
||||
"msm7627_6x")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.1/polling
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
|
||||
;;
|
||||
|
||||
"msm7627_ffa")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
|
||||
;;
|
||||
|
||||
"msm7627_surf")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.1/polling
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
|
||||
;;
|
||||
|
||||
"msm7627a")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
|
||||
;;
|
||||
|
||||
"msm7630_surf")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.3/polling
|
||||
;;
|
||||
|
||||
"msm7630_1x")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.3/polling
|
||||
;;
|
||||
|
||||
"msm7630_fusion")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.3/polling
|
||||
;;
|
||||
|
||||
"msm8660")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.4/polling
|
||||
;;
|
||||
|
||||
"msm8660_csfb")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.4/polling
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
|
@ -1,461 +0,0 @@
|
|||
#! /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 /system/vendor/bin/msm_irqbalance ]; then
|
||||
case "$platformid" in
|
||||
"239" | "293" | "294" | "295" | "304" | "313" | "338" | "351" | "353" | "354" | "363" | "364")
|
||||
start vendor.msm_irqbalance;;
|
||||
"349" | "350" )
|
||||
start vendor.msm_irqbal_lb;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
start_msm_irqbalance_8952()
|
||||
{
|
||||
if [ -f /system/vendor/bin/msm_irqbalance ]; then
|
||||
case "$platformid" in
|
||||
"241" | "263" | "264" | "268" | "269" | "270" | "271")
|
||||
start vendor.msm_irqbalance;;
|
||||
esac
|
||||
case "$platformid" in
|
||||
"266" | "274" | "277" | "278")
|
||||
start vendor.msm_irqbal_lb;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
start_msm_irqbalance660()
|
||||
{
|
||||
if [ -f /vendor/bin/msm_irqbalance ]; then
|
||||
case "$platformid" in
|
||||
"317" | "324" | "325" | "326" | "345" | "346")
|
||||
start vendor.msm_irqbalance;;
|
||||
"318" | "327")
|
||||
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")
|
||||
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
|
||||
;;
|
||||
"msm8952")
|
||||
start_msm_irqbalance_8952
|
||||
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
|
||||
"264")
|
||||
case "$hw_platform" in
|
||||
"Surf")
|
||||
case "$platform_subtype_id" in
|
||||
"1" | "2")
|
||||
setprop qemu.hw.mainkeys 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"MTP")
|
||||
case "$platform_subtype_id" in
|
||||
"3")
|
||||
setprop qemu.hw.mainkeys 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"QRD")
|
||||
case "$platform_subtype_id" in
|
||||
"0")
|
||||
setprop qemu.hw.mainkeys 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"266" | "274" | "277" | "278")
|
||||
case "$hw_platform" in
|
||||
"Surf" | "RCM")
|
||||
if [ $panel_xres -eq 1440 ]; then
|
||||
setprop qemu.hw.mainkeys 0
|
||||
fi
|
||||
;;
|
||||
"MTP" | "QRD")
|
||||
setprop qemu.hw.mainkeys 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"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
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Make modem config folder and copy firmware config to that folder for RIL
|
||||
#
|
||||
if [ -f /data/vendor/radio/ver_info.txt ]; then
|
||||
prev_version_info=`cat /data/vendor/radio/ver_info.txt`
|
||||
else
|
||||
prev_version_info=""
|
||||
fi
|
||||
|
||||
cur_version_info=`cat /firmware/verinfo/ver_info.txt`
|
||||
if [ ! -f /firmware/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
|
||||
rm -rf /data/vendor/radio/modem_config
|
||||
mkdir /data/vendor/radio/modem_config
|
||||
chmod 770 /data/vendor/radio/modem_config
|
||||
cp -r /firmware/image/modem_pr/mcfg/configs/* /data/vendor/radio/modem_config
|
||||
chown -hR radio.radio /data/vendor/radio/modem_config
|
||||
cp /firmware/verinfo/ver_info.txt /data/vendor/radio/ver_info.txt
|
||||
chown radio.radio /data/vendor/radio/ver_info.txt
|
||||
fi
|
||||
cp /firmware/image/modem_pr/mbn_ota.txt /data/vendor/radio/modem_config
|
||||
chown radio.radio /data/vendor/radio/modem_config/mbn_ota.txt
|
||||
echo 1 > /data/vendor/radio/copy_complete
|
||||
|
||||
#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
|
|
@ -1,80 +0,0 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
target="$1"
|
||||
serial="$2"
|
||||
|
||||
# No path is set up at this point so we have to do it here.
|
||||
PATH=/sbin:/system/sbin:/system/bin:/system/xbin
|
||||
export PATH
|
||||
|
||||
mount_needed=false;
|
||||
|
||||
if [ ! -f /system/etc/boot_fixup ];then
|
||||
# This should be the first command
|
||||
# remount system as read-write.
|
||||
mount -o rw,remount,barrier=1 /system
|
||||
mount_needed=true;
|
||||
fi
|
||||
|
||||
# **** WARNING *****
|
||||
# This runs in a single-threaded, critical path portion
|
||||
# of the Android bootup sequence. This is to guarantee
|
||||
# all necessary system partition fixups are done before
|
||||
# the rest of the system starts up. Run any non-
|
||||
# timing critical tasks in a separate process to
|
||||
# prevent slowdown at boot.
|
||||
|
||||
# Run modem link script
|
||||
if [ -f /system/etc/init.qcom.modem_links.sh ]; then
|
||||
/system/vendor/bin/init.qcom.modem_links.sh
|
||||
fi
|
||||
|
||||
# Run mdm link script
|
||||
if [ -f /system/etc/init.qcom.mdm_links.sh ]; then
|
||||
/system/vendor/bin/init.qcom.mdm_links.sh
|
||||
fi
|
||||
|
||||
# Run wifi script
|
||||
if [ -f /vendor/bin/init.qcom.wifi.sh ]; then
|
||||
/vendor/bin/init.qcom.wifi.sh "$target" "$serial"
|
||||
fi
|
||||
|
||||
# Run the sensor script
|
||||
if [ -f /system/etc/init.qcom.sensor.sh ]; then
|
||||
/system/vendor/bin/init.qcom.sensor.sh
|
||||
fi
|
||||
|
||||
touch /system/etc/boot_fixup
|
||||
|
||||
if $mount_needed ;then
|
||||
# This should be the last command
|
||||
# remount system as read-only.
|
||||
mount -o ro,remount,barrier=1 /system
|
||||
fi
|
|
@ -1,389 +0,0 @@
|
|||
#!/vendor/bin/sh
|
||||
# Copyright (c) 2012-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.
|
||||
#
|
||||
#
|
||||
chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup
|
||||
chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup
|
||||
|
||||
# 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/machine ]; then
|
||||
soc_machine=`cat /sys/devices/soc0/machine` 2> /dev/null
|
||||
else
|
||||
soc_machine=`cat /sys/devices/system/soc/soc0/machine` 2> /dev/null
|
||||
fi
|
||||
|
||||
# Get hardware revision
|
||||
if [ -f /sys/devices/soc0/revision ]; then
|
||||
soc_revision=`cat /sys/devices/soc0/revision` 2> /dev/null
|
||||
else
|
||||
soc_revision=`cat /sys/devices/system/soc/soc0/revision` 2> /dev/null
|
||||
fi
|
||||
|
||||
#
|
||||
# Allow persistent usb charging disabling
|
||||
# User needs to set usb charging disabled in persist.usb.chgdisabled
|
||||
#
|
||||
target=`getprop ro.board.platform`
|
||||
usbchgdisabled=`getprop persist.usb.chgdisabled`
|
||||
case "$usbchgdisabled" in
|
||||
"") ;; #Do nothing here
|
||||
* )
|
||||
case $target in
|
||||
"msm8660")
|
||||
echo "$usbchgdisabled" > /sys/module/pmic8058_charger/parameters/disabled
|
||||
echo "$usbchgdisabled" > /sys/module/smb137b/parameters/disabled
|
||||
;;
|
||||
"msm8960")
|
||||
echo "$usbchgdisabled" > /sys/module/pm8921_charger/parameters/disabled
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
usbcurrentlimit=`getprop persist.usb.currentlimit`
|
||||
case "$usbcurrentlimit" in
|
||||
"") ;; #Do nothing here
|
||||
* )
|
||||
case $target in
|
||||
"msm8960")
|
||||
echo "$usbcurrentlimit" > /sys/module/pm8921_charger/parameters/usb_max_current
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
#
|
||||
# Check ESOC for external MDM
|
||||
#
|
||||
# Note: currently only a single MDM is supported
|
||||
#
|
||||
if [ -d /sys/bus/esoc/devices ]; then
|
||||
for f in /sys/bus/esoc/devices/*; do
|
||||
if [ -d $f ]; then
|
||||
if [ `grep "^MDM" $f/esoc_name` ]; then
|
||||
esoc_link=`cat $f/esoc_link`
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
target=`getprop ro.board.platform`
|
||||
|
||||
# soc_ids for 8937
|
||||
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
|
||||
|
||||
#
|
||||
# Allow USB enumeration with default PID/VID
|
||||
#
|
||||
baseband=`getprop ro.baseband`
|
||||
|
||||
echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua
|
||||
usb_config=`getprop persist.sys.usb.config`
|
||||
case "$usb_config" in
|
||||
"" | "adb") #USB persist config not set, select default configuration
|
||||
case "$esoc_link" in
|
||||
"PCIe")
|
||||
setprop persist.sys.usb.config diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage,adb
|
||||
;;
|
||||
*)
|
||||
case "$baseband" in
|
||||
"apq")
|
||||
setprop persist.sys.usb.config diag,adb
|
||||
;;
|
||||
*)
|
||||
case "$soc_hwplatform" in
|
||||
"Dragon" | "SBC")
|
||||
setprop persist.sys.usb.config diag,adb
|
||||
;;
|
||||
*)
|
||||
soc_machine=${soc_machine:0:3}
|
||||
case "$soc_machine" in
|
||||
"SDA")
|
||||
setprop persist.sys.usb.config diag,adb
|
||||
;;
|
||||
*)
|
||||
case "$target" in
|
||||
"msm8916")
|
||||
setprop persist.sys.usb.config diag,serial_smd,rmnet_bam,adb
|
||||
;;
|
||||
"msm8994" | "msm8992")
|
||||
setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb
|
||||
;;
|
||||
"msm8996")
|
||||
setprop persist.sys.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
|
||||
;;
|
||||
"msm8909")
|
||||
setprop persist.sys.usb.config diag,serial_smd,rmnet_qti_bam,adb
|
||||
;;
|
||||
"msm8937")
|
||||
if [ -d /config/usb_gadget ]; then
|
||||
setprop persist.sys.usb.config diag,serial_cdev,rmnet,dpl,adb
|
||||
else
|
||||
case "$soc_id" in
|
||||
"313" | "320")
|
||||
setprop persist.sys.usb.config diag,serial_smd,rmnet_ipa,adb
|
||||
;;
|
||||
*)
|
||||
setprop persist.sys.usb.config diag,serial_smd,rmnet_qti_bam,adb
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
"msm8952")
|
||||
setprop persist.sys.usb.config diag,serial_smd,rmnet_ipa,adb
|
||||
;;
|
||||
"msm8953")
|
||||
if [ -d /config/usb_gadget ]; then
|
||||
setprop persist.sys.usb.config diag,serial_cdev,rmnet,dpl,adb
|
||||
else
|
||||
setprop persist.sys.usb.config diag,serial_smd,rmnet_ipa,adb
|
||||
fi
|
||||
;;
|
||||
"msm8998" | "sdm660" | "apq8098_latv")
|
||||
setprop persist.sys.usb.config diag,serial_cdev,rmnet,adb
|
||||
;;
|
||||
"sdm845")
|
||||
setprop persist.sys.usb.config diag,serial_cdev,rmnet,dpl,adb
|
||||
;;
|
||||
*)
|
||||
setprop persist.sys.usb.config diag,adb
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
* ) ;; #USB persist config exists, do nothing
|
||||
esac
|
||||
|
||||
# check configfs is mounted or not
|
||||
if [ -d /config/usb_gadget ]; then
|
||||
# set USB controller's device node
|
||||
setprop sys.usb.rndis.func.name "rndis_bam"
|
||||
setprop sys.usb.rmnet.func.name "rmnet_bam"
|
||||
setprop sys.usb.rmnet.inst.name "rmnet"
|
||||
setprop sys.usb.dpl.inst.name "dpl"
|
||||
case "$target" in
|
||||
"msm8937")
|
||||
setprop sys.usb.controller "msm_hsusb"
|
||||
setprop sys.usb.rndis.func.name "rndis"
|
||||
setprop sys.usb.rmnet.inst.name "rmnet_bam_dmux"
|
||||
setprop sys.usb.dpl.inst.name "dpl_bam_dmux"
|
||||
;;
|
||||
"msm8953")
|
||||
setprop sys.usb.controller "7000000.dwc3"
|
||||
echo 131072 > /sys/module/usb_f_mtp/parameters/mtp_tx_req_len
|
||||
echo 131072 > /sys/module/usb_f_mtp/parameters/mtp_rx_req_len
|
||||
;;
|
||||
"msm8996")
|
||||
setprop sys.usb.controller "6a00000.dwc3"
|
||||
echo 131072 > /sys/module/usb_f_mtp/parameters/mtp_tx_req_len
|
||||
echo 131072 > /sys/module/usb_f_mtp/parameters/mtp_rx_req_len
|
||||
;;
|
||||
"msm8998" | "apq8098_latv")
|
||||
setprop sys.usb.controller "a800000.dwc3"
|
||||
setprop sys.usb.rndis.func.name "gsi"
|
||||
setprop sys.usb.rmnet.func.name "gsi"
|
||||
;;
|
||||
"sdm660")
|
||||
setprop sys.usb.controller "a800000.dwc3"
|
||||
echo 15916 > /sys/module/usb_f_qcrndis/parameters/rndis_dl_max_xfer_size
|
||||
;;
|
||||
"sdm845")
|
||||
setprop sys.usb.controller "a600000.dwc3"
|
||||
setprop sys.usb.rndis.func.name "gsi"
|
||||
setprop sys.usb.rmnet.func.name "gsi"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# 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
|
||||
|
||||
persist_comp=`getprop persist.sys.usb.config`
|
||||
comp=`getprop sys.usb.config`
|
||||
echo $persist_comp
|
||||
echo $comp
|
||||
if [ "$comp" != "$persist_comp" ]; then
|
||||
echo "setting sys.usb.config"
|
||||
setprop sys.usb.config $persist_comp
|
||||
fi
|
||||
|
||||
setprop sys.usb.configfs 1
|
||||
else
|
||||
#
|
||||
# Do target specific things
|
||||
#
|
||||
case "$target" in
|
||||
"msm8974")
|
||||
# Select USB BAM - 2.0 or 3.0
|
||||
echo ssusb > /sys/bus/platform/devices/usb_bam/enable
|
||||
;;
|
||||
"apq8084")
|
||||
if [ "$baseband" == "apq" ]; then
|
||||
echo "msm_hsic_host" > /sys/bus/platform/drivers/xhci_msm_hsic/unbind
|
||||
fi
|
||||
;;
|
||||
"msm8226")
|
||||
if [ -e /sys/bus/platform/drivers/msm_hsic_host ]; then
|
||||
if [ ! -L /sys/bus/usb/devices/1-1 ]; then
|
||||
echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
"msm8994" | "msm8992" | "msm8996" | "msm8953")
|
||||
echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports
|
||||
echo 131072 > /sys/module/g_android/parameters/mtp_tx_req_len
|
||||
echo 131072 > /sys/module/g_android/parameters/mtp_rx_req_len
|
||||
;;
|
||||
"msm8937")
|
||||
case "$soc_id" in
|
||||
"313" | "320")
|
||||
echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
persist_comp=`getprop persist.sys.usb.config`
|
||||
comp=`getprop sys.usb.config`
|
||||
echo $persist_comp
|
||||
echo $comp
|
||||
if [ "$comp" != "$persist_comp" ]; then
|
||||
echo "setting sys.usb.config"
|
||||
setprop sys.usb.config $persist_comp
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# set module params for embedded rmnet devices
|
||||
#
|
||||
rmnetmux=`getprop persist.rmnet.mux`
|
||||
case "$baseband" in
|
||||
"mdm" | "dsda" | "sglte2")
|
||||
case "$rmnetmux" in
|
||||
"enabled")
|
||||
echo 1 > /sys/module/rmnet_usb/parameters/mux_enabled
|
||||
echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links
|
||||
echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev
|
||||
;;
|
||||
esac
|
||||
echo 1 > /sys/module/rmnet_usb/parameters/rmnet_data_init
|
||||
# Allow QMUX daemon to assign port open wait time
|
||||
chown -h radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
|
||||
;;
|
||||
"dsda2")
|
||||
echo 2 > /sys/module/rmnet_usb/parameters/no_rmnet_devs
|
||||
echo hsicctl,hsusbctl > /sys/module/rmnet_usb/parameters/rmnet_dev_names
|
||||
case "$rmnetmux" in
|
||||
"enabled") #mux is neabled on both mdms
|
||||
echo 3 > /sys/module/rmnet_usb/parameters/mux_enabled
|
||||
echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links
|
||||
echo 17 > write /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev
|
||||
;;
|
||||
"enabled_hsic") #mux is enabled on hsic mdm
|
||||
echo 1 > /sys/module/rmnet_usb/parameters/mux_enabled
|
||||
echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links
|
||||
echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev
|
||||
;;
|
||||
"enabled_hsusb") #mux is enabled on hsusb mdm
|
||||
echo 2 > /sys/module/rmnet_usb/parameters/mux_enabled
|
||||
echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links
|
||||
echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev
|
||||
;;
|
||||
esac
|
||||
echo 1 > /sys/module/rmnet_usb/parameters/rmnet_data_init
|
||||
# Allow QMUX daemon to assign port open wait time
|
||||
chown -h radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Add support for exposing lun0 as cdrom in mass-storage
|
||||
#
|
||||
cdromname="/system/etc/cdrom_install.iso"
|
||||
platformver=`cat /sys/devices/soc0/hw_platform`
|
||||
case "$target" in
|
||||
"msm8226" | "msm8610" | "msm8916")
|
||||
case $platformver in
|
||||
"QRD")
|
||||
echo "mounting usbcdrom lun"
|
||||
echo $cdromname > /sys/class/android_usb/android0/f_mass_storage/rom/file
|
||||
chmod 0444 /sys/class/android_usb/android0/f_mass_storage/rom/file
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Initialize RNDIS Diag option. If unset, set it to 'none'.
|
||||
#
|
||||
diag_extra=`getprop persist.sys.usb.config.extra`
|
||||
if [ "$diag_extra" == "" ]; then
|
||||
setprop persist.sys.usb.config.extra none
|
||||
fi
|
||||
|
||||
# soc_ids for 8937
|
||||
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
|
||||
|
||||
# enable rps cpus on msm8937 target
|
||||
setprop sys.usb.rps_mask 0
|
||||
case "$soc_id" in
|
||||
"294" | "295" | "353" | "354")
|
||||
setprop sys.usb.rps_mask 40
|
||||
;;
|
||||
esac
|
|
@ -1,505 +0,0 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2010-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 "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.
|
||||
#
|
||||
# This script will load and unload the wifi driver to put the wifi in
|
||||
# in deep sleep mode so that there won't be voltage leakage.
|
||||
# Loading/Unloading the driver only incase if the Wifi GUI is not going
|
||||
# to Turn ON the Wifi. In the Script if the wlan driver status is
|
||||
# ok(GUI loaded the driver) or loading(GUI is loading the driver) then
|
||||
# the script won't do anything. Otherwise (GUI is not going to Turn On
|
||||
# the Wifi) the script will load/unload the driver
|
||||
# This script will get called after post bootup.
|
||||
|
||||
target="$1"
|
||||
serialno="$2"
|
||||
|
||||
btsoc=""
|
||||
|
||||
# No path is set up at this point so we have to do it here.
|
||||
PATH=/sbin:/system/sbin:/system/bin:/system/xbin
|
||||
export PATH
|
||||
|
||||
# Trigger WCNSS platform driver
|
||||
trigger_wcnss()
|
||||
{
|
||||
# We need to trigger WCNSS platform driver, WCNSS driver
|
||||
# will export a file which we must touch so that the
|
||||
# driver knows that userspace is ready to handle firmware
|
||||
# download requests.
|
||||
|
||||
# See if an appropriately named device file is present
|
||||
wcnssnode=`ls /dev/wcnss*`
|
||||
case "$wcnssnode" in
|
||||
*wcnss*)
|
||||
# Before triggering wcnss, let it know that
|
||||
# caldata is available at userspace.
|
||||
if [ -e /data/misc/wifi/WCNSS_qcom_wlan_cal.bin ]; then
|
||||
calparm=`ls /sys/module/wcnsscore/parameters/has_calibrated_data`
|
||||
if [ -e $calparm ] && [ ! -e /data/misc/wifi/WCN_FACTORY ]; then
|
||||
echo 1 > $calparm
|
||||
fi
|
||||
fi
|
||||
# There is a device file. Write to the file
|
||||
# so that the driver knows userspace is
|
||||
# available for firmware download requests
|
||||
echo 1 > $wcnssnode
|
||||
;;
|
||||
|
||||
*)
|
||||
# There is not a device file present, so
|
||||
# the driver must not be available
|
||||
echo "No WCNSS device node detected"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Plumb down the device serial number
|
||||
if [ -f /sys/devices/*wcnss-wlan/serial_number ]; then
|
||||
cd /sys/devices/*wcnss-wlan
|
||||
echo $serialno > serial_number
|
||||
cd /
|
||||
elif [ -f /sys/devices/platform/wcnss_wlan.0/serial_number ]; then
|
||||
echo $serialno > /sys/devices/platform/wcnss_wlan.0/serial_number
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case "$target" in
|
||||
msm8974* | msm8226* | msm8610*)
|
||||
|
||||
# Check whether device is plugged on the HSIC bus
|
||||
# Currently HSIC bus will be the first index
|
||||
|
||||
if [ -e /sys/bus/platform/drivers/msm_hsic_host ]; then
|
||||
if [ ! -L /sys/bus/usb/devices/1-1 ]; then
|
||||
echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
|
||||
fi
|
||||
|
||||
chown -h system.system /sys/bus/platform/drivers/msm_hsic_host/bind
|
||||
chown -h system.system /sys/bus/platform/drivers/msm_hsic_host/unbind
|
||||
chmod -h 0200 /sys/bus/platform/drivers/msm_hsic_host/bind
|
||||
chmod -h 0200 /sys/bus/platform/drivers/msm_hsic_host/unbind
|
||||
fi
|
||||
|
||||
wlanchip=""
|
||||
|
||||
# force ar6004 is ar6004_wlan.conf existed.
|
||||
if [ -f /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf ]; then
|
||||
wlanchip=`cat /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf`
|
||||
fi
|
||||
|
||||
# auto detect ar6004-sdio card
|
||||
# for ar6004-sdio card, the vendor id and device id is as the following
|
||||
# vendor id device id
|
||||
# 0x0271 0x0400
|
||||
# 0x0271 0x0401
|
||||
if [ "$wlanchip" == "" ]; then
|
||||
sdio_vendors=`echo \`cat /sys/bus/mmc/devices/*/*/vendor\``
|
||||
sdio_devices=`echo \`cat /sys/bus/mmc/devices/*/*/device\``
|
||||
ven_idx=0
|
||||
|
||||
for vendor in $sdio_vendors; do
|
||||
case "$vendor" in
|
||||
"0x0271")
|
||||
dev_idx=0
|
||||
for device in $sdio_devices; do
|
||||
if [ $ven_idx -eq $dev_idx ]; then
|
||||
case "$device" in
|
||||
"0x0400" | "0x0401" | "0x0402")
|
||||
wlanchip="AR6004-SDIO"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
dev_idx=$(( $dev_idx + 1))
|
||||
done
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
ven_idx=$(( $ven_idx + 1))
|
||||
done
|
||||
# auto detect ar6004-sdio card end
|
||||
fi
|
||||
|
||||
# for ar6004-usb card, the vendor id and device id is as the following
|
||||
# vendor id product id
|
||||
# 0x0cf3 0x9374
|
||||
# 0x0cf3 0x9372
|
||||
if [ "$wlanchip" == "" ]; then
|
||||
usb_vendors=`echo \`cat /sys/bus/usb/devices/*/*/idVendor\``
|
||||
usb_products=`echo \`cat /sys/bus/usb/devices/*/*/idProduct\``
|
||||
ven_idx=0
|
||||
|
||||
for vendor in $usb_vendors; do
|
||||
case "$vendor" in
|
||||
"0cf3")
|
||||
dev_idx=0
|
||||
for product in $usb_products; do
|
||||
if [ $ven_idx -eq $dev_idx ]; then
|
||||
case "$product" in
|
||||
"9374" | "9372")
|
||||
wlanchip="AR6004-USB"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
dev_idx=$(( $dev_idx + 1))
|
||||
done
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
ven_idx=$(( $ven_idx + 1))
|
||||
done
|
||||
# auto detect ar6004-usb card end
|
||||
fi
|
||||
|
||||
echo "The WLAN Chip ID is $wlanchip"
|
||||
case "$wlanchip" in
|
||||
"AR6004-USB")
|
||||
echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
|
||||
setprop wlan.driver.ath 2
|
||||
setprop qcom.bluetooth.soc ath3k
|
||||
btsoc="ath3k"
|
||||
rm /system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_usb.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_ath6kl.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
|
||||
"AR6004-SDIO")
|
||||
setprop wlan.driver.ath 2
|
||||
setprop qcom.bluetooth.soc ath3k
|
||||
btsoc="ath3k"
|
||||
# Chown polling nodes as needed from UI running on system server
|
||||
chmod -h 0200 /sys/devices/msm_sdcc.1/polling
|
||||
chmod -h 0200 /sys/devices/msm_sdcc.2/polling
|
||||
chmod -h 0200 /sys/devices/msm_sdcc.3/polling
|
||||
chmod -h 0200 /sys/devices/msm_sdcc.4/polling
|
||||
|
||||
chown -h system.system /sys/devices/msm_sdcc.1/polling
|
||||
chown -h system.system /sys/devices/msm_sdcc.2/polling
|
||||
chown -h system.system /sys/devices/msm_sdcc.3/polling
|
||||
chown -h system.system /sys/devices/msm_sdcc.4/polling
|
||||
|
||||
rm /system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_sdio.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_ath6kl.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "*** WI-FI chip ID is not specified in /persist/wlan_chip_id **"
|
||||
echo "*** Use the default WCN driver. **"
|
||||
setprop wlan.driver.ath 0
|
||||
rm /system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/pronto/pronto_wlan.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
# Populate the writable driver configuration file
|
||||
if [ ! -s /data/misc/wifi/WCNSS_qcom_cfg.ini ]; then
|
||||
cp /system/etc/wifi/WCNSS_qcom_cfg.ini \
|
||||
/data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
chown -h system:wifi /data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
chmod -h 660 /data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
fi
|
||||
|
||||
# The property below is used in Qcom SDK for softap to determine
|
||||
# the wifi driver config file
|
||||
setprop wlan.driver.config /data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_wcn.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
|
||||
# Trigger WCNSS platform driver
|
||||
trigger_wcnss &
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
apq8084*)
|
||||
echo "*** Use the CNSS CLD driver.**"
|
||||
setprop wlan.driver.ath 0
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_wcn.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
|
||||
msm8960*)
|
||||
|
||||
# Move cfg80211.ko to prima directory, the default cfg80211.ko is
|
||||
# for wcnss solution
|
||||
if [ ! -L /system/lib/modules/cfg80211.ko ]; then
|
||||
mv /system/lib/modules/cfg80211.ko /system/lib/modules/prima/
|
||||
fi
|
||||
|
||||
wlanchip=""
|
||||
|
||||
if [ -f /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf ]; then
|
||||
wlanchip=`cat /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf`
|
||||
fi
|
||||
|
||||
if [ "$wlanchip" == "" ]; then
|
||||
# auto detect ar6004-usb card
|
||||
# for ar6004-usb card, the vendor id and device id is as the following
|
||||
# vendor id product id
|
||||
# 0x0cf3 0x9374
|
||||
# 0x0cf3 0x9372
|
||||
usb_vendors=`echo \`cat /sys/bus/usb/devices/*/*/idVendor\``
|
||||
usb_products=`echo \`cat /sys/bus/usb/devices/*/*/idProduct\``
|
||||
ven_idx=0
|
||||
|
||||
for vendor in $usb_vendors; do
|
||||
case "$vendor" in
|
||||
"0cf3")
|
||||
dev_idx=0
|
||||
for product in $usb_products; do
|
||||
if [ $ven_idx -eq $dev_idx ]; then
|
||||
case "$product" in
|
||||
"9374" | "9372")
|
||||
wlanchip="AR6004-USB"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
dev_idx=$(( $dev_idx + 1))
|
||||
done
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
ven_idx=$(( $ven_idx + 1))
|
||||
done
|
||||
# auto detect ar6004-usb card end
|
||||
fi
|
||||
|
||||
if [ "$wlanchip" == "" ]; then
|
||||
# auto detect ar6004-sdio card
|
||||
# for ar6004-sdio card, the vendor id and device id is
|
||||
# as the following
|
||||
# vendor id device id
|
||||
# 0x0271 0x0400
|
||||
# 0x0271 0x0401
|
||||
sdio_vendors=`echo \`cat /sys/bus/mmc/devices/*/*/vendor\``
|
||||
sdio_devices=`echo \`cat /sys/bus/mmc/devices/*/*/device\``
|
||||
ven_idx=0
|
||||
|
||||
for vendor in $sdio_vendors; do
|
||||
case "$vendor" in
|
||||
"0x0271")
|
||||
dev_idx=0
|
||||
for device in $sdio_devices; do
|
||||
if [ $ven_idx -eq $dev_idx ]; then
|
||||
case "$device" in
|
||||
"0x0400" | "0x0401")
|
||||
wlanchip="AR6004-SDIO"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
dev_idx=$(( $dev_idx + 1))
|
||||
done
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
ven_idx=$(( $ven_idx + 1))
|
||||
done
|
||||
# auto detect ar6004-sdio card end
|
||||
fi
|
||||
|
||||
echo "The WLAN Chip ID is $wlanchip"
|
||||
case "$wlanchip" in
|
||||
"AR6004-USB")
|
||||
setprop wlan.driver.ath 2
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_usb.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_ath6kl.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
"AR6004-SDIO")
|
||||
setprop wlan.driver.ath 2
|
||||
setprop qcom.bluetooth.soc ath3k
|
||||
btsoc="ath3k"
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_sdio.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_ath6kl.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
*)
|
||||
echo "*** WI-FI chip ID is not specified in /persist/wlan_chip_id **"
|
||||
echo "*** Use the default WCN driver. **"
|
||||
setprop wlan.driver.ath 0
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/prima/prima_wlan.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/prima/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
|
||||
# The property below is used in Qcom SDK for softap to determine
|
||||
# the wifi driver config file
|
||||
setprop wlan.driver.config /data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_wcn.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
|
||||
# Trigger WCNSS platform driver
|
||||
trigger_wcnss &
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
msm7627a*)
|
||||
|
||||
# The default cfg80211 module is for volans
|
||||
if [ ! -L /system/lib/modules/cfg80211.ko ]; then
|
||||
mv /system/lib/modules/cfg80211.ko /system/lib/modules/volans/
|
||||
fi
|
||||
|
||||
wlanchip=`cat /persist/wlan_chip_id`
|
||||
echo "The WLAN Chip ID is $wlanchip"
|
||||
case "$wlanchip" in
|
||||
"ATH6KL")
|
||||
setprop wlan.driver.ath 1
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/ath6kl/ath6kl_sdio.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
;;
|
||||
"WCN1314")
|
||||
setprop wlan.driver.ath 0
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/volans/WCN1314_rf.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/volans/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
;;
|
||||
*)
|
||||
setprop wlan.driver.ath 1
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/ath6kl/ath6kl_sdio.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
echo "************************************************************"
|
||||
echo "*** Error:WI-FI chip ID is not specified in"
|
||||
echo "/persist/wlan_chip_id"
|
||||
echo "******* WI-FI may not work ***************************"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
msm7627*)
|
||||
ln -s /data/hostapd/qcom_cfg.ini /etc/firmware/wlan/qcom_cfg.ini
|
||||
ln -s /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
|
||||
;;
|
||||
|
||||
msm8660*)
|
||||
;;
|
||||
|
||||
msm7630*)
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
#!/vendor/bin/sh
|
||||
# Copyright (c) 2009-2011, 2015, 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 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.
|
||||
#
|
||||
|
||||
setprop hw.fm.init 0
|
||||
|
||||
mode=`getprop 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 hw.fm.init 1
|
||||
|
||||
exit 0
|
|
@ -1,57 +0,0 @@
|
|||
#! /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_diabled
|
||||
ims_disabled=`getprop persist.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 service.qti.ims.enabled 1
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$ims_disabled" = "1" ] || [ "$target" = "msm8909_512" ]; then
|
||||
echo "ims is disabled"
|
||||
setprop service.qti.ims.enabled 0
|
||||
else
|
||||
echo "ims is enabled"
|
||||
setprop service.qti.ims.enabled 1
|
||||
fi
|
|
@ -1,35 +0,0 @@
|
|||
#!/vendor/bin/sh
|
||||
# Copyright (c) 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 "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.
|
||||
#
|
||||
#
|
||||
|
||||
while [ "$registered" != "true" ]
|
||||
do
|
||||
sleep 0.1
|
||||
registered="`getprop sys.listeners.registered`"
|
||||
done
|
|
@ -1,5 +1,4 @@
|
|||
#!/vendor/bin/sh
|
||||
# Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
||||
# Copyright (c) 2009-2012, 2014-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:
|
||||
|
@ -26,18 +25,13 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
#
|
||||
# Function to start sensors for SSC enabled platforms
|
||||
#
|
||||
start_sensors()
|
||||
{
|
||||
if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
|
||||
chmod -h 775 /persist/sensors
|
||||
chmod -h 664 /persist/sensors/sensors_settings
|
||||
mkdir -p /persist/sensors/registry/registry
|
||||
chown -h system.root /persist/sensors/sensors_settings
|
||||
start sensors
|
||||
fi
|
||||
}
|
||||
# Set permission for double tap to wake support
|
||||
chown system system /sys/devices/soc/c177000.i2c/i2c-3/3-0038/fts_gesture_mode
|
||||
chmod 0660 /sys/devices/soc/c177000.i2c/i2c-3/3-0038/fts_gesture_mode
|
||||
|
||||
start_sensors
|
||||
# Set max charge current
|
||||
on property:sys.incall=true
|
||||
write /sys/class/power_supply/battery/constant_charge_current_max 500000
|
||||
|
||||
on property:sys.incall=false
|
||||
write /sys/class/power_supply/battery/constant_charge_current_max 2000000
|
|
@ -1,838 +0,0 @@
|
|||
# Copyright (c) 2016-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.
|
||||
#
|
||||
# MIUI ADD
|
||||
on property:vold.decrypt=trigger_restart_framework
|
||||
setprop sys.usb.config ${persist.sys.usb.config}
|
||||
|
||||
# USB compositions
|
||||
on property:sys.usb.config=mass_storage && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "msc"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x2717
|
||||
write /config/usb_gadget/g1/idProduct 0xff20
|
||||
symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f1
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb_msc"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x2717
|
||||
write /config/usb_gadget/g1/idProduct 0xff28
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x901D
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x900E
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default composition"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x9091
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_cdev,rmnet && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default comp without ADB"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x9092
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.tethering=true
|
||||
write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${sys.usb.rps_mask}
|
||||
|
||||
on property:sys.usb.config=rndis
|
||||
setprop sys.usb.config rndis,${persist.sys.usb.config.extra}
|
||||
|
||||
on property:sys.usb.config=rndis,none && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x2717
|
||||
write /config/usb_gadget/g1/idProduct 0xFF80
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis
|
||||
|
||||
on property:sys.usb.config=rndis,adb
|
||||
setprop sys.usb.config rndis,${persist.sys.usb.config.extra},adb
|
||||
|
||||
on property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x2717
|
||||
write /config/usb_gadget/g1/idProduct 0xff88
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis,adb
|
||||
|
||||
on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x902C
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis
|
||||
|
||||
on property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x902D
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis,adb
|
||||
|
||||
on property:sys.usb.config=rndis,serial_cdev && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90B3
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis
|
||||
|
||||
on property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90B4
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis,adb
|
||||
|
||||
on property:sys.usb.config=rndis,serial_cdev,diag && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90B5
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis
|
||||
|
||||
on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90B6
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis,adb
|
||||
|
||||
on property:sys.usb.config=mtp,diag && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x901B
|
||||
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x903A
|
||||
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x904A
|
||||
write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x9060
|
||||
write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss,rmnet && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x9083
|
||||
write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x9084
|
||||
write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f4
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x9081
|
||||
write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x9082
|
||||
write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0xA4A1
|
||||
symlink /config/usb_gadget/g1/functions/ncm.0 /config/usb_gadget/g1/configs/b.1/f1
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x908C
|
||||
symlink /config/usb_gadget/g1/functions/ncm.0 /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_cdev && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x9004
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb_dun"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x901f
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_cdev,rmnet,dpl && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90b7
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90b8
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,dpl && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90bf
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis
|
||||
|
||||
on property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90c0
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state rndis,adb
|
||||
|
||||
on property:sys.usb.config=ccid && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90CE
|
||||
symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ccid,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90CF
|
||||
symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ccid,diag && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90D0
|
||||
symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90D1
|
||||
symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_cdev,rmnet,ccid && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90D2
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90D3
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90D7
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet_adb"
|
||||
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/idVendor 0x05C6
|
||||
write /config/usb_gadget/g1/idProduct 0x90D8
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
|
||||
symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
|
||||
symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
|
||||
symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
|
||||
symlink /config/usb_gadget/g1/functions/${sys.usb.rmnet.func.name}.${sys.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
|
||||
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x4ee7
|
||||
|
||||
on property:sys.usb.config=mtp && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x2717
|
||||
write /config/usb_gadget/g1/idProduct 0xff40
|
||||
|
||||
on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x2717
|
||||
write /config/usb_gadget/g1/idProduct 0xff48
|
||||
|
||||
on property:sys.usb.config=ptp && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x2717
|
||||
write /config/usb_gadget/g1/idProduct 0xff10
|
||||
|
||||
on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x2717
|
||||
write /config/usb_gadget/g1/idProduct 0xff18
|
||||
|
||||
on property:sys.usb.config=accessory && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x2d00
|
||||
|
||||
on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x2d01
|
||||
|
||||
on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x2d02
|
||||
|
||||
on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x2d03
|
||||
|
||||
on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x2d04
|
||||
|
||||
on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x2d05
|
||||
|
||||
on property:sys.usb.config=midi && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x4ee8
|
||||
|
||||
on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x4ee9
|
|
@ -1,125 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# Define fastmmi
|
||||
service fastmmi /system/bin/mmi
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
|
||||
service 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:sys.boot_mode=ffbm
|
||||
write ${persist.vendor.mmi.misc_dev_path} "ffbm-01"
|
||||
|
||||
on property:sys.boot_mode=qmmi
|
||||
write ${persist.vendor.mmi.misc_dev_path} "ffbm-02"
|
||||
|
||||
on property: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
|
||||
|
||||
on post-fs-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
|
||||
|
||||
setprop persist.sys.usb.ffbm-00.func ${persist.sys.usb.config}
|
||||
setprop persist.sys.usb.ffbm-01.func ${persist.sys.usb.config}
|
||||
setprop persist.sys.usb.ffbm-02.func ${persist.sys.usb.config}
|
||||
|
||||
on mmi && property:ro.bootmode=ffbm-00
|
||||
# ========================================================
|
||||
# This is FFBM only settings.
|
||||
# ========================================================
|
||||
#mkdir for factory data files.
|
||||
mkdir /persist/FTM_AP 0750 root root
|
||||
|
||||
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 /persist/FTM_AP 0750 root root
|
||||
|
||||
start fastmmi
|
||||
## start qcom-post-boot to set the misc partition path property value
|
||||
start qcom-post-boot
|
||||
start mmi_diag
|
||||
|
||||
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
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,618 +0,0 @@
|
|||
# Copyright (c) 2013-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.
|
||||
#
|
||||
#
|
||||
|
||||
on early-init
|
||||
mkdir /firmware 0771 system system
|
||||
mkdir /bt_firmware 0771 system system
|
||||
mkdir /dsp 0771 media media
|
||||
|
||||
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
|
||||
|
||||
on fs
|
||||
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
||||
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
|
||||
mount_all /vendor/etc/fstab.qcom
|
||||
swapon_all /vendor/etc/fstab.qcom
|
||||
|
||||
# Keeping following partitions outside fstab file. As user may not have
|
||||
# these partition flashed on the device. Failure to mount any partition in fstab file
|
||||
# results in failure to launch late-start class.
|
||||
|
||||
#wait /dev/block/bootdevice/by-name/persist
|
||||
#mount ext4 /dev/block/bootdevice/by-name/persist /persist nosuid nodev noatime barrier=1
|
||||
#mkdir /persist/data 0700 system system
|
||||
#mkdir /persist/bms 0700 root system
|
||||
#restorecon_recursive /persist
|
||||
write /sys/kernel/boot_adsp/boot 1
|
||||
|
||||
on post-fs
|
||||
restorecon_recursive /persist
|
||||
exec - root root -- /vendor/bin/init.huaqin.persist.sh
|
||||
start qseecomd
|
||||
exec - system system -- /vendor/bin/init.qti.qseecomd.sh
|
||||
write /dev/ipa 1
|
||||
# Update dm-verity state and set partition.*.verified properties
|
||||
verity_update_state
|
||||
|
||||
on init
|
||||
write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
|
||||
|
||||
on post-fs-data
|
||||
mkdir /data/tombstones/modem 0771 system system
|
||||
mkdir /data/tombstones/lpass 0771 system system
|
||||
mkdir /data/tombstones/wcnss 0771 system system
|
||||
mkdir /data/tombstones/dsps 0771 system system
|
||||
mkdir /data/vendor/hbtp 0750 system system
|
||||
mkdir /persist/qti_fp 0700 system system
|
||||
mkdir /data/misc/seemp 0700 system system
|
||||
mkdir /data/misc/tloc 0700 system drmrpc
|
||||
mkdir /persist/data 0700 system system
|
||||
mkdir /persist/bms 0700 root system
|
||||
mkdir /data/thermal 0771 system system
|
||||
mkdir /data/thermal/config 0771 system system
|
||||
chmod 0664 /sys/class/thermal/thermal_message/sconfig
|
||||
chown system system /sys/class/thermal/thermal_message/sconfig
|
||||
#wangtao 20180227 add battery permission
|
||||
chmod 0644 /sys/class/power_supply/battery/charging_enabled
|
||||
chmod 0644 /sys/class/power_supply/battery/constant_charge_current_max
|
||||
restorecon_recursive /persist
|
||||
|
||||
mkdir /data/thermal 0771 system system
|
||||
mkdir /data/thermal/config 0771 system system
|
||||
|
||||
on boot
|
||||
start rmt_storage
|
||||
start rfs_access
|
||||
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
|
||||
write /dev/cpuset/restricted/cpus 0-7
|
||||
####Regionalization config and prop files####
|
||||
chmod 0644 /persist/speccfg/spec
|
||||
chmod 0644 /persist/speccfg/devicetype
|
||||
chmod 0644 /persist/speccfg/mbnversion
|
||||
chmod 0644 /persist/speccfg/.not_triggered
|
||||
chmod 0644 /persist/speccfg/vendor_ro.prop
|
||||
chmod 0644 /persist/speccfg/vendor_persist.prop
|
||||
chmod 0644 /persist/speccfg/submask
|
||||
chmod 0644 /persist/speccfg/partition
|
||||
chown system system /persist/speccfg/spec
|
||||
chown system system /persist/speccfg/devicetype
|
||||
chown system system /persist/speccfg/mbnversion
|
||||
chown system system /persist/speccfg/.not_triggered
|
||||
chown system system /persist/speccfg/vendor_ro.prop
|
||||
chown system system /persist/speccfg/vendor_persist.prop
|
||||
chown system system /persist/speccfg/submask
|
||||
chown system system /persist/speccfg/partition
|
||||
# wangtao open led permisions start
|
||||
chown system system /sys/class/leds/red/blink
|
||||
# wangtao open led permisions end
|
||||
# wendell-20180423 added for fpc fingerprint
|
||||
chown system system /sys/devices/soc/soc:fpc1020/compatible_all
|
||||
chmod 0664 /sys/devices/soc/soc:fpc1020/compatible_all
|
||||
chown system system /sys/devices/soc/soc:fpc1020/irq
|
||||
chmod 0660 /sys/devices/soc/soc:fpc1020/irq
|
||||
chown system system /sys/devices/soc/soc:fpc1020/hw_reset
|
||||
chmod 0660 /sys/devices/platform/soc/soc:fpc1020/hw_reset
|
||||
chown system system /sys/devices/soc/soc:fpc1020/wakeup_enable
|
||||
chmod 0660 /sys/devices/soc/soc:fpc1020/wakeup_enable
|
||||
#MIUI Patch modified for ZQL6019-4 by penghoubing@huaqin.com
|
||||
chown system system /sys/devices/soc/soc:fpc1020/fingerdown_wait
|
||||
chmod 0660 /sys/devices/soc/soc:fpc1020/fingerdown_wait
|
||||
|
||||
# Touchscreen
|
||||
chown system system /sys/devices/soc/c177000.i2c/i2c-3/3-0038/fts_gesture_mode
|
||||
chmod 0660 /sys/devices/soc/c177000.i2c/i2c-3/3-0038/fts_gesture_mode
|
||||
|
||||
# wendell-20180423 end
|
||||
start getpersistlog
|
||||
|
||||
# Wifi firmware reload path
|
||||
chown wifi wifi /sys/module/wlan/parameters/fwpath
|
||||
|
||||
#Peripheral manager
|
||||
service per_mgr /system/vendor/bin/pm-service
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
ioprio rt 4
|
||||
|
||||
service per_proxy /system/vendor/bin/pm-proxy
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
|
||||
on property:init.svc.per_mgr=running
|
||||
start per_proxy
|
||||
|
||||
on property:sys.powerctl=*
|
||||
stop per_proxy
|
||||
|
||||
#start camera server as daemon
|
||||
#service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||
# class late_start
|
||||
# user camera
|
||||
# group camera system inet input graphics
|
||||
|
||||
## 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
|
||||
#
|
||||
|
||||
#service qrngd /system/bin/qrngd -f
|
||||
# class main
|
||||
# user root
|
||||
# group root
|
||||
#
|
||||
#service qrngp /system/bin/qrngp
|
||||
# class main
|
||||
# user root
|
||||
# group root
|
||||
# oneshot
|
||||
# disabled
|
||||
#
|
||||
#on property:sys.boot_completed=1
|
||||
# start qrngp
|
||||
#
|
||||
service qseecomd /vendor/bin/qseecomd
|
||||
class core
|
||||
user root
|
||||
group root
|
||||
|
||||
#service mpdecision /system/vendor/bin/mpdecision --avg_comp
|
||||
# user root
|
||||
# disabled
|
||||
#
|
||||
#service qosmgrd /system/bin/qosmgr /system/etc/qosmgr_rules.xml
|
||||
# user system
|
||||
# group system
|
||||
# disabled
|
||||
#
|
||||
service thermal-engine /system/vendor/bin/thermal-engine
|
||||
class main
|
||||
user root
|
||||
socket thermal-send-client stream 0666 system system
|
||||
socket thermal-recv-client stream 0660 system system
|
||||
socket thermal-recv-passive-client stream 0666 system system
|
||||
socket thermal-send-rule stream 0660 system system
|
||||
group root
|
||||
|
||||
#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 adsprpcd_root /system/bin/adsprpcd
|
||||
class main
|
||||
user media
|
||||
group media
|
||||
|
||||
service adsprpcd /system/vendor/bin/adsprpcd audiopd
|
||||
class main
|
||||
user media
|
||||
group media
|
||||
|
||||
service hbtp /system/vendor/bin/hbtp_daemon
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
|
||||
service audiod /system/vendor/bin/audiod
|
||||
class late_start
|
||||
user system
|
||||
group system
|
||||
#
|
||||
#service usf_tester /system/vendor/bin/usf_tester
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_epos /system/vendor/bin/usf_epos
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_gesture /system/vendor/bin/usf_gesture
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
|
||||
#service usf_sync_gesture /system/vendor/bin/usf_sync_gesture
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
|
||||
#service usf_p2p /system/vendor/bin/usf_p2p
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_hovering /system/vendor/bin/usf_hovering
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf_proximity /system/vendor/bin/usf_proximity
|
||||
# user system
|
||||
# group system inet
|
||||
# disabled
|
||||
#
|
||||
#service usf-post-boot /system/vendor/bin/sh /system/etc/usf_post_boot.sh
|
||||
# class late_start
|
||||
# user root
|
||||
# disabled
|
||||
# oneshot
|
||||
#
|
||||
#on property:init.svc.bootanim=stopped
|
||||
# start usf-post-boot
|
||||
#
|
||||
#
|
||||
#on boot
|
||||
# insmod /system/lib/modules/adsprpc.ko
|
||||
# insmod /system/lib/modules/mhi.ko
|
||||
## access permission for secure touch
|
||||
# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
|
||||
# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
|
||||
# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
|
||||
# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
|
||||
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
|
||||
#
|
||||
#
|
||||
service imsqmidaemon /system/vendor/bin/imsqmidaemon
|
||||
class main
|
||||
user system
|
||||
socket ims_qmid stream 0660 system radio
|
||||
group radio log diag
|
||||
|
||||
service imsdatadaemon /system/vendor/bin/imsdatadaemon
|
||||
class main
|
||||
user system
|
||||
socket ims_datad stream 0660 system radio
|
||||
group system wifi radio 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
|
||||
|
||||
service energy-awareness /system/vendor/bin/energy-awareness
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
oneshot
|
||||
|
||||
service mdtpd /system/vendor/bin/mdtpd
|
||||
class late_start
|
||||
user root
|
||||
group system radio drmrpc
|
||||
|
||||
service gsort /system/bin/gsort
|
||||
user root
|
||||
disabled
|
||||
oneshot
|
||||
seclabel u:r:smartpa:s0
|
||||
on property:sys.gsort=1
|
||||
start gsort
|
||||
|
||||
service gsorttest /system/bin/gsorttest.sh
|
||||
user root
|
||||
disabled
|
||||
oneshot
|
||||
seclabel u:r:smartpa:s0
|
||||
on property:sys.gsortcheck=1
|
||||
start gsorttest
|
||||
|
||||
# hq log start
|
||||
service getaplog /system/bin/getlog -c
|
||||
disabled
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
|
||||
service stopaplog /system/bin/getlog -s
|
||||
disabled
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
|
||||
on property:persist.sys.debug.getaplog=1
|
||||
restart getaplog
|
||||
on property:persist.sys.debug.getaplog=0
|
||||
start stopaplog
|
||||
|
||||
service getqxdmlog /system/bin/getlog -q
|
||||
disabled
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
|
||||
service stopqxdmlog /system/bin/getlog -x
|
||||
disabled
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
|
||||
on property:persist.sys.debug.getqxdmlog=1
|
||||
restart getqxdmlog
|
||||
on property:persist.sys.debug.getqxdmlog=0
|
||||
start stopqxdmlog
|
||||
|
||||
service cpanrlog /system/bin/sh /system/etc/cpanrlog.sh
|
||||
disabled
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
|
||||
service cptomblog /system/bin/sh /system/etc/cptomblog.sh
|
||||
disabled
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
service gettcpdumplog /system/bin/getlog -t
|
||||
disabled
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
|
||||
service stoptcpdumplog /system/bin/getlog -p
|
||||
disabled
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
|
||||
service getpersistlog /system/bin/getpersistlog
|
||||
class main
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start getpersistlog
|
||||
on property:persist.sys.debug.gettcpdump=1
|
||||
restart gettcpdumplog
|
||||
on property:persist.sys.debug.gettcpdump=0
|
||||
start stoptcpdumplog
|
||||
|
||||
service getalllog /system/bin/sh /system/etc/getalllog.sh
|
||||
disabled
|
||||
user root
|
||||
oneshot
|
||||
seclabel u:r:logoem:s0
|
||||
on property:persist.sys.debug.getalllog=1
|
||||
restart getalllog
|
||||
on property:persist.sys.debug.getalllog=0
|
||||
stop getalllog
|
||||
# hq log end
|
||||
|
||||
service pd_mapper /system/vendor/bin/pd-mapper
|
||||
class core
|
||||
|
||||
#
|
||||
## QCA1530 SoC late_start group trigger
|
||||
#service gnss-init /system/vendor/bin/gnss.qca1530.sh init
|
||||
# class late_start
|
||||
# oneshot
|
||||
#
|
||||
## QCA1530 SoC Service Daemon
|
||||
#service gnss-svcd /system/vendor/bin/gnss.qca1530.sh start
|
||||
# class late_start
|
||||
# user root
|
||||
# group gps system qcom_diag diag log inet net_raw
|
||||
# disabled
|
||||
|
||||
on property:vendor.ims.QMI_DAEMON_STATUS=1
|
||||
start imsdatadaemon
|
||||
|
||||
service ims_rtp_daemon /system/vendor/bin/ims_rtp_daemon
|
||||
class main
|
||||
user system
|
||||
group radio diag inet log
|
||||
disabled
|
||||
|
||||
service vendor.imsrcsservice /system/vendor/bin/imsrcsd
|
||||
class main
|
||||
user system
|
||||
group radio diag inet log
|
||||
disabled
|
||||
|
||||
on property:vendor.ims.DATA_DAEMON_STATUS=1
|
||||
start ims_rtp_daemon
|
||||
start vendor.imsrcsservice
|
||||
|
||||
|
||||
service ppd /system/vendor/bin/mm-pp-dpps
|
||||
class late_start
|
||||
user system
|
||||
group system graphics
|
||||
socket pps stream 0660 system system
|
||||
disabled
|
||||
|
||||
on property:init.svc.surfaceflinger=stopped
|
||||
stop ppd
|
||||
|
||||
on property:init.svc.surfaceflinger=running
|
||||
start ppd
|
||||
|
||||
on property:init.svc.surfaceflinger=restarting
|
||||
stop ppd
|
||||
|
||||
on property:init.svc.zygote=stopped
|
||||
stop ppd
|
||||
|
||||
on property:init.svc.zygote=running
|
||||
start ppd
|
||||
|
||||
on property:init.svc.zygote=restarting
|
||||
stop ppd
|
||||
|
||||
on charger
|
||||
load_system_props
|
||||
start qcom-post-boot
|
||||
start hvdcp_opti
|
||||
setprop sys.usb.configfs 1
|
||||
start power_off_alarm
|
||||
# hq log
|
||||
setprop debug.charger.on 1
|
||||
|
||||
#
|
||||
#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 seempd /system/bin/seempd
|
||||
class late_start
|
||||
user system
|
||||
group system sdcard_rw
|
||||
socket seempdw dgram 0666 system system
|
||||
|
||||
service qfp-daemon /vendor/bin/qfp-daemon
|
||||
class late_start
|
||||
user system
|
||||
group system drmrpc diag input
|
||||
|
||||
service tlocd /system/bin/tloc_daemon
|
||||
class late_start
|
||||
user system
|
||||
group drmrpc
|
||||
|
||||
service hvdcp_opti /system/vendor/bin/hvdcp_opti
|
||||
class main
|
||||
user root
|
||||
group system wakelock
|
||||
|
||||
service smcinvoked /system/bin/smcinvoked
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
|
||||
# Add for ZQL5018-103 by Sven to set max charge current
|
||||
on property:sys.incall=true
|
||||
write /sys/class/power_supply/battery/constant_charge_current_max 500000
|
||||
|
||||
on property:sys.incall=false
|
||||
write /sys/class/power_supply/battery/constant_charge_current_max 2000000
|
||||
|
||||
#add for displayfeature
|
||||
service openad /system/vendor/bin/displayf_bin s 1
|
||||
user root
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:sys.hq.ad=1
|
||||
start openad
|
||||
|
||||
service closead /system/vendor/bin/displayf_bin s 0
|
||||
user root
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on property:sys.hq.ad=0
|
||||
start closead
|
|
@ -1,298 +0,0 @@
|
|||
# Copyright (c) 2012-2015, 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 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.
|
||||
#
|
||||
|
||||
# the DIAG device node is not world writable/readable.
|
||||
/dev/diag 0660 system oem_2901
|
||||
|
||||
/dev/genlock 0666 system system
|
||||
/dev/wlan 0660 wifi wifi
|
||||
/dev/kgsl 0666 system system
|
||||
/dev/kgsl-3d0 0666 system system
|
||||
/dev/kgsl-2d0 0666 root root
|
||||
/dev/kgsl-2d1 0666 root root
|
||||
/dev/ion 0664 system system
|
||||
/dev/rtc0 0660 system system
|
||||
/dev/smd0 0660 system system
|
||||
/dev/smd4 0660 system system
|
||||
/dev/smd_cxm_qmi 0640 radio radio
|
||||
/dev/smd5 0660 system system
|
||||
/dev/smd6 0660 system system
|
||||
/dev/smd7 0660 bluetooth bluetooth
|
||||
/dev/ccid_bridge 0660 system system
|
||||
/dev/ipa 0660 radio radio
|
||||
/dev/wwan_ioctl 0660 radio radio
|
||||
/dev/ipaNatTable 0660 radio radio
|
||||
/dev/rmnet_ctrl 0660 usb usb
|
||||
/dev/dpl_ctrl 0660 usb usb
|
||||
|
||||
#permissions for CSVT
|
||||
/dev/smd11 0660 radio radio
|
||||
|
||||
#permsissions for BT/FM
|
||||
/dev/smd2 0660 bluetooth bluetooth
|
||||
/dev/smd3 0660 bluetooth bluetooth
|
||||
/dev/btpower 0660 bluetooth system
|
||||
|
||||
#permissions for pta
|
||||
/dev/pta 0660 system system
|
||||
|
||||
/dev/radio0 0640 system system
|
||||
/dev/rfcomm0 0660 bluetooth bluetooth
|
||||
/dev/ttyUSB0 0660 bluetooth bluetooth
|
||||
/dev/smdcntl0 0640 radio radio
|
||||
/dev/smdcntl1 0640 radio radio
|
||||
/dev/smdcntl2 0640 radio radio
|
||||
/dev/smdcntl3 0640 radio radio
|
||||
/dev/smdcntl4 0640 radio radio
|
||||
/dev/smdcntl5 0640 radio radio
|
||||
/dev/smdcntl6 0640 radio radio
|
||||
/dev/smdcntl7 0640 radio radio
|
||||
/dev/smdcntl8 0640 radio radio
|
||||
/dev/smdcnt_rev0 0640 radio radio
|
||||
/dev/smdcnt_rev1 0640 radio radio
|
||||
/dev/smdcnt_rev2 0640 radio radio
|
||||
/dev/smdcnt_rev3 0640 radio radio
|
||||
/dev/smdcnt_rev4 0640 radio radio
|
||||
/dev/smdcnt_rev5 0640 radio radio
|
||||
/dev/smdcnt_rev6 0640 radio radio
|
||||
/dev/smdcnt_rev7 0640 radio radio
|
||||
/dev/smdcnt_rev8 0640 radio radio
|
||||
/dev/smuxctl32 0640 radio radio
|
||||
/dev/sdioctl0 0640 radio radio
|
||||
/dev/sdioctl1 0640 radio radio
|
||||
/dev/sdioctl2 0640 radio radio
|
||||
/dev/sdioctl3 0640 radio radio
|
||||
/dev/sdioctl4 0640 radio radio
|
||||
/dev/sdioctl5 0640 radio radio
|
||||
/dev/sdioctl6 0640 radio radio
|
||||
/dev/sdioctl7 0640 radio radio
|
||||
/dev/sdioctl8 0640 radio radio
|
||||
/dev/rmnet_mux_ctrl 0640 radio radio
|
||||
/dev/hsicctl0 0640 radio radio
|
||||
/dev/hsicctl1 0640 radio radio
|
||||
/dev/hsicctl2 0640 radio radio
|
||||
/dev/hsicctl3 0640 radio radio
|
||||
/dev/hsicctl4 0640 radio radio
|
||||
/dev/hsicctl5 0640 radio radio
|
||||
/dev/hsicctl6 0640 radio radio
|
||||
/dev/hsicctl7 0640 radio radio
|
||||
/dev/hsicctl8 0640 radio radio
|
||||
/dev/hsicctl9 0640 radio radio
|
||||
/dev/hsicctl10 0640 radio radio
|
||||
/dev/hsicctl11 0640 radio radio
|
||||
/dev/hsicctl12 0640 radio radio
|
||||
/dev/hsicctl13 0640 radio radio
|
||||
/dev/hsicctl14 0640 radio radio
|
||||
/dev/hsicctl15 0640 radio radio
|
||||
/dev/hsicctl16 0640 radio radio
|
||||
/dev/mhi_pipe_14 0640 radio radio
|
||||
/dev/mhi_pipe_16 0640 radio radio
|
||||
/dev/mhi_pipe_32 0640 radio radio
|
||||
/dev/at_usb0 0640 radio radio
|
||||
/dev/at_mdm0 0640 radio radio
|
||||
/dev/video* 0660 system camera
|
||||
/dev/media* 0660 system camera
|
||||
/dev/v4l-subdev* 0660 system camera
|
||||
/dev/qseecom 0660 system drmrpc
|
||||
/dev/smcinvoke 0660 system system
|
||||
/dev/qce 0660 system drmrpc
|
||||
/dev/qsee_ipc_irq_spss 0660 system drmrpc
|
||||
/dev/seemplog 0660 system system
|
||||
/dev/pft 0660 system drmrpc
|
||||
/dev/spcom 0660 system system
|
||||
/dev/sp_kernel 0660 system system
|
||||
/dev/sp_ssr 0660 system system
|
||||
/dev/sp_keymaster 0660 system system
|
||||
/dev/cryptoapp 0660 system system
|
||||
/dev/gemini0 0660 system camera
|
||||
/dev/jpeg0 0660 system camera
|
||||
/dev/jpeg1 0660 system camera
|
||||
/dev/jpeg2 0660 system camera
|
||||
/dev/jpeg3 0660 system camera
|
||||
/dev/adsprpc-smd 0664 system system
|
||||
/dev/system_health_monitor 0644 radio system
|
||||
/dev/mdss_rotator 0664 system system
|
||||
# wlan
|
||||
/dev/wcnss_wlan 0660 system system
|
||||
/dev/wcnss_ctrl 0660 system system
|
||||
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/wlan0/queues/rx-* rps_cpus 0660 system system
|
||||
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/p2p0/queues/rx-* rps_cpus 0660 system system
|
||||
/dev/spidev0.0 0660 system audio
|
||||
/dev/msm_camera/* 0660 system camera
|
||||
/dev/gemini/ 0660 system camera
|
||||
/dev/mercury0 0660 system camera
|
||||
/dev/msm_vidc_reg 0660 system audio
|
||||
/dev/msm_vidc_dec 0660 system audio
|
||||
/dev/msm_vidc_dec_sec 0660 system audio
|
||||
/dev/msm_vidc_enc 0660 system audio
|
||||
/dev/msm_rotator 0660 system system
|
||||
/dev/hw_random 0600 root root
|
||||
/dev/sdsprpc-smd 0660 system system
|
||||
|
||||
#permissions for audio
|
||||
/dev/wcd_dsp0_control 0660 system audio
|
||||
/dev/wcd-dsp-glink 0660 system audio
|
||||
/dev/audio_slimslave 0660 system audio
|
||||
/dev/msm_qcelp 0660 system audio
|
||||
/dev/msm_evrc 0660 system audio
|
||||
/dev/msm_wma 0660 system audio
|
||||
/dev/msm_wmapro 0660 system audio
|
||||
/dev/msm_alac 0660 system audio
|
||||
/dev/msm_ape 0660 system audio
|
||||
/dev/msm_amrnb 0660 system audio
|
||||
/dev/msm_amrwb 0660 system audio
|
||||
/dev/msm_amrwbplus 0660 system audio
|
||||
/dev/msm_aac 0660 system audio
|
||||
/dev/msm_multi_aac 0660 system audio
|
||||
/dev/msm_aac_in 0660 system audio
|
||||
/dev/msm_qcelp_in 0660 system audio
|
||||
/dev/msm_evrc_in 0660 system audio
|
||||
/dev/msm_amrnb_in 0660 system audio
|
||||
/dev/msm_amrwb_in 0660 system audio
|
||||
/dev/msm_a2dp_in 0660 system audio
|
||||
/dev/msm_ac3 0660 system audio
|
||||
/dev/msm_audio_cal 0660 system audio
|
||||
/dev/msm_hweffects 0660 system audio
|
||||
/dev/msm_cad 0660 system audio
|
||||
/dev/msm_fm 0660 system audio
|
||||
/dev/msm_mvs 0660 system audio
|
||||
/dev/msm_pcm_lp_dec 0660 system audio
|
||||
/dev/msm_preproc_ctl 0660 system audio
|
||||
/dev/msm_rtac 0660 system audio
|
||||
/dev/msm_voicememo 0660 system audio
|
||||
/dev/ttyHSL1 0660 system system
|
||||
/dev/ttyHS1 0660 system system
|
||||
/dev/mdm 0660 system radio
|
||||
/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio
|
||||
/dev/sdio_tty_ciq_00 0660 system system
|
||||
/dev/tty_sdio_00 0660 system system
|
||||
/dev/ttyGS0 0660 system system
|
||||
/dev/i2c-5 0660 media media
|
||||
/dev/avtimer 0660 system audio
|
||||
|
||||
# DVB devices
|
||||
/dev/dvb/adapter0/demux* 0440 media media
|
||||
/dev/dvb/adapter0/dvr* 0660 media media
|
||||
/dev/dvb/adapter0/video* 0660 media media
|
||||
|
||||
# Broadcast devices
|
||||
/dev/tsc_mux0 0660 media media
|
||||
/dev/tsc_ci0 0660 media media
|
||||
|
||||
# sensors
|
||||
/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
|
||||
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable 0660 input system
|
||||
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* poll_delay 0660 input system
|
||||
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_wakeup 0660 input system
|
||||
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* max_latency 0660 input system
|
||||
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* flush 0660 input system
|
||||
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* calibrate 0660 input system
|
||||
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable 0660 input system
|
||||
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* poll_delay 0660 input system
|
||||
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable_wakeup 0660 input system
|
||||
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* max_latency 0660 input system
|
||||
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* flush 0660 input system
|
||||
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* calibrate 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/proximity ps_adc 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system
|
||||
/sys/devices/virtual/input/input* poll 0660 input system
|
||||
/sys/devices/virtual/input/input* pollrate_ms 0660 input system
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch 0440 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch_enable 0660 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch 0440 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch_enable 0660 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch 0440 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch_enable 0660 system drmrpc
|
||||
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch 0440 system drmrpc
|
||||
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch_enable 0660 system drmrpc
|
||||
|
||||
# laser sensor access
|
||||
/sys/devices/virtual/input/input* enable_ps_sensor 0660 system input
|
||||
/sys/devices/virtual/input/input* set_delay_ms 0660 system input
|
||||
/sys/devices/virtual/input/input* do_flush 0660 system input
|
||||
|
||||
# vm_bms
|
||||
/dev/vm_bms 0660 system system
|
||||
/dev/battery_data 0660 system system
|
||||
|
||||
# wlan
|
||||
/dev/wcnss_wlan 0660 system system
|
||||
/dev/wcnss_ctrl 0660 system system
|
||||
/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan0/queues/rx-* rps_cpus 0660 system system
|
||||
/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/p2p0/queues/rx-* rps_cpus 0660 system system
|
||||
|
||||
# wigig
|
||||
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/fst_link_loss 0660 wifi wifi
|
||||
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/thermal_throttling 0660 system system
|
||||
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/snr_thresh 0660 wifi wifi
|
||||
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/queues/rx-0/rps_cpus 0660 system system
|
||||
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/gro_flush_timeout 0660 system system
|
||||
/sys/devices/virtual/net/bond0 queues/rx-0/rps_cpus 0660 system system
|
||||
|
||||
#nfc permissions
|
||||
/dev/nfc-nci 0660 nfc nfc
|
||||
/dev/nq-nci 0660 nfc nfc
|
||||
/dev/assd 0660 nfc nfc
|
||||
|
||||
# UIO devices
|
||||
/dev/uio0 0660 system system
|
||||
/dev/uio1 0660 system system
|
||||
/dev/uio2 0660 system system
|
||||
|
||||
# SSR devices
|
||||
/dev/subsys_* 0640 system system
|
||||
|
||||
# Ultrasound device
|
||||
/dev/usf1 0660 system system
|
||||
|
||||
# Ramdump devices
|
||||
/dev/ramdump* 0640 system system
|
||||
|
||||
# Fingerprint device
|
||||
/dev/qbt1000 0660 system system
|
||||
|
||||
#ImproveTouch device
|
||||
/dev/hbtp_input 0660 system system
|
||||
/dev/hbtp_vm 0660 system system
|
||||
|
||||
# Add device block for FRP
|
||||
/dev/block/platform/soc/7824900.sdhci/by-name/config 0600 system system
|
||||
/dev/block/platform/soc/7464900.sdhci/by-name/frp 0600 system system
|
||||
/dev/block/platform/soc/624000.ufshc/by-name/frp 0600 system system
|
||||
/dev/block/platform/soc/1da4000.ufshc/by-name/frp 0600 system system
|
||||
/dev/block/platform/soc/c0c4000.sdhci/by-name/frp 0600 system system
|
||||
/dev/block/platform/soc/1d84000.ufshc/by-name/frp 0600 system system
|
||||
|
||||
# Add device block for FRP with soc.0
|
||||
/dev/block/platform/soc.0/7824900.sdhci/by-name/config 0600 system system
|
||||
|
||||
# Kmsg device
|
||||
/dev/kmsg 0620 root system
|
Loading…
Reference in a new issue