sm6225-common: Import rootdir from hawao S2SE32.28-41-1
Change-Id: I99ed9854b90396e594714124719ecb37d6cf5eae
This commit is contained in:
parent
4dd930f3fa
commit
c5327f4fe1
24 changed files with 12601 additions and 1 deletions
25
bengal.mk
25
bengal.mk
|
@ -52,7 +52,30 @@ PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
||||||
|
|
||||||
# Rootdir
|
# Rootdir
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
init.recovery.qcom.rc
|
hardware_revisions.sh \
|
||||||
|
init.class_main.sh \
|
||||||
|
init.mdm.sh \
|
||||||
|
init.mmi.boot.sh \
|
||||||
|
init.mmi.laser.sh \
|
||||||
|
init.mmi.touch.sh \
|
||||||
|
init.oem.fingerprint2.sh \
|
||||||
|
init.oem.hw.sh \
|
||||||
|
init.qcom.early_boot.sh \
|
||||||
|
init.qcom.post_boot.sh \
|
||||||
|
init.qcom.sh \
|
||||||
|
init.qti.dcvs.sh \
|
||||||
|
init.qti.early_init.sh \
|
||||||
|
fstab.qcom \
|
||||||
|
init.mmi.charge_only.rc \
|
||||||
|
init.mmi.chipset.rc \
|
||||||
|
init.mmi.debug.rc \
|
||||||
|
init.mmi.overlay.rc \
|
||||||
|
init.mmi.rc \
|
||||||
|
init.qcom.factory.rc \
|
||||||
|
init.qcom.rc \
|
||||||
|
init.recovery.qcom.rc \
|
||||||
|
init.target.rc \
|
||||||
|
ueventd.qcom.rc \
|
||||||
|
|
||||||
# Shipping API level
|
# Shipping API level
|
||||||
BOARD_API_LEVEL := 30
|
BOARD_API_LEVEL := 30
|
||||||
|
|
|
@ -1,4 +1,173 @@
|
||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := hardware_revisions.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := bin/hardware_revisions.sh
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.class_main.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
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
|
||||||
|
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.mmi.boot.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := bin/init.mmi.boot.sh
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.mmi.laser.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := bin/init.mmi.laser.sh
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.mmi.touch.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := bin/init.mmi.touch.sh
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.oem.fingerprint2.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := bin/init.oem.fingerprint2.sh
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.oem.hw.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := bin/init.oem.hw.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
|
||||||
|
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.post_boot.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
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.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
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.qti.dcvs.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := bin/init.qti.dcvs.sh
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.qti.early_init.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := bin/init.qti.early_init.sh
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := fstab.qcom
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/fstab.qcom
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.mmi.charge_only.rc
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/init.mmi.charge_only.rc
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.mmi.chipset.rc
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/init.mmi.chipset.rc
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.mmi.debug.rc
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/init.mmi.debug.rc
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.mmi.overlay.rc
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/init.mmi.overlay.rc
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.mmi.rc
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/init.mmi.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
|
||||||
|
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
|
||||||
|
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)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := init.recovery.qcom.rc
|
LOCAL_MODULE := init.recovery.qcom.rc
|
||||||
|
@ -7,3 +176,20 @@ LOCAL_MODULE_CLASS := ETC
|
||||||
LOCAL_SRC_FILES := etc/init.recovery.qcom.rc
|
LOCAL_SRC_FILES := etc/init.recovery.qcom.rc
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.target.rc
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
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
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/ueventd.qcom.rc
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
328
rootdir/bin/hardware_revisions.sh
Executable file
328
rootdir/bin/hardware_revisions.sh
Executable file
|
@ -0,0 +1,328 @@
|
||||||
|
#!/vendor/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013-2016, Motorola LLC All rights reserved.
|
||||||
|
#
|
||||||
|
# The purpose of this script is to compile information about the hardware
|
||||||
|
# versions of various devices on each unit. This is useful when searching
|
||||||
|
# through reported issues for correlations with certain hardware revisions.
|
||||||
|
# The information is collected from various locations in proc and sysfs (some
|
||||||
|
# of which are product-specific) and compiled into small, single-line text
|
||||||
|
# files in the userdata partition, one for each type of device. The format of
|
||||||
|
# these lines are as follows:
|
||||||
|
#
|
||||||
|
# MOTHREV-vX
|
||||||
|
# hw_name=XXXXX
|
||||||
|
# vendor_id=XXXXX
|
||||||
|
# hw_rev=XXXXX
|
||||||
|
# date=XXXXX
|
||||||
|
# lot_code=XXXXX
|
||||||
|
# fw_rev=XXXXX
|
||||||
|
# size=XXXXMB
|
||||||
|
# (components may also add additional fields to the ones above)
|
||||||
|
#
|
||||||
|
# The extact format of each field will be device-specific, but should be
|
||||||
|
# consistent across a particular hardware platform. Note that each revision
|
||||||
|
# data file is rewritten every time this script is called. This ensures that
|
||||||
|
# any future format changes to the revision files are picked up.
|
||||||
|
#
|
||||||
|
# While the method used to read the information should be consistent on a given
|
||||||
|
# platform, the specific path to a device's information may vary between
|
||||||
|
# products. The hardware_revisions.conf file provides a way to adjust those
|
||||||
|
# paths from the default.
|
||||||
|
#
|
||||||
|
|
||||||
|
export PATH=/vendor/bin:$PATH
|
||||||
|
|
||||||
|
# Output destination and permissions
|
||||||
|
OUT_PATH=/data/vendor/hardware_revisions
|
||||||
|
OUT_USR=system
|
||||||
|
OUT_GRP=system
|
||||||
|
OUT_PERM=0644
|
||||||
|
OUT_PATH_PERM=0755
|
||||||
|
|
||||||
|
# Default paths to hardware information
|
||||||
|
PATH_RAM=/sys/ram
|
||||||
|
PATH_NVM=/sys/block/mmcblk0/device
|
||||||
|
PATH_STORAGE=/sys/storage
|
||||||
|
PATH_SDCARD=/sys/block/mmcblk1/device
|
||||||
|
PATH_TOUCH_CLASS="/sys/class/touchscreen/"`cd /sys/class/touchscreen && ls */ic_ver | sed 's/ic_ver//g'`
|
||||||
|
PATH_TOUCH="/sys/bus/i2c/drivers/"`cd /sys/bus/i2c/drivers && ls */?-*/ic_ver | sed 's/ic_ver//g'`
|
||||||
|
PATH_TOUCH_SPI="/sys/bus/spi/drivers/"`cd /sys/bus/spi/drivers && ls */*.?/ic_ver | sed 's/ic_ver//g'`
|
||||||
|
PATH_DISPLAY=/sys/class/graphics/fb0
|
||||||
|
PATH_DISPLAY_DRM=/sys/class/drm/card0-DSI-1
|
||||||
|
PATH_PMIC=/sys/hardware_revisions/pmic
|
||||||
|
|
||||||
|
# Product-specific overrides
|
||||||
|
[ -e /vendor/etc/hardware_revisions.conf ] && . /vendor/etc/hardware_revisions.conf
|
||||||
|
|
||||||
|
#
|
||||||
|
# Clear out all revision data in this directory. If in the future we decide
|
||||||
|
# to remove a component, we want to make sure any old files are not present.
|
||||||
|
rm /data/vendor/hardware_revisions/*
|
||||||
|
|
||||||
|
#
|
||||||
|
# Append one piece of revision data to a given file. If a value is blank,
|
||||||
|
# then nothing will be written.
|
||||||
|
#
|
||||||
|
# $1 - tag
|
||||||
|
# $2 - value
|
||||||
|
# $3 - file to write
|
||||||
|
write_one_revision_data()
|
||||||
|
{
|
||||||
|
if [ -n "${2}" ]; then
|
||||||
|
VALUE="${2}"
|
||||||
|
echo "${1}=${VALUE}" >> ${3}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate the common data contained for
|
||||||
|
# all hardware peripherals
|
||||||
|
#
|
||||||
|
# $1 - file to write to
|
||||||
|
# $2 - name
|
||||||
|
# $3 - vendor ID
|
||||||
|
# $4 - hardware revision
|
||||||
|
# $5 - date
|
||||||
|
# $6 - lot code
|
||||||
|
# $7 - firmware revision
|
||||||
|
create_common_revision_data()
|
||||||
|
{
|
||||||
|
FILE="${1}"
|
||||||
|
echo "MOTHREV-v2" > ${FILE}
|
||||||
|
|
||||||
|
write_one_revision_data "hw_name" "${2}" ${FILE}
|
||||||
|
write_one_revision_data "vendor_id" "${3}" ${FILE}
|
||||||
|
write_one_revision_data "hw_rev" "${4}" ${FILE}
|
||||||
|
write_one_revision_data "date" "${5}" ${FILE}
|
||||||
|
write_one_revision_data "lot_code" "${6}" ${FILE}
|
||||||
|
write_one_revision_data "fw_rev" "${7}" ${FILE}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Applies the appropriate file permissions to the
|
||||||
|
# hardware revision data file.
|
||||||
|
#
|
||||||
|
# $1 - file to write to
|
||||||
|
apply_revision_data_perms()
|
||||||
|
{
|
||||||
|
chown ${OUT_USR}.${OUT_GRP} "${1}"
|
||||||
|
chmod ${OUT_PERM} "${1}"
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir -p ${OUT_PATH}
|
||||||
|
chown ${OUT_USR}.${OUT_GRP} ${OUT_PATH}
|
||||||
|
chmod ${OUT_PATH_PERM} ${OUT_PATH}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Compile ram
|
||||||
|
#
|
||||||
|
FILE="${OUT_PATH}/ram"
|
||||||
|
HNAME=
|
||||||
|
VEND=
|
||||||
|
HREV=
|
||||||
|
DATE=
|
||||||
|
FREV=
|
||||||
|
LOT_CODE=
|
||||||
|
INFO=
|
||||||
|
SIZE=
|
||||||
|
if [ -d "${PATH_RAM}" ] ; then
|
||||||
|
HNAME=`cat ${PATH_RAM}/type`
|
||||||
|
VEND=`cat ${PATH_RAM}/info`
|
||||||
|
VEND="${VEND%%:*:*}"
|
||||||
|
INFO="$(cat ${PATH_RAM}/mr5),$(cat ${PATH_RAM}/mr6),$(cat ${PATH_RAM}/mr7),\
|
||||||
|
$(cat ${PATH_RAM}/mr8)"
|
||||||
|
SIZE=`cat ${PATH_RAM}/size`
|
||||||
|
fi
|
||||||
|
create_common_revision_data "${FILE}" "${HNAME}" "${VEND}" "" "" "" ""
|
||||||
|
write_one_revision_data "config_info" "${INFO}" "${FILE}"
|
||||||
|
write_one_revision_data "size" "${SIZE}" "${FILE}"
|
||||||
|
apply_revision_data_perms "${FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Compile nvm
|
||||||
|
#
|
||||||
|
FILE="${OUT_PATH}/nvm"
|
||||||
|
HNAME=
|
||||||
|
VEND=
|
||||||
|
HREV=
|
||||||
|
DATE=
|
||||||
|
FREV=
|
||||||
|
LOT_CODE=
|
||||||
|
SIZE=
|
||||||
|
if [ -d "${PATH_NVM}" ] ; then
|
||||||
|
HNAME=`cat ${PATH_NVM}/type`
|
||||||
|
if [ -d "${PATH_STORAGE}" ] ; then
|
||||||
|
VEND=`cat ${PATH_STORAGE}/vendor`
|
||||||
|
SIZE=$((1024 * `cat ${PATH_STORAGE}/size | sed 's/[^0-9]//g'`))
|
||||||
|
else
|
||||||
|
VEND=`cat ${PATH_NVM}/manfid`
|
||||||
|
SIZE=$((1024 * `getprop ro.boot.storage | sed 's/[^0-9]//g'`))
|
||||||
|
fi
|
||||||
|
HREV=`cat ${PATH_NVM}/name`
|
||||||
|
DATE=`cat ${PATH_NVM}/date`
|
||||||
|
if [ -e ${PATH_NVM}/device_version -a -e ${PATH_NVM}/firmware_version ] ; then
|
||||||
|
FREV="$(cat ${PATH_NVM}/device_version),$(cat ${PATH_NVM}/firmware_version)"
|
||||||
|
else
|
||||||
|
FREV="$(cat ${PATH_NVM}/hwrev),$(cat ${PATH_NVM}/fwrev)"
|
||||||
|
fi
|
||||||
|
LOT_CODE="$(cat ${PATH_NVM}/csd)"
|
||||||
|
else
|
||||||
|
if [ -d "${PATH_STORAGE}" ] ; then
|
||||||
|
HNAME=`cat ${PATH_STORAGE}/type`
|
||||||
|
VEND=`cat ${PATH_STORAGE}/vendor`
|
||||||
|
HREV=`cat ${PATH_STORAGE}/model`
|
||||||
|
FREV=`cat ${PATH_STORAGE}/fw`
|
||||||
|
SIZE=$((1024 * `cat ${PATH_STORAGE}/size | sed 's/[^0-9]//g'`))
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
create_common_revision_data "${FILE}" "${HNAME}" "${VEND}" "${HREV}" "${DATE}" "${LOT_CODE}" "${FREV}"
|
||||||
|
write_one_revision_data "size" "${SIZE}" "${FILE}"
|
||||||
|
apply_revision_data_perms "${FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Compile ap
|
||||||
|
#
|
||||||
|
FILE="${OUT_PATH}/ap"
|
||||||
|
HNAME=
|
||||||
|
VEND=
|
||||||
|
HREV=
|
||||||
|
DATE=
|
||||||
|
FREV=
|
||||||
|
LOT_CODE=
|
||||||
|
if [ -e "/proc/cpuinfo" ]; then
|
||||||
|
PREVIFS="$IFS"
|
||||||
|
IFS="
|
||||||
|
"
|
||||||
|
for CPU in `cat /proc/cpuinfo` ; do
|
||||||
|
KEY="${CPU%:*}"
|
||||||
|
VAL="${CPU#*: }"
|
||||||
|
case "${KEY}" in
|
||||||
|
Processor*) HNAME="${VAL}" ;;
|
||||||
|
*implementer*) VEND="${VAL}" ;;
|
||||||
|
*variant*) HREV="${VAL}" ;;
|
||||||
|
*part*) HREV="${HREV},${VAL}" ;;
|
||||||
|
*revision*) HREV="${HREV},${VAL}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
IFS="$PREVIFS"
|
||||||
|
fi
|
||||||
|
create_common_revision_data "${FILE}" "${HNAME}" "${VEND}" "${HREV}" "" "" ""
|
||||||
|
apply_revision_data_perms "${FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# copy pmic data
|
||||||
|
#
|
||||||
|
if [ -e "/sys/hardware_revisions/pmic" ]; then
|
||||||
|
cat /sys/hardware_revisions/pmic > ${OUT_PATH}/pmic
|
||||||
|
else
|
||||||
|
create_common_revision_data "${OUT_PATH}/pmic" "" "" "" "" "" ""
|
||||||
|
fi
|
||||||
|
apply_revision_data_perms "${OUT_PATH}/pmic"
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# copy display data
|
||||||
|
# PATH_DISPLAY_DRM is the sys file path name for DRM display driver
|
||||||
|
# PATH_DISPLAY is the path name for the old FB driver
|
||||||
|
#
|
||||||
|
FILE="${OUT_PATH}/display"
|
||||||
|
HNAME=
|
||||||
|
VEND=
|
||||||
|
HREV=
|
||||||
|
if [ -e ${PATH_DISPLAY_DRM}/panelName ] ; then
|
||||||
|
HNAME=`cat ${PATH_DISPLAY_DRM}/panelName`
|
||||||
|
VEND=`cat ${PATH_DISPLAY_DRM}/panelSupplier`
|
||||||
|
HREV=`cat ${PATH_DISPLAY_DRM}/panelVer`
|
||||||
|
else
|
||||||
|
HNAME=`cat ${PATH_DISPLAY}/panel_name`
|
||||||
|
VEND=`cat ${PATH_DISPLAY}/panel_supplier`
|
||||||
|
HREV=`cat ${PATH_DISPLAY}/panel_ver`
|
||||||
|
fi
|
||||||
|
create_common_revision_data "${FILE}" "${HNAME}" "${VEND}" "${HREV}" "" "" ""
|
||||||
|
apply_revision_data_perms "${FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Compile touchscreen
|
||||||
|
#
|
||||||
|
FILE="${OUT_PATH}/touchscreen"
|
||||||
|
HNAME=
|
||||||
|
VEND=
|
||||||
|
HREV=
|
||||||
|
DATE=
|
||||||
|
FREV=
|
||||||
|
LOT_CODE=
|
||||||
|
|
||||||
|
# If there is the touchclass path, then access the nodes under the path to get the touch related
|
||||||
|
# information, otherwise access the path originally defined by the script.
|
||||||
|
if [ -e "${PATH_TOUCH_CLASS}/vendor" ]; then
|
||||||
|
HNAME=`cat ${PATH_TOUCH_CLASS}/vendor`
|
||||||
|
ICVER=`cat -e ${PATH_TOUCH_CLASS}/ic_ver`
|
||||||
|
if [ "$HNAME" ]; then
|
||||||
|
VEND="${ICVER##*'Product ID: '}"
|
||||||
|
VEND="${VEND%%\$*}"
|
||||||
|
FREV="${ICVER##*'Build ID: '}"
|
||||||
|
FREV="${FREV%%\$*}"
|
||||||
|
LOT_CODE="${ICVER##*'Config ID: '}"
|
||||||
|
LOT_CODE="${LOT_CODE%%\$*}"
|
||||||
|
fi
|
||||||
|
elif [ -e "${PATH_TOUCH_SPI}/name" ]; then
|
||||||
|
HNAME=`cat ${PATH_TOUCH_SPI}/name`
|
||||||
|
ICVER=`cat -e ${PATH_TOUCH_SPI}/ic_ver`
|
||||||
|
case "$HNAME" in
|
||||||
|
focaltech*)
|
||||||
|
VEND="${ICVER##*'Product ID: '}"
|
||||||
|
VEND="${VEND%%\$*}"
|
||||||
|
FREV="${ICVER##*'Build ID: '}"
|
||||||
|
FREV="${FREV%%\$*}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
if [ -e "${PATH_TOUCH}/name" ]; then
|
||||||
|
HNAME=`cat ${PATH_TOUCH}/name`
|
||||||
|
ICVER=`cat -e ${PATH_TOUCH}/ic_ver`
|
||||||
|
case "${HNAME}" in
|
||||||
|
melfas*)
|
||||||
|
VEND="Melfas"
|
||||||
|
HREV="${ICVER##*'HW Revision:'}"
|
||||||
|
HREV="${HREV%%\$*}"
|
||||||
|
FREV="${ICVER##*'Core FW ver:'}"
|
||||||
|
FREV="${FREV%%\$*}"
|
||||||
|
;;
|
||||||
|
cyttsp*)
|
||||||
|
VEND="${ICVER##*'Custom ID:'}"
|
||||||
|
VEND="${VEND%%\$*}"
|
||||||
|
VEND="Cypress,${VEND}"
|
||||||
|
HREV="${ICVER##*'TTSP Version:'}"
|
||||||
|
HREV="${HREV%%\$*}"
|
||||||
|
FREV="${ICVER##*'Application Version:'}"
|
||||||
|
FREV="${FREV%%\$*}"
|
||||||
|
;;
|
||||||
|
atmxt*)
|
||||||
|
VEND="Atmel"
|
||||||
|
HREV="${ICVER##*'Family ID:'}"
|
||||||
|
HREV1="${ICVER##*'Variant ID:'}"
|
||||||
|
HREV="${HREV%%\$*},${HREV1%%\$*}"
|
||||||
|
FREV="${ICVER##*'Version:'}"
|
||||||
|
FREV1="${ICVER##*'Build:'}"
|
||||||
|
FREV="${FREV%%\$*},${FREV1%%\$*}"
|
||||||
|
;;
|
||||||
|
synaptics*)
|
||||||
|
VEND="${ICVER##*'Product ID: '}"
|
||||||
|
VEND="${VEND%%\$*}"
|
||||||
|
FREV="${ICVER##*'Build ID: '}"
|
||||||
|
FREV="${FREV%%\$*}"
|
||||||
|
LOT_CODE="${ICVER##*'Config ID: '}"
|
||||||
|
LOT_CODE="${LOT_CODE%%\$*}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
create_common_revision_data "${FILE}" "${HNAME}" "${VEND}" "${HREV}" "${DATE}" "${LOT_CODE}" "${FREV}"
|
||||||
|
apply_revision_data_perms "${FILE}"
|
155
rootdir/bin/init.class_main.sh
Executable file
155
rootdir/bin/init.class_main.sh
Executable file
|
@ -0,0 +1,155 @@
|
||||||
|
#! /vendor/bin/sh
|
||||||
|
|
||||||
|
# Copyright (c) 2013-2014, 2019 The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# start ril-daemon only for targets on which radio is present
|
||||||
|
#
|
||||||
|
baseband=`getprop ro.baseband`
|
||||||
|
sgltecsfb=`getprop persist.vendor.radio.sglte_csfb`
|
||||||
|
datamode=`getprop persist.vendor.data.mode`
|
||||||
|
low_ram=`getprop ro.config.low_ram`
|
||||||
|
qcrild_status=true
|
||||||
|
|
||||||
|
case "$baseband" in
|
||||||
|
"apq" | "sda" | "qcs" )
|
||||||
|
setprop ro.vendor.radio.noril yes
|
||||||
|
stop vendor.ril-daemon
|
||||||
|
stop vendor.qcrild
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$baseband" in
|
||||||
|
"msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6")
|
||||||
|
|
||||||
|
# For older modem packages launch ril-daemon.
|
||||||
|
if [ -f /vendor/firmware_mnt/verinfo/ver_info.txt ]; then
|
||||||
|
modem=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
|
||||||
|
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||||
|
sed 's/.*MPSS.\(.*\)/\1/g' | cut -d \. -f 1`
|
||||||
|
if [ "$modem" = "AT" ]; then
|
||||||
|
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
|
||||||
|
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||||
|
sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1`
|
||||||
|
if [ ! -z $version ]; then
|
||||||
|
if [ "$version" \< "3.1" ]; then
|
||||||
|
qcrild_status=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [ "$modem" = "TA" ]; then
|
||||||
|
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
|
||||||
|
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||||
|
sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1`
|
||||||
|
if [ ! -z $version ]; then
|
||||||
|
if [ "$version" \< "3.0" ]; then
|
||||||
|
qcrild_status=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [ "$modem" = "JO" ]; then
|
||||||
|
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
|
||||||
|
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||||
|
sed 's/.*JO.\(.*\)/\1/g' | cut -d \- -f 1`
|
||||||
|
if [ ! -z $version ]; then
|
||||||
|
if [ "$version" \< "3.2" ]; then
|
||||||
|
qcrild_status=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [ "$modem" = "TH" ]; then
|
||||||
|
qcrild_status=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$qcrild_status" = "true" ]; then
|
||||||
|
# Make sure both rild, qcrild are not running at same time.
|
||||||
|
# This is possible with vanilla aosp system image.
|
||||||
|
stop vendor.ril-daemon
|
||||||
|
|
||||||
|
start vendor.qcrild
|
||||||
|
else
|
||||||
|
start vendor.ril-daemon
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$baseband" in
|
||||||
|
"svlte2a" | "csfb")
|
||||||
|
start qmiproxy
|
||||||
|
;;
|
||||||
|
"sglte" | "sglte2" )
|
||||||
|
if [ "x$sgltecsfb" != "xtrue" ]; then
|
||||||
|
start qmiproxy
|
||||||
|
else
|
||||||
|
setprop persist.vendor.radio.voice.modem.index 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
multisim=`getprop persist.radio.multisim.config`
|
||||||
|
|
||||||
|
if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
|
||||||
|
if [ "$qcrild_status" = "true" ]; then
|
||||||
|
start vendor.qcrild2
|
||||||
|
else
|
||||||
|
start vendor.ril-daemon2
|
||||||
|
fi
|
||||||
|
elif [ "$multisim" = "tsts" ]; then
|
||||||
|
if [ "$qcrild_status" = "true" ]; then
|
||||||
|
start vendor.qcrild2
|
||||||
|
start vendor.qcrild3
|
||||||
|
else
|
||||||
|
start vendor.ril-daemon2
|
||||||
|
start vendor.ril-daemon3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$datamode" in
|
||||||
|
"tethered")
|
||||||
|
start vendor.dataqti
|
||||||
|
if [ "$low_ram" != "true" ]; then
|
||||||
|
start vendor.dataadpl
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"concurrent")
|
||||||
|
start vendor.dataqti
|
||||||
|
if [ "$low_ram" != "true" ]; then
|
||||||
|
start vendor.dataadpl
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Allow persistent faking of bms
|
||||||
|
# User needs to set fake bms charge in persist.vendor.bms.fake_batt_capacity
|
||||||
|
#
|
||||||
|
fake_batt_capacity=`getprop persist.vendor.bms.fake_batt_capacity`
|
||||||
|
case "$fake_batt_capacity" in
|
||||||
|
"") ;; #Do nothing here
|
||||||
|
* )
|
||||||
|
echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity
|
||||||
|
;;
|
||||||
|
esac
|
34
rootdir/bin/init.mdm.sh
Executable file
34
rootdir/bin/init.mdm.sh
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#! /vendor/bin/sh
|
||||||
|
|
||||||
|
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of Linux Foundation nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
baseband=`getprop ro.baseband`
|
||||||
|
if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then
|
||||||
|
start vendor.mdm_helper
|
||||||
|
fi
|
||||||
|
|
151
rootdir/bin/init.mmi.boot.sh
Executable file
151
rootdir/bin/init.mmi.boot.sh
Executable file
|
@ -0,0 +1,151 @@
|
||||||
|
#!/vendor/bin/sh
|
||||||
|
|
||||||
|
PATH=/sbin:/vendor/sbin:/vendor/bin:/vendor/xbin
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
scriptname=${0##*/}
|
||||||
|
|
||||||
|
notice()
|
||||||
|
{
|
||||||
|
echo "$*"
|
||||||
|
echo "$scriptname: $*" > /dev/kmsg
|
||||||
|
}
|
||||||
|
|
||||||
|
# We take this from cpuinfo because hex "letters" are lowercase there
|
||||||
|
set -A cinfo `cat /proc/cpuinfo | sed -n "/Revision/p"`
|
||||||
|
hw=${cinfo[2]#?}
|
||||||
|
|
||||||
|
# Now "cook" the value so it can be matched against devtree names
|
||||||
|
m2=${hw%?}
|
||||||
|
minor2=${hw#$m2}
|
||||||
|
m1=${m2%?}
|
||||||
|
minor1=${m2#$m1}
|
||||||
|
if [ "$minor2" == "0" ]; then
|
||||||
|
minor2=""
|
||||||
|
if [ "$minor1" == "0" ]; then
|
||||||
|
minor1=""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
setprop ro.vendor.hw.revision p${hw%??}$minor1$minor2
|
||||||
|
unset hw cinfo m1 m2 minor1 minor2
|
||||||
|
|
||||||
|
# reload UTAGS
|
||||||
|
utag_status=$(cat /proc/config/reload)
|
||||||
|
if [ "$utag_status" == "2" ]; then
|
||||||
|
notice "Utags are not ready, reloading"
|
||||||
|
echo 1 > /proc/config/reload
|
||||||
|
utag_status=$(cat /proc/config/reload)
|
||||||
|
[ "$utag_status" != "0" ] && notice "Utags failed to reload"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Export these for factory validation purposes
|
||||||
|
iccid=$(cat /proc/config/iccid/ascii 2>/dev/null)
|
||||||
|
if [ ! -z "$iccid" ]; then
|
||||||
|
setprop ro.vendor.mot.iccid $iccid
|
||||||
|
fi
|
||||||
|
unset iccid
|
||||||
|
cust_md5=$(cat /proc/config/cust_md5/ascii 2>/dev/null)
|
||||||
|
if [ ! -z "$cust_md5" ]; then
|
||||||
|
setprop ro.vendor.mot.cust_md5 $cust_md5
|
||||||
|
fi
|
||||||
|
unset cust_md5
|
||||||
|
|
||||||
|
# Get FTI data and catch old units with incorrect/missing UTAG_FTI
|
||||||
|
pds_fti=/mnt/vendor/persist/factory/fti
|
||||||
|
if [ -r $pds_fti ]; then
|
||||||
|
set -A fti $(od -A n -t x1 $pds_fti 2>/dev/null | tr '[A-F]' '[a-f]')
|
||||||
|
else
|
||||||
|
notice "Can not read FTI data in persist"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If UTAG_FTI is readable, compare checksums
|
||||||
|
# and if they mismatch, assume PDS is valid and overwrite UTAG
|
||||||
|
utag_fti=/proc/config/fti
|
||||||
|
if [ -r $utag_fti/ascii ]; then
|
||||||
|
set -A fti_utag $(cat ${utag_fti}/raw | sed 's/../& /g' | tr '[A-F]' '[a-f]')
|
||||||
|
# Byte 128 is total cksum, if nothing there, PDS data is invalid/missing
|
||||||
|
if [ ! -z "${fti[127]}" ]; then
|
||||||
|
# Make sure fti in UTAG is the same as in persist. Checksum comparison
|
||||||
|
if [ "${fti[126]}" != "${fti_utag[126]}" -o "${fti[127]}" != "${fti_utag[127]}" ]; then
|
||||||
|
notice "Copying FTI data from persist"
|
||||||
|
cat $pds_fti > ${utag_fti}/raw
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# If PDS data is invalid, take UTAG and hope it is correct
|
||||||
|
notice "Will use FTI from UTAG"
|
||||||
|
set -A fti $(od -A n -t x1 ${utag_fti}/ascii 2>/dev/null)
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
notice "Missing FTI UTAG; copying from persist"
|
||||||
|
echo fti > /proc/config/all/new
|
||||||
|
cat $pds_fti > ${utag_fti}/raw
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Read HW version from FTI data
|
||||||
|
hw_v1="\x${fti[35]}"
|
||||||
|
hw_v2="\x${fti[36]}"
|
||||||
|
hw_v3="\x${fti[37]}"
|
||||||
|
if [ "$hw_v3" == "\x30" ]; then
|
||||||
|
hw_v3=""
|
||||||
|
fi
|
||||||
|
hw_v4="\x${fti[38]}"
|
||||||
|
if [ "$hw_v4" == "\x30" ]; then
|
||||||
|
hw_v4=""
|
||||||
|
fi
|
||||||
|
setprop ro.vendor.hw.boardversion $(printf "$hw_v1$hw_v2$hw_v3$hw_v4")
|
||||||
|
|
||||||
|
# Now we have set fti var either from PDS or UTAG
|
||||||
|
# Get Last Test Station stamp from FTI
|
||||||
|
# and convert to user-friendly date, US format
|
||||||
|
# Real offsets for year/month/day are 63/64/65
|
||||||
|
# If the month/date look reasonable, data is probably OK.
|
||||||
|
mdate="Unknown"
|
||||||
|
y=0x${fti[63]}
|
||||||
|
m=0x${fti[64]}
|
||||||
|
d=0x${fti[65]}
|
||||||
|
let year=$y month=$m day=$d
|
||||||
|
# Invalid data will often have bogus month/date values
|
||||||
|
if [ $month -le 12 -a $day -le 31 -a $year -ge 12 ]; then
|
||||||
|
mdate=$month/$day/20$year
|
||||||
|
else
|
||||||
|
notice "Corrupt FTI data"
|
||||||
|
fi
|
||||||
|
setprop ro.vendor.manufacturedate $mdate
|
||||||
|
unset fti y m d year month day utag_fti pds_fti fti_utag mdate
|
||||||
|
|
||||||
|
t=$(getprop ro.build.tags)
|
||||||
|
if [[ "$t" != *release* ]]; then
|
||||||
|
for p in $(cat /proc/cmdline); do
|
||||||
|
if [ ${p%%:*} = "@" ]; then
|
||||||
|
v=${p#@:}; a=${v%=*}; b=${v#*=}
|
||||||
|
${a%%:*} ${a##*:} $b
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
unset p v a b t
|
||||||
|
|
||||||
|
# Cleanup stale/incorrect programmed model value
|
||||||
|
# Real values will never contain substrings matching "internal" device name
|
||||||
|
product=$(getprop ro.vendor.hw.device)
|
||||||
|
model=$(cat /proc/config/model/ascii 2>/dev/null)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
if [ "${model#*_}" == "$product" -o "${model%_*}" == "$product" ]; then
|
||||||
|
notice "Clearing stale model value"
|
||||||
|
echo "" > /proc/config/model/raw
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
unset model product
|
||||||
|
|
||||||
|
# set ro.vendor.bootreason, which be used to indicate kpanic/wdt boot status.
|
||||||
|
# When ro.boot.last_powerup_reason is set, it denotes this is a 2nd reboot
|
||||||
|
# after kpanic/wdt, we set ro.bootreason as coldboot to copy logs.
|
||||||
|
# Otherwise, we would set ro.bootreason the same as ro.boot.bootreason.
|
||||||
|
# ro.boot.bootreason is restricted as of android p, so get it another way:
|
||||||
|
bootreason_kvp=$(cat /proc/bootinfo | grep "Last boot reason")
|
||||||
|
last_power_up=$(getprop ro.boot.last_powerup_reason)
|
||||||
|
if [ ! -z "$last_power_up" ]
|
||||||
|
then
|
||||||
|
setprop ro.vendor.bootreason "coldboot"
|
||||||
|
else
|
||||||
|
setprop ro.vendor.bootreason ${bootreason_kvp##* }
|
||||||
|
fi
|
95
rootdir/bin/init.mmi.laser.sh
Executable file
95
rootdir/bin/init.mmi.laser.sh
Executable file
|
@ -0,0 +1,95 @@
|
||||||
|
#!/vendor/bin/sh
|
||||||
|
scriptname=${0##*/}
|
||||||
|
dbg_on=1
|
||||||
|
debug()
|
||||||
|
{
|
||||||
|
[ $dbg_on ] && echo "Debug: $*"
|
||||||
|
}
|
||||||
|
|
||||||
|
notice()
|
||||||
|
{
|
||||||
|
echo "$*"
|
||||||
|
echo "$scriptname: $*" > /dev/kmsg
|
||||||
|
}
|
||||||
|
|
||||||
|
error_and_leave()
|
||||||
|
{
|
||||||
|
local err_msg
|
||||||
|
local err_code=$1
|
||||||
|
case $err_code in
|
||||||
|
1) err_msg="Error: No response";;
|
||||||
|
2) err_msg="Error: Skip to overwrite xtalk and offset data in factory mode";;
|
||||||
|
3) err_msg="Error: Calibration data file $2 does not exist";;
|
||||||
|
4) err_msg="Error: Calibration sysfs path $2 does not show up";;
|
||||||
|
esac
|
||||||
|
notice "$err_msg"
|
||||||
|
exit $err_code
|
||||||
|
}
|
||||||
|
|
||||||
|
# Change laser sysfs file ownership
|
||||||
|
laser_class_path=/sys/devices/virtual/laser
|
||||||
|
laser_product_string=$(ls $laser_class_path)
|
||||||
|
laser_product_path=$laser_class_path/$laser_product_string
|
||||||
|
for laser_file in $laser_product_path/*; do
|
||||||
|
if [ -f "$laser_file" ]; then
|
||||||
|
chown root:system $laser_file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d $laser_product_path ]; then
|
||||||
|
error_and_leave 4 "'$laser_product_path'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Change laser input sysfs file ownership
|
||||||
|
laser_input_root=/sys/devices/virtual/input
|
||||||
|
laser_input_list=$(ls $laser_input_root)
|
||||||
|
for laser_input_dir in $laser_input_list; do
|
||||||
|
if [ -f "$laser_input_root/$laser_input_dir/calibration_data" ]; then
|
||||||
|
laser_calib_file=$laser_input_root/$laser_input_dir/calibration_data
|
||||||
|
chown root:system $laser_calib_file
|
||||||
|
fi
|
||||||
|
if [ -f "$laser_input_root/$laser_input_dir/xtalk" ]; then
|
||||||
|
laser_xtalk_file=$laser_input_root/$laser_input_dir/xtalk
|
||||||
|
chown root:system $laser_xtalk_file
|
||||||
|
fi
|
||||||
|
if [ -f "$laser_input_root/$laser_input_dir/offset" ]; then
|
||||||
|
laser_offset_file=$laser_input_root/$laser_input_dir/offset
|
||||||
|
chown root:system $laser_offset_file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$laser_calib_file" ]; then
|
||||||
|
laser_calib_file=$laser_product_path/calibration_data
|
||||||
|
fi
|
||||||
|
if [ -z "$laser_xtalk_file" ]; then
|
||||||
|
laser_xtalk_file=$laser_product_path/xtalk
|
||||||
|
fi
|
||||||
|
if [ -z "$laser_offset_file" ]; then
|
||||||
|
laser_offset_file=$laser_product_path/offset
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load calibration data
|
||||||
|
calib_data_file=/mnt/vendor/persist/camera/focus/cal_data
|
||||||
|
if [ -f $calib_data_file ]; then
|
||||||
|
chown root:vendor_tcmd $calib_data_file
|
||||||
|
chmod 660 $calib_data_file
|
||||||
|
if [ -z "$laser_calib_file" ]; then
|
||||||
|
error_and_leave 4 "'$laser_calib_file'"
|
||||||
|
else
|
||||||
|
cat $calib_data_file > $laser_calib_file
|
||||||
|
notice "laser calibration data updating complete"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
notice "laser calib_data_file '$calib_data_file' does not exist"
|
||||||
|
fi
|
||||||
|
|
||||||
|
bootmode=$(getprop ro.bootmode 2> /dev/null)
|
||||||
|
if [ $bootmode != "mot-factory" ]; then
|
||||||
|
# Enable smudge mode
|
||||||
|
echo 1 > $laser_product_path/smudge_correction_mode
|
||||||
|
notice "laser smudge mode enabled"
|
||||||
|
else
|
||||||
|
# Disable smudge mode
|
||||||
|
echo 0 > $laser_product_path/smudge_correction_mode
|
||||||
|
notice "factory-mode boot, disable laser smudge mode"
|
||||||
|
fi
|
624
rootdir/bin/init.mmi.touch.sh
Executable file
624
rootdir/bin/init.mmi.touch.sh
Executable file
|
@ -0,0 +1,624 @@
|
||||||
|
#!/vendor/bin/sh
|
||||||
|
|
||||||
|
PATH=/sbin:/vendor/sbin:/vendor/bin:/vendor/xbin
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
while getopts cds op;
|
||||||
|
do
|
||||||
|
case $op in
|
||||||
|
c) cal_on=1;;
|
||||||
|
d) dbg_on=1;;
|
||||||
|
s) dump_statistics=1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $(($OPTIND-1))
|
||||||
|
|
||||||
|
# Globals
|
||||||
|
scriptname=${0##*/}
|
||||||
|
touch_class_path=/sys/class/touchscreen
|
||||||
|
touch_status_prop=
|
||||||
|
touch_update_prop=
|
||||||
|
touch_calibration_done_version=persist.vendor.touch.calibration
|
||||||
|
touch_vendor=
|
||||||
|
touch_path=
|
||||||
|
panel_path=/sys/devices/virtual/graphics/fb0
|
||||||
|
oem_panel_script=/vendor/bin/init.oem.panel.sh
|
||||||
|
dlkm_path=/vendor/lib/modules
|
||||||
|
device_property=ro.vendor.hw.device
|
||||||
|
hwrev_property=ro.vendor.hw.revision
|
||||||
|
firmware_path=/vendor/firmware
|
||||||
|
param_path=/data/vendor/param/touch
|
||||||
|
factory_property=ro.vendor.build.motfactory
|
||||||
|
bootmode_property=ro.bootmode
|
||||||
|
touch_firmware_property=ro.vendor.touch.fw_version
|
||||||
|
touch_vendor_property=ro.vendor.touch.supplier_vendor
|
||||||
|
let dec_cfg_id_boot=0
|
||||||
|
let dec_cfg_id_latest=0
|
||||||
|
# Whether to search for TP firmware in the parameter path
|
||||||
|
let search_in_param=0
|
||||||
|
# Whether the matching TP firmware is found in the parameter path
|
||||||
|
let find_in_param=0
|
||||||
|
typeset -l product_id
|
||||||
|
panel_ver=
|
||||||
|
supplier=
|
||||||
|
property=
|
||||||
|
config_id=
|
||||||
|
build_id=
|
||||||
|
hwrev_id=
|
||||||
|
str_cfg_id_new=
|
||||||
|
str_cfg_id_boot=
|
||||||
|
str_cfg_id_latest=
|
||||||
|
build_id_new=
|
||||||
|
|
||||||
|
debug()
|
||||||
|
{
|
||||||
|
[ $dbg_on ] && echo "Debug: $*"
|
||||||
|
}
|
||||||
|
|
||||||
|
notice()
|
||||||
|
{
|
||||||
|
echo "$*"
|
||||||
|
echo "$scriptname: $*" > /dev/kmsg
|
||||||
|
}
|
||||||
|
|
||||||
|
sanity_check()
|
||||||
|
{
|
||||||
|
read_touch_property flashprog || return 1
|
||||||
|
[[ ( -z "$property" ) || ( "$property" == "1" ) ]] && return 2
|
||||||
|
read_touch_property productinfo || return 1
|
||||||
|
[[ ( -z "$property" ) || ( "$property" == "0" ) ]] && return 2
|
||||||
|
read_touch_property buildid || return 1
|
||||||
|
config_id=${property#*-}
|
||||||
|
[[ ( -z "$config_id" ) || ( "$config_id" == "0" ) ]] && return 2
|
||||||
|
build_id=${property%-*}
|
||||||
|
[[ ( -z "$build_id" ) || ( "$build_id" == "0" ) ]] && return 2
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
error_msg()
|
||||||
|
{
|
||||||
|
local err_msg
|
||||||
|
local err_code=$1
|
||||||
|
case $err_code in
|
||||||
|
1) err_msg="Error: No response from touch IC";;
|
||||||
|
2) err_msg="Error: Cannot read property $2";;
|
||||||
|
3) err_msg="Error: No matching firmware file found";;
|
||||||
|
4) err_msg="Error: Touch IC is in bootloader mode";;
|
||||||
|
5) err_msg="Error: Touch provides no reflash interface";;
|
||||||
|
6) err_msg="Error: Touch driver is not running";;
|
||||||
|
7) err_msg="Warning: Touch firmware is not the latest";;
|
||||||
|
8) err_msg="Info: Touch class does not exist";;
|
||||||
|
9) err_msg="Error: Touch IC is not ready to flash";;
|
||||||
|
esac
|
||||||
|
notice "$err_msg"
|
||||||
|
}
|
||||||
|
|
||||||
|
error_and_leave()
|
||||||
|
{
|
||||||
|
local err_code=$1
|
||||||
|
local touch_status="unknown"
|
||||||
|
error_msg $err_code
|
||||||
|
case $err_code in
|
||||||
|
1|4) touch_status="dead";;
|
||||||
|
5|6|8) touch_status="absent";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# perform sanity check and declare touch ready if error is not fatal
|
||||||
|
if [ "$touch_status" == "unknown" ]; then
|
||||||
|
sanity_check
|
||||||
|
case "$?" in
|
||||||
|
0) touch_status="ready";;
|
||||||
|
2) touch_status="dead";;
|
||||||
|
1) touch_status="absent";;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# perform recovery if touch is declared dead
|
||||||
|
if [ "$touch_status" == "dead" ]; then
|
||||||
|
notice "Touch needs to go through recovery!!!"
|
||||||
|
reboot_cnt=$(getprop $touch_status_prop 2>/dev/null)
|
||||||
|
[ -z "$reboot_cnt" ] && reboot_cnt=0
|
||||||
|
debug "current reboot counter [$reboot_cnt]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
setprop $touch_status_prop $touch_status
|
||||||
|
notice "property [$touch_status_prop] set to [`getprop $touch_status_prop`]"
|
||||||
|
|
||||||
|
if [ "$touch_status" == "dead" ]; then
|
||||||
|
notice "Touch is not responding; no further action!!!"
|
||||||
|
#if [ $((reboot_cnt)) -lt 2 ]; then
|
||||||
|
# notice "Touch is not working; rebooting..."
|
||||||
|
# debug "sleep 3s to allow touch-dead-sh service to run"
|
||||||
|
# sleep 3
|
||||||
|
# [ -z "$dbg_on" ] && setprop sys.powerctl reboot
|
||||||
|
#else
|
||||||
|
# notice "Although touch is not working, no more reboots"
|
||||||
|
#fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $err_code
|
||||||
|
}
|
||||||
|
|
||||||
|
prepend()
|
||||||
|
{
|
||||||
|
local list=""
|
||||||
|
local prefix=$1
|
||||||
|
shift
|
||||||
|
for name in $*; do
|
||||||
|
list="$list$prefix/$name "
|
||||||
|
done
|
||||||
|
echo $list
|
||||||
|
}
|
||||||
|
|
||||||
|
dump_statistics()
|
||||||
|
{
|
||||||
|
debug "dumping touch statistics"
|
||||||
|
cat $touch_path/ic_ver
|
||||||
|
[ -f $touch_path/stats ] && cat $touch_path/stats
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
wait_for_poweron()
|
||||||
|
{
|
||||||
|
local wait_nomore
|
||||||
|
local readiness
|
||||||
|
local count
|
||||||
|
debug "wait until driver reports <ready to flash>..."
|
||||||
|
wait_nomore=60
|
||||||
|
count=0
|
||||||
|
while true; do
|
||||||
|
readiness=$(cat $touch_path/poweron)
|
||||||
|
if [ "$readiness" == "1" ]; then
|
||||||
|
debug "ready to flash!!!"
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
count=$((count+1))
|
||||||
|
[ $count -eq $wait_nomore ] && break
|
||||||
|
sleep 1
|
||||||
|
debug "not ready; keep waiting..."
|
||||||
|
done
|
||||||
|
if [ $count -eq $wait_nomore ]; then
|
||||||
|
error_msg 9
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_permissions()
|
||||||
|
{
|
||||||
|
local bootmode=$(getprop $bootmode_property 2> /dev/null)
|
||||||
|
local selinux=$(getprop ro.boot.selinux 2> /dev/null)
|
||||||
|
local key_path
|
||||||
|
local key_files
|
||||||
|
local entry
|
||||||
|
if [[ ("$selinux" == "permissive") || ("$bootmode" == "mot-factory") ]]; then
|
||||||
|
debug "loosen permissions to $touch_vendor files"
|
||||||
|
case $touch_vendor in
|
||||||
|
samsung) key_path="/sys/devices/virtual/sec/sec_ts/"
|
||||||
|
key_files=$(ls $key_path 2>/dev/null)
|
||||||
|
# Set optional permissions to LSI touch tests
|
||||||
|
[ -f $touch_path/size ] && chown root:vendor_tcmd $touch_path/size
|
||||||
|
[ -f $touch_path/address ] && chown root:vendor_tcmd $touch_path/address
|
||||||
|
[ -f $touch_path/write ] && chown root:vendor_tcmd $touch_path/write
|
||||||
|
;;
|
||||||
|
synaptics) key_path=$touch_path
|
||||||
|
key_files=$(prepend f54 `ls $touch_path/f54/ 2>/dev/null`)
|
||||||
|
key_files=$key_files"reporting query stats";;
|
||||||
|
focaltech) key_path="/proc/"
|
||||||
|
key_files="ftxxxx-debug";;
|
||||||
|
ilitek) key_path="/proc/ilitek"
|
||||||
|
key_files="ioctl";;
|
||||||
|
goodix) key_path="/proc/"
|
||||||
|
key_files="gmnode"
|
||||||
|
if [[ "$touch_instance" == "GTx5" ]] || [[ "$touch_instance" == "GTx8" ]]; then
|
||||||
|
key_path="/dev/"
|
||||||
|
key_files="gtp_tools"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
stmicro) key_path="/proc/fts/"
|
||||||
|
key_files="driver_test"
|
||||||
|
# Set optional permissions to LSI touch tests
|
||||||
|
[ -f $touch_path/calibrate ] && chown root:vendor_tcmd $touch_path/calibrate
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
for entry in $key_files; do
|
||||||
|
chmod 0666 $key_path/$entry
|
||||||
|
debug "change permissions of $key_path/$entry"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
# Set permissions to enable factory touch tests
|
||||||
|
chown root:vendor_tcmd $touch_path/drv_irq
|
||||||
|
chown root:vendor_tcmd $touch_path/hw_irqstat
|
||||||
|
chown root:vendor_tcmd $touch_path/reset
|
||||||
|
|
||||||
|
# Set permissions to allow Bug2Go access to touch statistics
|
||||||
|
chown root:log $touch_path/stats
|
||||||
|
# Erase is optional
|
||||||
|
[ -f $touch_path/erase_all ] && chown root:vendor_tcmd $touch_path/erase_all
|
||||||
|
}
|
||||||
|
|
||||||
|
read_touch_property()
|
||||||
|
{
|
||||||
|
property=""
|
||||||
|
debug "retrieving property: [$touch_path/$1]"
|
||||||
|
property=$(cat $touch_path/$1 2> /dev/null)
|
||||||
|
debug "touch property [$1] is: [$property]"
|
||||||
|
[ -z "$property" ] && return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
read_panel_property()
|
||||||
|
{
|
||||||
|
property=""
|
||||||
|
debug "retrieving panel property: [$panel_path/$1]"
|
||||||
|
property=$(cat $panel_path/$1 2> /dev/null)
|
||||||
|
debug "panel property [$1] is: [$property]"
|
||||||
|
[ -z "$property" ] && return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
find_latest_config_id()
|
||||||
|
{
|
||||||
|
local fw_mask=$1
|
||||||
|
local skip_fields=$2
|
||||||
|
local dec max z str_hex i
|
||||||
|
str_cfg_id_latest=""
|
||||||
|
debug "scanning dir for files matching [$fw_mask]"
|
||||||
|
let dec=0; max=0;
|
||||||
|
for file in $(ls $fw_mask 2>/dev/null); do
|
||||||
|
z=$file
|
||||||
|
i=0
|
||||||
|
while [ ! $i -eq $skip_fields ]; do
|
||||||
|
z=${z#*-}
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
str_hex=${z%%-*};
|
||||||
|
let dec=0x$str_hex
|
||||||
|
if [ $dec -gt $max ]; then
|
||||||
|
let max=$dec; dec_cfg_id_latest=$dec;
|
||||||
|
str_cfg_id_latest=$str_hex
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[ -z "$str_cfg_id_latest" ] && return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
find_best_match()
|
||||||
|
{
|
||||||
|
local hw_mask=$1
|
||||||
|
local panel_supplier=$2
|
||||||
|
local skip_fields fw_mask
|
||||||
|
local match_best_cfg
|
||||||
|
local match_best_cfg_dec param_cfg_dec
|
||||||
|
let match_best_cfg_dec=0
|
||||||
|
let param_cfg_dec=0
|
||||||
|
|
||||||
|
while [ ! -z "$hw_mask" ]; do
|
||||||
|
if [ "$hw_mask" == "-" ]; then
|
||||||
|
hw_mask=""
|
||||||
|
fi
|
||||||
|
if [ ! -z "$panel_supplier" ]; then
|
||||||
|
skip_fields=3
|
||||||
|
fw_mask="$touch_vendor-$panel_supplier-$touch_product_id-*-$product_id$hw_mask.*"
|
||||||
|
else
|
||||||
|
skip_fields=2
|
||||||
|
fw_mask="$touch_vendor-$touch_product_id-*-$product_id$hw_mask.*"
|
||||||
|
fi
|
||||||
|
find_latest_config_id "$fw_mask" "$skip_fields"
|
||||||
|
if [ "$?" == "0" ]; then
|
||||||
|
let match_best_cfg_dec=$dec_cfg_id_latest
|
||||||
|
match_best_cfg=$str_cfg_id_latest
|
||||||
|
fi
|
||||||
|
if [ "$search_in_param" == "1" ]; then
|
||||||
|
cd $param_path
|
||||||
|
find_latest_config_id "$fw_mask" "$skip_fields"
|
||||||
|
if [ "$?" == "0" ]; then
|
||||||
|
if [ $match_best_cfg_dec -lt $dec_cfg_id_latest ]; then
|
||||||
|
let match_best_cfg_dec=$dec_cfg_id_latest
|
||||||
|
match_best_cfg=$str_cfg_id_latest
|
||||||
|
let find_in_param=1
|
||||||
|
else
|
||||||
|
cd $firmware_path
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cd $firmware_path
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
[ $match_best_cfg_dec != 0 ] && break
|
||||||
|
hw_mask=${hw_mask%?}
|
||||||
|
done
|
||||||
|
str_cfg_id_latest=$match_best_cfg
|
||||||
|
dec_cfg_id_latest=$match_best_cfg_dec
|
||||||
|
[ -z "$match_best_cfg" ] && return 1
|
||||||
|
if [ -z "$panel_supplier" ]; then
|
||||||
|
firmware_file=$(ls $touch_vendor-$touch_product_id-$str_cfg_id_latest-*-$product_id$hw_mask.*)
|
||||||
|
else
|
||||||
|
firmware_file=$(ls $touch_vendor-$panel_supplier-$touch_product_id-$str_cfg_id_latest-*-$product_id$hw_mask.*)
|
||||||
|
fi
|
||||||
|
notice "Firmware file for upgrade $firmware_file"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
query_touch_info()
|
||||||
|
{
|
||||||
|
read_touch_property flashprog
|
||||||
|
bl_mode=$property
|
||||||
|
debug "bl mode: $bl_mode"
|
||||||
|
while true; do
|
||||||
|
read_touch_property productinfo
|
||||||
|
touch_product_id=$property
|
||||||
|
if [ "$touch_product_id" ]; then
|
||||||
|
# driver might not be ready yet, wait
|
||||||
|
debug "touch product id: $touch_product_id"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
if [ "$touch_product_id" == "0" ]; then
|
||||||
|
debug "touch ic reports invalid product id"
|
||||||
|
error_msg 1
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
read_touch_property buildid
|
||||||
|
str_cfg_id_boot=${property#*-}
|
||||||
|
let dec_cfg_id_boot=0x$str_cfg_id_boot
|
||||||
|
debug "touch config id: $str_cfg_id_boot"
|
||||||
|
build_id_boot=${property%-*}
|
||||||
|
debug "touch build id: $build_id_boot"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
query_panel_info()
|
||||||
|
{
|
||||||
|
supplier=""
|
||||||
|
read_touch_property "panel_supplier"
|
||||||
|
[ -z "$property" ] && read_panel_property "panel_supplier"
|
||||||
|
supplier=$property
|
||||||
|
if [ "$supplier" ]; then
|
||||||
|
read_panel_property "controller_drv_ver"
|
||||||
|
panel_ver=${property#${property%?}}
|
||||||
|
debug "panel supplier: $supplier, ver $panel_ver"
|
||||||
|
setprop $touch_vendor_property "$supplier-$touch_vendor"
|
||||||
|
notice "touch_vendor_property = $touch_vendor_property, $supplier-$touch_vendor"
|
||||||
|
else
|
||||||
|
debug "driver does not report panel supplier"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
load_driver_modules()
|
||||||
|
{
|
||||||
|
if [ "$supplier" ]; then
|
||||||
|
if [ -f $oem_panel_script ]; then
|
||||||
|
debug "load_driver_modules()"
|
||||||
|
$oem_panel_script -s $supplier
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
search_firmware_file()
|
||||||
|
{
|
||||||
|
local match_not_found
|
||||||
|
match_not_found=1
|
||||||
|
if [ "$supplier" ]; then
|
||||||
|
for pattern in "$supplier$panel_ver" "$supplier"; do
|
||||||
|
debug "search for best hw revision match with supplier"
|
||||||
|
find_best_match "-$hwrev_id" "$pattern"
|
||||||
|
match_not_found=$?
|
||||||
|
[ "$match_not_found" == "0" ] && break
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ "$match_not_found" != "0" ]; then
|
||||||
|
debug "search for best hw revision match without supplier"
|
||||||
|
find_best_match "-$hwrev_id"
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
error_msg 3
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_modules()
|
||||||
|
{
|
||||||
|
local rc
|
||||||
|
local module
|
||||||
|
for module in $*; do
|
||||||
|
[ -f $dlkm_path/$module.ko ] || continue
|
||||||
|
notice "Reloading [$module.ko]..."
|
||||||
|
rmmod $module
|
||||||
|
rc=$?
|
||||||
|
[ $rc != 0 ] && notice "Unloading [$module] failed: $rc"
|
||||||
|
insmod $dlkm_path/$module.ko
|
||||||
|
rc=$?
|
||||||
|
[ $rc != 0 ] && notice "Loading [$module] failed: $rc"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
run_firmware_upgrade()
|
||||||
|
{
|
||||||
|
local recovery
|
||||||
|
recovery=0
|
||||||
|
if [ "$bl_mode" == "1" ] || [ "$build_id_boot" == "0" ]; then
|
||||||
|
recovery=1
|
||||||
|
notice "Initiating touch firmware recovery"
|
||||||
|
notice " bl mode = $bl_mode"
|
||||||
|
notice " build id = $build_id_boot"
|
||||||
|
fi
|
||||||
|
if [ $dec_cfg_id_boot -ne $dec_cfg_id_latest ] || [ "$recovery" == "1" ]; then
|
||||||
|
wait_for_poweron
|
||||||
|
# wait for poweron time is limited, thus in ceratin cases
|
||||||
|
# it can time out. forfeiting firmware update in this case
|
||||||
|
# would be cleaner option, since script cannot indefinitely
|
||||||
|
# delay sysfs permissions setup and cause more troubles
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
notice "Touch firmware update forfeited!!!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
debug "forcing firmware upgrade"
|
||||||
|
echo 1 > $touch_path/forcereflash
|
||||||
|
debug "sending reflash command"
|
||||||
|
if [ "$find_in_param" == "1" ]; then
|
||||||
|
notice "Start touchUpg service, upgrade tp firmware parameters"
|
||||||
|
echo 1 > $touch_path/flash_mode
|
||||||
|
start vendor.touchUpg
|
||||||
|
else
|
||||||
|
echo 0 > $touch_path/flash_mode
|
||||||
|
fi
|
||||||
|
echo $firmware_file > $touch_path/doreflash
|
||||||
|
read_touch_property flashprog
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
error_msg 1
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
bl_mode=$property
|
||||||
|
if [ "$bl_mode" == "1" ]; then
|
||||||
|
error_msg 4
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
read_touch_property buildid
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
error_msg 1
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
str_cfg_id_new=${property#*-}
|
||||||
|
build_id_new=${property%-*}
|
||||||
|
notice "Touch firmware config id at boot time $str_cfg_id_boot"
|
||||||
|
notice "Touch firmware config id in the file $str_cfg_id_latest"
|
||||||
|
notice "Touch firmware config id currently programmed $str_cfg_id_new"
|
||||||
|
[ "$str_cfg_id_latest" != "$str_cfg_id_new" ] && error_msg 7 && return 1
|
||||||
|
# indicate that update has been completed
|
||||||
|
setprop $touch_update_prop "completed"
|
||||||
|
notice "property [$touch_update_prop] set to [`getprop $touch_update_prop`]"
|
||||||
|
if [ "$touch_vendor" == "synaptics" ]; then
|
||||||
|
notice "forcing F54 registers update"
|
||||||
|
echo 1 > $touch_path/f54/force_update
|
||||||
|
notice "need to reload F54"
|
||||||
|
reload_modules "synaptics_dsx_test_reporting"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
do_sec_calibration()
|
||||||
|
{
|
||||||
|
local __result=$1
|
||||||
|
local info
|
||||||
|
local rc
|
||||||
|
|
||||||
|
sleep 3
|
||||||
|
echo run_force_calibration > /sys/devices/virtual/sec/tsp/cmd
|
||||||
|
rc=$(cat /sys/devices/virtual/sec/tsp/cmd_result)
|
||||||
|
[ "$rc" != "run_force_calibration:OK" ] && return 1
|
||||||
|
info=$(cat $touch_class_path/$touch_instance/buildid)
|
||||||
|
if [ -f $touch_class_path/$touch_instance/mutual_range ]; then
|
||||||
|
info=$info";$(cat $touch_class_path/$touch_instance/mutual_range)"
|
||||||
|
else
|
||||||
|
notice "mutual range unavailable"
|
||||||
|
fi
|
||||||
|
info=$info";forced"
|
||||||
|
eval "$__result='$info'"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
do_calibration()
|
||||||
|
{
|
||||||
|
local rc
|
||||||
|
local cal_info
|
||||||
|
local factory_build
|
||||||
|
local cal_version
|
||||||
|
|
||||||
|
factory_build=$(getprop $factory_property 2> /dev/null)
|
||||||
|
cal_info=$(getprop $touch_calibration_done_version 2> /dev/null)
|
||||||
|
# new calibration info comes with mutual range and probably was enforced
|
||||||
|
if [[ ("$cal_info" && "${cal_info%%;*}" != "$cal_info") || ("$cal_info" == "enable-autocalibration") ]]; then
|
||||||
|
cal_version=${cal_info%%;*}
|
||||||
|
cal_version=${cal_version#*-}
|
||||||
|
debug "cal_version is '$cal_version'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ("$factory_build" != 1 || "$cal_version" != "autocalibration") ]]; then
|
||||||
|
debug "factory='$factory_build', cal_version='$cal_version', latest='$str_cfg_id_latest'"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
notice "Force touch calibration"
|
||||||
|
case $touch_vendor in
|
||||||
|
samsung) do_sec_calibration cal_info
|
||||||
|
rc=$?
|
||||||
|
debug "cal_info='$cal_info'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
notice "Touch calibration result $rc"
|
||||||
|
[ $rc == 0 ] && setprop $touch_calibration_done_version $cal_info
|
||||||
|
}
|
||||||
|
|
||||||
|
process_touch_instance()
|
||||||
|
{
|
||||||
|
touch_vendor=$(cat $touch_class_path/$touch_instance/vendor)
|
||||||
|
debug "touch vendor [$touch_vendor]"
|
||||||
|
touch_path=/sys$(cat $touch_class_path/$touch_instance/path)
|
||||||
|
debug "sysfs touch path: $touch_path"
|
||||||
|
touch_status_prop=vendor.hw.touch.$touch_instance.status
|
||||||
|
touch_update_prop=vendor.hw.touch.$touch_instance.update
|
||||||
|
if [ ! -f $touch_path/doreflash ] ||
|
||||||
|
[ ! -f $touch_path/poweron ] ||
|
||||||
|
[ ! -f $touch_path/flashprog ] ||
|
||||||
|
[ ! -f $touch_path/productinfo ] ||
|
||||||
|
[ ! -f $touch_path/buildid ]; then
|
||||||
|
error_msg 5
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if [ $dump_statistics ]; then
|
||||||
|
dump_statistics
|
||||||
|
fi
|
||||||
|
if [ -f $touch_path/flash_mode ]; then
|
||||||
|
notice "Support parameter APK for FW upgrade"
|
||||||
|
let search_in_param=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
notice "Checking touch ID [$touch_instance] FW upgrade"
|
||||||
|
touch_vendor=$(cat $touch_class_path/$touch_instance/vendor)
|
||||||
|
debug "touch vendor [$touch_vendor]"
|
||||||
|
touch_path=/sys$(cat $touch_class_path/$touch_instance/path)
|
||||||
|
debug "sysfs touch path: $touch_path"
|
||||||
|
query_touch_info
|
||||||
|
query_panel_info
|
||||||
|
search_firmware_file
|
||||||
|
[ "$?" == "0" ] && run_firmware_upgrade
|
||||||
|
if [ "$?" == "0" ]; then
|
||||||
|
do_calibration
|
||||||
|
notice "Touch firmware is up to date"
|
||||||
|
setprop $touch_status_prop "ready"
|
||||||
|
notice "property [$touch_status_prop] set to [`getprop $touch_status_prop`]"
|
||||||
|
notice "Handling touch ID [$touch_instance] permissions"
|
||||||
|
fi
|
||||||
|
read_touch_property buildid
|
||||||
|
setprop $touch_firmware_property ${property}
|
||||||
|
notice "Touch firmware property is $touch_firmware_property"
|
||||||
|
setup_permissions
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main starts here
|
||||||
|
query_panel_info
|
||||||
|
load_driver_modules
|
||||||
|
[ -d $touch_class_path ] || error_and_leave 8
|
||||||
|
debug "sysfs panel path: $panel_path"
|
||||||
|
product_id=$(getprop $device_property 2> /dev/null)
|
||||||
|
[ -z "$product_id" ] && error_and_leave 2 $device_property
|
||||||
|
product_id=${product_id%-*}
|
||||||
|
product_id=${product_id%_*}
|
||||||
|
debug "product id: $product_id"
|
||||||
|
hwrev_id=$(getprop $hwrev_property 2> /dev/null)
|
||||||
|
[ -z "$hwrev_id" ] && notice "hw revision undefined"
|
||||||
|
debug "hw revision: $hwrev_id"
|
||||||
|
cd $firmware_path
|
||||||
|
# Run asynchronously for each instance
|
||||||
|
for touch_instance in $(ls $touch_class_path); do
|
||||||
|
process_touch_instance &
|
||||||
|
done
|
||||||
|
|
||||||
|
# check if need to reload modules
|
||||||
|
wait
|
||||||
|
debug "all background processes completed"
|
||||||
|
|
||||||
|
return 0
|
178
rootdir/bin/init.oem.fingerprint2.sh
Executable file
178
rootdir/bin/init.oem.fingerprint2.sh
Executable file
|
@ -0,0 +1,178 @@
|
||||||
|
#!/vendor/bin/sh
|
||||||
|
#
|
||||||
|
# Start indicated fingerprint HAL service
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 Lenovo
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# April 15, 2019 chengql2@lenovo.com Initial version
|
||||||
|
# December 2, 2019 chengql2 Store fps_id into persist fs
|
||||||
|
# November 19, 2020 zengzm refactor the code, support more than 3 fingerprint sensors; support config.
|
||||||
|
|
||||||
|
# get the filename, contains the file postfix
|
||||||
|
script_name=${0##*/}
|
||||||
|
# remove the file postfix
|
||||||
|
script_name=${script_name%.*}
|
||||||
|
function log {
|
||||||
|
echo "$script_name: $*" > /dev/kmsg
|
||||||
|
}
|
||||||
|
|
||||||
|
PROP_GKI_PATH=ro.vendor.mot.gki.path
|
||||||
|
GKI_PATH=$(getprop $PROP_GKI_PATH)
|
||||||
|
|
||||||
|
# for new projects, only need to config varible vendor_list,kernel_so_list,kernel_so_name_list,hal_list
|
||||||
|
# vendor_list: the array contains the sensor name, it will be used for system properties.
|
||||||
|
# kernel_so_list: the array contains the kernel so's absolute path. It will be used at insmod.
|
||||||
|
# kernel_so_name_list: the array contains the kernel so's name. It will be used at rmmod.
|
||||||
|
# hal_list: the array contains the hal service name.
|
||||||
|
#
|
||||||
|
# note: all arrays should have the same size.
|
||||||
|
vendor_list=('egis' 'chipone')
|
||||||
|
kernel_so_list=("/vendor/lib/modules/$GKI_PATH/rbs_fps_mmi.ko" "/vendor/lib/modules/$GKI_PATH/fpsensor_spi_tee.ko")
|
||||||
|
kernel_so_name_list=("rbs_fps_mmi.ko" "fpsensor_spi_tee.ko")
|
||||||
|
hal_list=('ets_hal' 'chipone_fp_hal')
|
||||||
|
last_vendor_index=`expr ${#vendor_list[@]} - 1`
|
||||||
|
vendor_list_size=${#vendor_list[@]}
|
||||||
|
|
||||||
|
if [ $vendor_list_size != ${#kernel_so_list[@]} ]; then
|
||||||
|
log "error, vendor_list.size is not equal to kernel_so_list"
|
||||||
|
return 255
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $vendor_list_size != ${#kernel_so_name_list[@]} ]; then
|
||||||
|
log "error, vendor_list.size is not equal to kernel_so_name_list"
|
||||||
|
return 255
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $vendor_list_size != ${#hal_list[@]} ]; then
|
||||||
|
log "error, vendor_list.size is not equal to hal_list"
|
||||||
|
return 255
|
||||||
|
fi
|
||||||
|
|
||||||
|
# At the current boot, what is the fingerprint sensor
|
||||||
|
persist_fps_id=/mnt/vendor/persist/fps/vendor_id
|
||||||
|
|
||||||
|
# what is the fingerprint sensor successfully installed before.
|
||||||
|
persist_fps_id2=/mnt/vendor/persist/fps/last_vendor_id
|
||||||
|
|
||||||
|
FPS_VENDOR_NONE=none
|
||||||
|
MAX_TIMES=20
|
||||||
|
|
||||||
|
# this property store FPS_STATUS_NONE or FPS_STATUS_OK
|
||||||
|
# after start fingerprint hal service, the hal service will set this property.
|
||||||
|
prop_fps_status=vendor.hw.fingerprint.status
|
||||||
|
|
||||||
|
# use this to trigger init.mmi.rc
|
||||||
|
prop_fps_ident=vendor.hw.fps.ident
|
||||||
|
|
||||||
|
# if $prop_fps_status=$FPS_STATUS_OK, then will set prop_persist_fps to the specific vendor name.
|
||||||
|
prop_persist_fps=persist.vendor.hardware.fingerprint
|
||||||
|
|
||||||
|
FPS_STATUS_NONE=none
|
||||||
|
FPS_STATUS_OK=ok
|
||||||
|
|
||||||
|
function find_vendor_index() {
|
||||||
|
# param1: the specific vendor name
|
||||||
|
# return: the vendor index in vendor_list. the valid index is from 0; if not found,return 255
|
||||||
|
for temp_vendor_index in $(seq 0 $last_vendor_index)
|
||||||
|
do
|
||||||
|
if [ "${vendor_list[temp_vendor_index]}" = "$1" ]; then
|
||||||
|
return $temp_vendor_index
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
function start_hal_service(){
|
||||||
|
# param1: the vendor index
|
||||||
|
# return: 0 means success, will setprop $prop_persist_fps
|
||||||
|
setprop $prop_fps_status $FPS_STATUS_NONE
|
||||||
|
setprop $prop_fps_ident $FPS_STATUS_NONE
|
||||||
|
|
||||||
|
insmod ${kernel_so_list[$1]}
|
||||||
|
sleep 1
|
||||||
|
setprop $prop_fps_ident ${vendor_list[$1]}
|
||||||
|
|
||||||
|
log "start ${hal_list[$1]}"
|
||||||
|
start ${hal_list[$1]}
|
||||||
|
|
||||||
|
for ii in $(seq 1 $MAX_TIMES)
|
||||||
|
do
|
||||||
|
sleep 0.1
|
||||||
|
fps_status=$(getprop $prop_fps_status)
|
||||||
|
# log "check fps vendor status: $fps_status"
|
||||||
|
if [ $fps_status != $FPS_STATUS_NONE ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
log "fingerprint HAL status: $fps_status"
|
||||||
|
if [ $fps_status == $FPS_STATUS_OK ]; then
|
||||||
|
log "start ${hal_list[$1]} hal success"
|
||||||
|
setprop $prop_persist_fps ${vendor_list[$1]}
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "start ${hal_list[$1]} hal failed, remove kernel so: ${kernel_so_name_list[$1]} "
|
||||||
|
setprop ctl.stop ${hal_list[$1]}
|
||||||
|
rmmod ${kernel_so_name_list[$1]}
|
||||||
|
sleep 0.1
|
||||||
|
# if failed,return 255
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
# set last fingerprint sensor
|
||||||
|
fps_vendor=$(cat $persist_fps_id)
|
||||||
|
if [ -n "$fps_vendor" ] && [ "$fps_vendor" != $FPS_STATUS_NONE ]; then
|
||||||
|
echo $fps_vendor > $persist_fps_id2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# get the identified fingerprint sensor
|
||||||
|
fps_vendor2=$(cat $persist_fps_id2)
|
||||||
|
if [ -z $fps_vendor2 ]; then
|
||||||
|
fps_vendor2=$FPS_VENDOR_NONE
|
||||||
|
fi
|
||||||
|
log "FPS vendor (last): $fps_vendor2"
|
||||||
|
|
||||||
|
fps_vendor=$(cat $persist_fps_id)
|
||||||
|
if [ -z $fps_vendor ]; then
|
||||||
|
fps_vendor=$FPS_VENDOR_NONE
|
||||||
|
fi
|
||||||
|
log "FPS vendor (current): $fps_vendor"
|
||||||
|
|
||||||
|
vendor_index=255
|
||||||
|
# try to start the most recent success launched sensor.
|
||||||
|
if [ $fps_vendor != $FPS_STATUS_NONE ]; then
|
||||||
|
find_vendor_index $fps_vendor
|
||||||
|
vendor_index=$?
|
||||||
|
if [ $vendor_index != 255 ]; then
|
||||||
|
log "start $fps_vendor hal service"
|
||||||
|
start_hal_service $vendor_index
|
||||||
|
if [ $? != 255 ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# try all the fingerprint sensors
|
||||||
|
for temp_vendor_index in $(seq 0 $last_vendor_index)
|
||||||
|
do
|
||||||
|
if [ $temp_vendor_index == $vendor_index ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e ${kernel_so_list[$temp_vendor_index]} ]; then
|
||||||
|
log "does not exist ${kernel_so_list[$temp_vendor_index]},ignore this fingerprint sensor"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
start_hal_service $temp_vendor_index
|
||||||
|
if [ $? != 255 ]; then
|
||||||
|
echo ${vendor_list[$temp_vendor_index]} > $persist_fps_id
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
log "error, no fingerprint sensor found"
|
||||||
|
setprop $prop_persist_fps $FPS_VENDOR_NONE
|
||||||
|
echo $FPS_VENDOR_NONE > $persist_fps_id
|
735
rootdir/bin/init.oem.hw.sh
Executable file
735
rootdir/bin/init.oem.hw.sh
Executable file
|
@ -0,0 +1,735 @@
|
||||||
|
#!/vendor/bin/sh
|
||||||
|
|
||||||
|
BASEDIR=vendor
|
||||||
|
|
||||||
|
PATH=/sbin:/$BASEDIR/sbin:/$BASEDIR/bin:/$BASEDIR/xbin
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
while getopts dpfrM op;
|
||||||
|
do
|
||||||
|
case $op in
|
||||||
|
d) dbg_on=1;;
|
||||||
|
p) populate_only=1;;
|
||||||
|
f) dead_touch=1;;
|
||||||
|
r) reset_touch=1;;
|
||||||
|
M) mount_2nd_stage=1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $(($OPTIND-1))
|
||||||
|
|
||||||
|
scriptname=${0##*/}
|
||||||
|
hw_mp=/proc/hw
|
||||||
|
config_mp=/proc/config
|
||||||
|
reboot_utag=$config_mp/.reboot
|
||||||
|
touch_status_prop=vendor.hw.touch.status
|
||||||
|
hw_cfg_file=hw_config.xml
|
||||||
|
vhw_file=/$BASEDIR/etc/vhw.xml
|
||||||
|
bp_file=/system/build.prop
|
||||||
|
oem_file=/oem/oem.prop
|
||||||
|
load_error=3
|
||||||
|
need_to_reload=2
|
||||||
|
reload_in_progress=1
|
||||||
|
reload_done=0
|
||||||
|
ver_utag=".version"
|
||||||
|
version_fs="unknown"
|
||||||
|
xml_version="unknown"
|
||||||
|
device_params=""
|
||||||
|
xml_file=""
|
||||||
|
utag_update_fail="false"
|
||||||
|
modem_ver_prop=ro.vendor.hw.modem_version
|
||||||
|
policy_prop=ro.vendor.super_image_policy
|
||||||
|
|
||||||
|
super_image_detection()
|
||||||
|
{
|
||||||
|
local subsys
|
||||||
|
local file2mount
|
||||||
|
local basefile
|
||||||
|
local version
|
||||||
|
local extention
|
||||||
|
local image_dir
|
||||||
|
local is_super_image
|
||||||
|
local super_image_prop
|
||||||
|
local file_mount_prop
|
||||||
|
local modem_version=$(getprop $modem_ver_prop)
|
||||||
|
local policy=$(getprop $policy_prop)
|
||||||
|
|
||||||
|
debug "'$policy_prop' is '$policy'"
|
||||||
|
for subsys in modem fsg; do
|
||||||
|
debug "Processing [${subsys}]..."
|
||||||
|
is_super_image=""
|
||||||
|
case ${subsys} in
|
||||||
|
modem) image_dir=/vendor/firmware_mnt;;
|
||||||
|
fsg) image_dir=/vendor/fsg;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
[ -f $image_dir/super_modem ] && is_super_image="true"
|
||||||
|
debug "super image '$is_super_image'"
|
||||||
|
|
||||||
|
if [ "$is_super_image" == "true" ]; then
|
||||||
|
file2mount=""
|
||||||
|
case ${subsys} in
|
||||||
|
modem) super_image_prop="ro.vendor.hw.modem_super_image"
|
||||||
|
file_mount_prop="ro.vendor.hw.modem_mount_file"
|
||||||
|
basefile="NON-HLOS.bin"
|
||||||
|
extention=".bin"
|
||||||
|
[ "$modem_version" ] && file2mount=$(printf "NON-HLOS%sbin" $modem_version)
|
||||||
|
;;
|
||||||
|
fsg) super_image_prop="ro.vendor.hw.fsg_super_image"
|
||||||
|
file_mount_prop="ro.vendor.hw.fsg_mount_file"
|
||||||
|
basefile="fsg.mbn"
|
||||||
|
extention=".mbn"
|
||||||
|
[ "$modem_version" ] && file2mount=$(printf "fsg%smbn" $modem_version)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if [ -z "$file2mount" ]; then
|
||||||
|
notice "'$modem_ver_prop' not set, but [$subsys] is super image!"
|
||||||
|
else
|
||||||
|
# modem_version matches existing file in super image
|
||||||
|
if [ -f $image_dir/$file2mount ]; then
|
||||||
|
notice "[$subsys] is super image. '$file2mount' will be mounted"
|
||||||
|
setprop $file_mount_prop $file2mount
|
||||||
|
setprop $super_image_prop yes
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
notice "[$subsys] is super image. '$file2mount' not found"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
notice "[$subsys] non-super image"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check super image policy
|
||||||
|
if [ "$policy" == "enforce" ]; then
|
||||||
|
notice "[$subsys] strict super image policy! Rebooting to recovery..."
|
||||||
|
debug "'ro.vendor.hw.super_image_failure' -> 'yes'"
|
||||||
|
setprop ro.vendor.hw.super_image_failure yes
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
notice "[$subsys] super image policy not enforced"
|
||||||
|
# proceed with non-super image if policy allows
|
||||||
|
if [ -z "$is_super_image" ]; then
|
||||||
|
notice "[$subsys] proceed with non-super image!"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# retrieve default version if available
|
||||||
|
version=$(cat $image_dir/super_modem)
|
||||||
|
if [ "$version" ]; then
|
||||||
|
basefile=$version
|
||||||
|
notice "default file override '$basefile'"
|
||||||
|
else
|
||||||
|
notice "use default file: '$basefile' instead of '$file2mount'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
notice "Searching for '$basefile' in $image_dir..."
|
||||||
|
debug "checking file '$image_dir/$basefile'"
|
||||||
|
if [ -f $image_dir/$basefile ]; then
|
||||||
|
notice "[$subsys] is super image! '$basefile' will be mounted"
|
||||||
|
debug "'$file_mount_prop' -> '$basefile'"
|
||||||
|
setprop $file_mount_prop $basefile
|
||||||
|
debug "'$super_image_prop' -> 'yes'"
|
||||||
|
setprop $super_image_prop yes
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set to fail
|
||||||
|
notice "Unable to mount '$basefile'! Rebooting to recovery..."
|
||||||
|
debug "'ro.vendor.hw.super_image_failure' -> 'yes'"
|
||||||
|
setprop ro.vendor.hw.super_image_failure yes
|
||||||
|
return
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
set_reboot_counter()
|
||||||
|
{
|
||||||
|
local value=$1
|
||||||
|
local reboot_cnt=0
|
||||||
|
local reboot_mp=${reboot_utag%.*}
|
||||||
|
local tag_name=${reboot_utag##*/}
|
||||||
|
if [ $((value)) -gt 0 ]; then
|
||||||
|
notice "increase reboot counter"
|
||||||
|
[ -d $reboot_utag ] && reboot_cnt=$(cat $reboot_utag/ascii)
|
||||||
|
value=$(($reboot_cnt + 1))
|
||||||
|
fi
|
||||||
|
if [ ! -d $reboot_utag ]; then
|
||||||
|
echo ${reboot_utag##*/} > $reboot_mp/all/new
|
||||||
|
[ $? != 0 ] && notice "error creating UTAG $tag_name"
|
||||||
|
fi
|
||||||
|
echo "$value" > $reboot_utag/ascii
|
||||||
|
[ $? != 0 ] && notice "error updating UTAG $tag_name"
|
||||||
|
notice "UTAG $tag_name is [`cat $reboot_utag/ascii`]"
|
||||||
|
}
|
||||||
|
|
||||||
|
set_reboot_counter_property()
|
||||||
|
{
|
||||||
|
local reboot_cnt=0
|
||||||
|
local tag_name=${reboot_utag##*/}
|
||||||
|
if [ -d $reboot_utag ]; then
|
||||||
|
reboot_cnt=$(cat $reboot_utag/ascii)
|
||||||
|
notice "UTAG $tag_name has value [$reboot_cnt]"
|
||||||
|
else
|
||||||
|
notice "UTAG $tag_name does not exist"
|
||||||
|
fi
|
||||||
|
setprop $touch_status_prop $reboot_cnt
|
||||||
|
notice "property [$touch_status_prop] is set to [`getprop $touch_status_prop`]"
|
||||||
|
}
|
||||||
|
|
||||||
|
debug()
|
||||||
|
{
|
||||||
|
[ $dbg_on ] && echo "Debug: $*"
|
||||||
|
}
|
||||||
|
|
||||||
|
notice()
|
||||||
|
{
|
||||||
|
echo "$*"
|
||||||
|
echo "$scriptname: $*" > /dev/kmsg
|
||||||
|
}
|
||||||
|
|
||||||
|
add_device_params()
|
||||||
|
{
|
||||||
|
device_params=$device_params" $@"
|
||||||
|
debug "add_device_params='$device_params'"
|
||||||
|
}
|
||||||
|
|
||||||
|
drop_device_parameter()
|
||||||
|
{
|
||||||
|
device_params=${device_params% *}
|
||||||
|
debug "drop_device_parameter='$device_params'"
|
||||||
|
}
|
||||||
|
|
||||||
|
set_xml_file()
|
||||||
|
{
|
||||||
|
xml_file=$@
|
||||||
|
debug "working with XML file='$xml_file'"
|
||||||
|
}
|
||||||
|
|
||||||
|
exec_parser()
|
||||||
|
{
|
||||||
|
eval motobox expat -u -f $xml_file $device_params "$@" 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_utags()
|
||||||
|
{
|
||||||
|
local mp=$1
|
||||||
|
local value
|
||||||
|
echo "1" > $mp/reload
|
||||||
|
value=$(cat $mp/reload)
|
||||||
|
while [ "$value" == "$reload_in_progress" ]; do
|
||||||
|
notice "waiting for loading to complete"
|
||||||
|
sleep 1;
|
||||||
|
value=$(cat $mp/reload)
|
||||||
|
notice "'$mp' current status [$value]"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
procfs_wait_for_device()
|
||||||
|
{
|
||||||
|
local __result=$1
|
||||||
|
local status
|
||||||
|
local mpi
|
||||||
|
local IFS=' '
|
||||||
|
local device_timeout_count=0
|
||||||
|
while [ ! -f $hw_mp/reload ] || [ ! -f $config_mp/reload ]; do
|
||||||
|
notice "waiting for devices"
|
||||||
|
sleep 1;
|
||||||
|
if [ "$device_timeout_count" -eq "10" ];then
|
||||||
|
notice "waiting for devices timeout"
|
||||||
|
eval $__result=""
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
device_timeout_count=$(($device_timeout_count + 1))
|
||||||
|
done
|
||||||
|
for mpi in $hw_mp $config_mp; do
|
||||||
|
status=$(cat $mpi/reload)
|
||||||
|
notice "mount point '$mpi' status [$status]"
|
||||||
|
if [ "$status" == "$need_to_reload" ]; then
|
||||||
|
notice "force $mpi reloading"
|
||||||
|
reload_utags $mpi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for mpi in $hw_mp $config_mp; do
|
||||||
|
status=$(cat $mpi/reload)
|
||||||
|
notice "$mpi reload is [$status]"
|
||||||
|
device_timeout_count=0
|
||||||
|
while [ "$status" != "$reload_done" ]; do
|
||||||
|
notice "waiting for loading $mpi to complete"
|
||||||
|
sleep 1;
|
||||||
|
status=$(cat $mpi/reload)
|
||||||
|
if [ "$device_timeout_count" -eq "10" ]; then
|
||||||
|
notice "error: waiting for loading $mpi timeout"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
device_timeout_count=$(($device_timeout_count + 1))
|
||||||
|
done
|
||||||
|
done
|
||||||
|
eval $__result=$status
|
||||||
|
}
|
||||||
|
|
||||||
|
get_attr_data_by_name()
|
||||||
|
{
|
||||||
|
local __result=$1
|
||||||
|
local attr=$2
|
||||||
|
shift 2
|
||||||
|
local IFS=' '
|
||||||
|
eval $__result=""
|
||||||
|
for arg in ${@}; do
|
||||||
|
[ "${arg%=*}" == "$attr" ] || continue
|
||||||
|
debug "attr_data='${arg#*=}'"
|
||||||
|
eval $__result="${arg#*=}"
|
||||||
|
break
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
get_tag_data()
|
||||||
|
{
|
||||||
|
local __name=$1
|
||||||
|
local __value=$2
|
||||||
|
shift 2
|
||||||
|
local dataval
|
||||||
|
local IFS=' '
|
||||||
|
eval $__name=""
|
||||||
|
eval $__value=""
|
||||||
|
for arg in ${@}; do
|
||||||
|
case $arg in
|
||||||
|
string-array | string)
|
||||||
|
debug "---/ skip keyword: '$arg'"
|
||||||
|
continue;;
|
||||||
|
esac
|
||||||
|
debug "---> arg='$arg'"
|
||||||
|
if [ "${arg%=*}" == "name" ]; then
|
||||||
|
eval $__name=${arg#*=}
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
# eval treats ';' as a separator, thus make it '\;'
|
||||||
|
dataval=$(echo ${arg#?} | sed 's/;/\\;/g')
|
||||||
|
debug "<--- dataval='$dataval'"
|
||||||
|
eval $__value=$dataval
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
update_utag()
|
||||||
|
{
|
||||||
|
local utag=$1
|
||||||
|
local payload=$2
|
||||||
|
local verify
|
||||||
|
local rc
|
||||||
|
if [ ! -d $hw_mp/$utag ]; then
|
||||||
|
notice "creating utag '$utag'"
|
||||||
|
echo $utag > $hw_mp/all/new
|
||||||
|
rc=$?
|
||||||
|
[ "$rc" != "0" ] && notice "'$utag' create dir failed rc=$rc"
|
||||||
|
fi
|
||||||
|
debug "writing '$payload' to '$hw_mp/$utag/ascii'"
|
||||||
|
echo "$payload" > $hw_mp/$utag/ascii
|
||||||
|
rc=$?
|
||||||
|
if [ "$rc" != "0" ]; then
|
||||||
|
utag_update_fail="true"
|
||||||
|
notice "'$utag' write file failed rc=$rc"
|
||||||
|
fi
|
||||||
|
verify=$(cat $hw_mp/$utag/ascii)
|
||||||
|
debug "read '$verify' from '$hw_mp/$utag/ascii'"
|
||||||
|
[ "$verify" != "$payload" ] && notice "'$utag' payload validation failed"
|
||||||
|
}
|
||||||
|
|
||||||
|
populate_utags()
|
||||||
|
{
|
||||||
|
local selection="$@"
|
||||||
|
local pline
|
||||||
|
local ptag
|
||||||
|
local pvalue
|
||||||
|
for pline in $(exec_parser $selection); do
|
||||||
|
get_tag_data ptag pvalue $pline
|
||||||
|
url_style_off pvalue $pvalue
|
||||||
|
debug "tag='$ptag' value='$pvalue'"
|
||||||
|
update_utag $ptag $pvalue
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
set_ro_hw_properties_upgrade()
|
||||||
|
{
|
||||||
|
local utag_path
|
||||||
|
local utag_name
|
||||||
|
local prop_prefix
|
||||||
|
local utag_value
|
||||||
|
local verify
|
||||||
|
for hwtag in $(find $hw_mp -name '.system'); do
|
||||||
|
debug "path $hwtag has '.system' in its name"
|
||||||
|
prop_prefix="ro.vendor.hw."
|
||||||
|
utag_path=${hwtag%/*}
|
||||||
|
utag_name=${utag_path##*/}
|
||||||
|
utag_value=$(cat $utag_path/ascii)
|
||||||
|
setprop $prop_prefix$utag_name "$utag_value"
|
||||||
|
notice "ro.vendor.hw.$utag_name='$utag_value'"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
set_ro_hw_properties()
|
||||||
|
{
|
||||||
|
local utag_path
|
||||||
|
local utag_name
|
||||||
|
local prop_prefix
|
||||||
|
local utag_value
|
||||||
|
local verify
|
||||||
|
for hwtag in $(find $hw_mp -name '.system'); do
|
||||||
|
debug "path $hwtag has '.system' in its name"
|
||||||
|
prop_prefix=$(cat $hwtag/ascii)
|
||||||
|
verify=${prop_prefix%.}
|
||||||
|
# esure property ends with '.'
|
||||||
|
if [ "$prop_prefix" == "$verify" ]; then
|
||||||
|
prop_prefix="$prop_prefix."
|
||||||
|
debug "added '.' at the end of [$prop_prefix]"
|
||||||
|
|
||||||
|
fi
|
||||||
|
utag_path=${hwtag%/*}
|
||||||
|
utag_name=${utag_path##*/}
|
||||||
|
utag_value=$(cat $utag_path/ascii)
|
||||||
|
setprop $prop_prefix$utag_name "$utag_value"
|
||||||
|
notice "$prop_prefix$utag_name='$utag_value'"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
set_ro_vendor_incremental()
|
||||||
|
{
|
||||||
|
local vendor_incremental="ro.vendor.build.version.incremental"
|
||||||
|
local vendor_incremental_value
|
||||||
|
local fetch_prop="ro.build.version.incremental"
|
||||||
|
local fetch_value=$(getprop $fetch_prop)
|
||||||
|
|
||||||
|
[ -z "$fetch_value" ] && prefetch_from_file $fetch_prop vendor_incremental_value
|
||||||
|
setprop $vendor_incremental "$vendor_incremental_value"
|
||||||
|
notice "$vendor_incremental='$vendor_incremental_value'"
|
||||||
|
}
|
||||||
|
|
||||||
|
smart_value()
|
||||||
|
{
|
||||||
|
local mtag=$1
|
||||||
|
local __result=$2
|
||||||
|
local value
|
||||||
|
eval $__result=""
|
||||||
|
local tmp=${mtag#?}
|
||||||
|
# absolute path to the file starts with '/'
|
||||||
|
if [ "${mtag%$tmp}" == "/" ]; then
|
||||||
|
value=$(cat $mtag)
|
||||||
|
# property likely to have '.'
|
||||||
|
elif [ "$mtag" != "${mtag%.*}" ]; then
|
||||||
|
value=$(getprop $mtag)
|
||||||
|
else # tag otherwise
|
||||||
|
value=$(cat $hw_mp/$mtag/ascii)
|
||||||
|
fi
|
||||||
|
eval $__result='$value'
|
||||||
|
}
|
||||||
|
|
||||||
|
url_style_off()
|
||||||
|
{
|
||||||
|
local __arg=$1
|
||||||
|
local value=$2
|
||||||
|
if [[ $value == *%* ]]; then
|
||||||
|
value=$(echo $value | sed 's/%20/ /g')
|
||||||
|
value=$(echo $value | sed 's/%28/\(/g')
|
||||||
|
value=$(echo $value | sed 's/%29/\)/g')
|
||||||
|
fi
|
||||||
|
eval $__arg='$value'
|
||||||
|
}
|
||||||
|
|
||||||
|
match()
|
||||||
|
{
|
||||||
|
local mapping
|
||||||
|
local mline
|
||||||
|
local mtag
|
||||||
|
local fs_value
|
||||||
|
local mvalue
|
||||||
|
local matched
|
||||||
|
url_style_off mapping $1
|
||||||
|
debug "match mapping='$mapping'"
|
||||||
|
# put '\"' around $mapping to ensure XML
|
||||||
|
# parser takes it as a single argument
|
||||||
|
for mline in $(exec_parser \"$mapping\"); do
|
||||||
|
get_tag_data mtag mvalue $mline
|
||||||
|
url_style_off mvalue $mvalue
|
||||||
|
# obtain value based on data source: utag, property or file
|
||||||
|
smart_value $mtag fs_value
|
||||||
|
if [ "$fs_value" == "$mvalue" ]; then
|
||||||
|
matched="true";
|
||||||
|
else
|
||||||
|
matched="false";
|
||||||
|
fi
|
||||||
|
debug "cmp utag='$mtag' values '$mvalue' & '$fs_value' is \"$matched\""
|
||||||
|
[ "$matched" == "false" ] && break
|
||||||
|
done
|
||||||
|
[ "$matched" == "true" ] && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
find_match()
|
||||||
|
{
|
||||||
|
local __retval=$1
|
||||||
|
local tag_name
|
||||||
|
local fline
|
||||||
|
local line
|
||||||
|
local subsection
|
||||||
|
local matched="false"
|
||||||
|
eval $__retval=""
|
||||||
|
for fline in $(exec_parser); do
|
||||||
|
subsection=${fline%% *}
|
||||||
|
add_device_params $subsection
|
||||||
|
for line in $(exec_parser); do
|
||||||
|
get_attr_data_by_name tag_name "name" $line
|
||||||
|
debug "tag_name='$tag_name'"
|
||||||
|
match $tag_name
|
||||||
|
[ "$?" != "0" ] && continue
|
||||||
|
eval $__retval=$tag_name
|
||||||
|
matched="true"
|
||||||
|
break
|
||||||
|
done
|
||||||
|
drop_device_parameter
|
||||||
|
[ "$matched" == "true" ] && break
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
prefetch_from_file()
|
||||||
|
{
|
||||||
|
local pname=$1
|
||||||
|
local __result=$2
|
||||||
|
local value
|
||||||
|
local override
|
||||||
|
eval $__result=""
|
||||||
|
value=$(cat $bp_file 2>/dev/null | sed '/^$/d' | sed '/^#/d' | sed '/^import/d' | sed -n "/$pname=/p" | sed 's/.*=//')
|
||||||
|
debug "'$pname' from '$bp_file': '$value'"
|
||||||
|
if [ -f $oem_file ]; then
|
||||||
|
override=$(cat $oem_file 2>/dev/null | sed '/^$/d' | sed '/^#/d' | sed '/^import/d' | sed -n "/$pname=/p" | sed 's/.*=//')
|
||||||
|
[ "$override" ] && value=$override && debug "'$pname' from '$oem_file': '$value'"
|
||||||
|
fi
|
||||||
|
eval $__result=$value
|
||||||
|
}
|
||||||
|
|
||||||
|
append_match()
|
||||||
|
{
|
||||||
|
local prop_list=$1
|
||||||
|
local suffix="$2"
|
||||||
|
local dest_prop
|
||||||
|
local fetched_prop
|
||||||
|
local prop_value
|
||||||
|
local IFS=','
|
||||||
|
# properties list to put the result of appending hw suffix to
|
||||||
|
# example: appended="ro.vendor.product.name,ro.vendor.product.device"
|
||||||
|
for dest_prop in $prop_list; do
|
||||||
|
fetch_prop=${dest_prop}
|
||||||
|
# only alter property name that has "vendor" in it
|
||||||
|
if [ "${fetch_prop//.vendor}" != "$dest_prop" ]; then
|
||||||
|
fetch_prop=${fetch_prop//.vendor}
|
||||||
|
prop_value=$(getprop $fetch_prop)
|
||||||
|
[ -z "$prop_value" ] && prefetch_from_file $fetch_prop prop_value
|
||||||
|
# finally set destination property to appended value
|
||||||
|
setprop $dest_prop "$prop_value$suffix"
|
||||||
|
notice "$dest_prop='$prop_value$suffix'"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
process_mappings()
|
||||||
|
{
|
||||||
|
local pname=""
|
||||||
|
local pexport=""
|
||||||
|
local pdefault=""
|
||||||
|
local pappend=""
|
||||||
|
local putag=""
|
||||||
|
local subsection
|
||||||
|
local pline
|
||||||
|
local matched_val
|
||||||
|
local whitespace_val
|
||||||
|
local export_val
|
||||||
|
local utag_val
|
||||||
|
for pline in $(exec_parser); do
|
||||||
|
subsection=${pline%% *}
|
||||||
|
debug "subsection is '$subsection'"
|
||||||
|
get_attr_data_by_name pname "name" $pline
|
||||||
|
get_attr_data_by_name pexport "export" $pline
|
||||||
|
get_attr_data_by_name pdefault "default" $pline
|
||||||
|
get_attr_data_by_name pappend "append" $pline
|
||||||
|
get_attr_data_by_name putag "writeback" $pline
|
||||||
|
[ "$pname" ] && url_style_off pname $pname && debug "name='$pname'"
|
||||||
|
[ "$pexport" ] && url_style_off pexport $pexport && debug "export='$pexport'"
|
||||||
|
[ "$pdefault" ] && url_style_off pdefault $pdefault && debug "default='$pdefault'"
|
||||||
|
[ "$pappend" ] && url_style_off pappend $pappend && debug "append='$pappend'"
|
||||||
|
# add 'subsection' to permanent parameters
|
||||||
|
add_device_params $subsection
|
||||||
|
# call itself here to handle nonamed subsection, like quirks
|
||||||
|
[ -z "$pname" ] && [ -z "$pexport" ] && [ -z "$pdefault" ] && [ -z "$pappend" ] && [ -z "$putag" ] && process_mappings && continue
|
||||||
|
find_match matched_val
|
||||||
|
[ "$matched_val" ] && url_style_off matched_val $matched_val
|
||||||
|
# append_match handles OEM overrides, thus has to be called even with empty value
|
||||||
|
[ "$pappend" ] && append_match $pappend "$matched_val"
|
||||||
|
if [ "$matched_val" ]; then
|
||||||
|
if [ "$pexport" ]; then
|
||||||
|
setprop $pexport "$matched_val"
|
||||||
|
notice "exporting '$matched_val' into property $pexport"
|
||||||
|
fi
|
||||||
|
elif [ "$pexport" -a "$pdefault" ]; then
|
||||||
|
# if match is not found, proceed with default
|
||||||
|
setprop $pexport "$pdefault"
|
||||||
|
notice "defaulting '$pdefault' into property $pexport"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$putag" ] && [ -d $hw_mp/$putag ]; then
|
||||||
|
export_val=$(getprop $pexport)
|
||||||
|
utag_val=$(cat $hw_mp/$putag/ascii)
|
||||||
|
debug "writeback compare $utag_val,$export_val"
|
||||||
|
# if property is empty value, clear the utag.
|
||||||
|
# if property and writeback utag are empty value, don't update utag
|
||||||
|
if [ "$export_val" -o "$utag_val" != "(null)" ] && [ "$utag_val" != "$export_val" ]; then
|
||||||
|
update_utag $putag $export_val
|
||||||
|
notice "writeback '$export_val' into utag $putag"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# remove the last added parameter
|
||||||
|
drop_device_parameter
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main starts here
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
if [ ! -z "$mount_2nd_stage" ]; then
|
||||||
|
notice "Super image detection"
|
||||||
|
super_image_detection
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$reset_touch" ]; then
|
||||||
|
notice "reset reboot counter"
|
||||||
|
set_reboot_counter 0
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$dead_touch" ]; then
|
||||||
|
notice "property [$touch_status_prop] set to [dead]"
|
||||||
|
set_reboot_counter 1
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /vendor/lib/modules/utags.ko ]; then
|
||||||
|
notice "loading utag driver"
|
||||||
|
insmod /vendor/lib/modules/utags.ko
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
gki_modules_full_path=`find /vendor/lib/modules -name "*-gki"`
|
||||||
|
if [ -n "$gki_modules_full_path" ]; then
|
||||||
|
gki_modules_path=`basename $gki_modules_full_path`
|
||||||
|
notice "loading gki utag driver in /vendor/lib/modules/$gki_modules_path"
|
||||||
|
insmod /vendor/lib/modules/$gki_modules_path/utags.ko
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
notice "fail to load /vendor/lib/modules/$gki_modules_path/utags.ko"
|
||||||
|
setprop ro.vendor.mot.gki.path "."
|
||||||
|
else
|
||||||
|
notice "successfully load /vendor/lib/modules/$gki_modules_path/utags.ko"
|
||||||
|
setprop ro.vendor.mot.gki.path $gki_modules_path
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
notice "fail to load utag driver"
|
||||||
|
setprop ro.vendor.mot.gki.path "."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
setprop ro.vendor.mot.gki.path "."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
notice "checking integrity"
|
||||||
|
# check necessary components exist and just proceed
|
||||||
|
# with RO properties setup otherwise
|
||||||
|
if [ ! -f /$BASEDIR/bin/expat ] || [ ! -f $vhw_file ]; then
|
||||||
|
notice "warning: missing expat or xml"
|
||||||
|
set_ro_hw_properties
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$populate_only" ]; then
|
||||||
|
# special handling for factory UTAGs provisioning
|
||||||
|
for path in /data/local/tmp /pds/factory; do
|
||||||
|
[ -f $path/$hw_cfg_file ] && break
|
||||||
|
done
|
||||||
|
notice "populating hw config from '$path/$hw_cfg_file'"
|
||||||
|
set_xml_file $path/$hw_cfg_file
|
||||||
|
populate_utags hardware
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
notice "initializing procfs"
|
||||||
|
procfs_wait_for_device readiness
|
||||||
|
if [ "$readiness" != "0" ]; then
|
||||||
|
notice "no access to hw utags procfs"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# populate touch status property with reboot counter
|
||||||
|
set_reboot_counter_property &
|
||||||
|
|
||||||
|
# XML parsing starts here
|
||||||
|
set_xml_file $vhw_file
|
||||||
|
|
||||||
|
get_attr_data_by_name boot_device_prop "match" $(exec_parser)
|
||||||
|
debug "attr='get' value='$boot_device_prop'"
|
||||||
|
if [ -z $boot_device_prop ]; then
|
||||||
|
notice "fatal: undefined boot device property"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ensure lower case
|
||||||
|
typeset -l boot_device=$(getprop $boot_device_prop)
|
||||||
|
# drop suffixes
|
||||||
|
boot_device=${boot_device%[_-]*}
|
||||||
|
notice "matching to boot device '$boot_device'"
|
||||||
|
|
||||||
|
# add 'validation' to permanent parameters
|
||||||
|
add_device_params validation
|
||||||
|
|
||||||
|
for line in $(exec_parser); do
|
||||||
|
get_attr_data_by_name product "name" $line
|
||||||
|
debug "attr='name' value='$product'"
|
||||||
|
if [ "$product" == "$boot_device" ]; then
|
||||||
|
get_attr_data_by_name xml_version "version" $line
|
||||||
|
[ "$xml_version" != "unknown" ] && notice "device '$boot_device' xml version='$xml_version'"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
[ "$xml_version" == "unknown" ] && notice "no match found for device '$boot_device'"
|
||||||
|
# delete obsolete 'version' utag if exists
|
||||||
|
[ -d $hw_mp/${ver_utag#?} ] && $(echo ${ver_utag#?} > $hw_mp/all/delete)
|
||||||
|
# read procfs version
|
||||||
|
[ -d $hw_mp/$ver_utag ] && version_fs=$(cat $hw_mp/$ver_utag/ascii)
|
||||||
|
notice "procfs version='$version_fs'"
|
||||||
|
# add 'device' and '$boot_device' to permanent parameters
|
||||||
|
add_device_params device $boot_device
|
||||||
|
[ "$xml_version" == "$version_fs" ] && notice "hw descriptor is up to date"
|
||||||
|
for section in $(exec_parser); do
|
||||||
|
debug "section='$section'"
|
||||||
|
case $section in
|
||||||
|
mappings)
|
||||||
|
# add 'mappings' to permanent parameters
|
||||||
|
add_device_params $section
|
||||||
|
process_mappings &
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
[ "$xml_version" == "$version_fs" ] && continue
|
||||||
|
populate_utags $section;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$xml_version" != "$version_fs" ]; then
|
||||||
|
# create version utag if it's missing
|
||||||
|
[ ! -d $hw_mp/$ver_utag ] && $(echo "$ver_utag" > $hw_mp/all/new)
|
||||||
|
# update procfs version
|
||||||
|
[ -d $hw_mp/$ver_utag ] && $(echo "$xml_version" > $hw_mp/$ver_utag/ascii)
|
||||||
|
fi
|
||||||
|
|
||||||
|
set_ro_vendor_incremental &
|
||||||
|
|
||||||
|
set_ro_hw_properties
|
||||||
|
|
||||||
|
if [ "$utag_update_fail" == "true" ]; then
|
||||||
|
set_ro_hw_properties_upgrade
|
||||||
|
fi
|
||||||
|
|
||||||
|
wait
|
||||||
|
|
||||||
|
notice "script init.oem.hw.sh finish "
|
||||||
|
return 0
|
||||||
|
|
552
rootdir/bin/init.qcom.early_boot.sh
Executable file
552
rootdir/bin/init.qcom.early_boot.sh
Executable file
|
@ -0,0 +1,552 @@
|
||||||
|
#! /vendor/bin/sh
|
||||||
|
|
||||||
|
# Copyright (c) 2012-2013,2016,2018-2021 The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
export PATH=/vendor/bin
|
||||||
|
|
||||||
|
# Set platform variables
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
|
||||||
|
else
|
||||||
|
soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
|
||||||
|
fi
|
||||||
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
|
soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
|
||||||
|
else
|
||||||
|
soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
|
||||||
|
fi
|
||||||
|
if [ -f /sys/devices/soc0/platform_version ]; then
|
||||||
|
soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
|
||||||
|
else
|
||||||
|
soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /sys/class/drm/card0-DSI-1/modes ]; then
|
||||||
|
echo "detect" > /sys/class/drm/card0-DSI-1/status
|
||||||
|
mode_file=/sys/class/drm/card0-DSI-1/modes
|
||||||
|
while read line; do
|
||||||
|
fb_width=${line%%x*};
|
||||||
|
break;
|
||||||
|
done < $mode_file
|
||||||
|
elif [ -f /sys/class/graphics/fb0/virtual_size ]; then
|
||||||
|
res=`cat /sys/class/graphics/fb0/virtual_size` 2> /dev/null
|
||||||
|
fb_width=${res%,*}
|
||||||
|
fi
|
||||||
|
|
||||||
|
log -t BOOT -p i "MSM target '$1', SoC '$soc_hwplatform', HwID '$soc_hwid', SoC ver '$soc_hwver'"
|
||||||
|
|
||||||
|
#For drm based display driver
|
||||||
|
vbfile=/sys/module/drm/parameters/vblankoffdelay
|
||||||
|
if [ -w $vbfile ]; then
|
||||||
|
echo -1 > $vbfile
|
||||||
|
else
|
||||||
|
log -t DRM_BOOT -p w "file: '$vbfile' or perms doesn't exist"
|
||||||
|
fi
|
||||||
|
|
||||||
|
function set_density_by_fb() {
|
||||||
|
#put default density based on width
|
||||||
|
if [ -z $fb_width ]; then
|
||||||
|
setprop vendor.display.lcd_density 320
|
||||||
|
else
|
||||||
|
if [ $fb_width -ge 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
elif [ $fb_width -ge 1440 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
elif [ $fb_width -ge 1080 ]; then
|
||||||
|
setprop vendor.display.lcd_density 480
|
||||||
|
elif [ $fb_width -ge 720 ]; then
|
||||||
|
setprop vendor.display.lcd_density 320 #for 720X1280 resolution
|
||||||
|
elif [ $fb_width -ge 480 ]; then
|
||||||
|
setprop vendor.display.lcd_density 240 #for 480X854 QRD resolution
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
target=`getprop ro.board.platform`
|
||||||
|
case "$target" in
|
||||||
|
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"FFA" | "SVLTE_FFA")
|
||||||
|
# linking to surf_keypad_qwerty.kcm.bin instead of surf_keypad_numeric.kcm.bin so that
|
||||||
|
# the UI keyboard works fine.
|
||||||
|
ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
|
||||||
|
;;
|
||||||
|
"Fluid")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
setprop qcom.bt.dev_power_class 2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"sm6150")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"ADP")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$soc_hwid" in
|
||||||
|
365|366)
|
||||||
|
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
if [ $sku_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
355|369|377|384)
|
||||||
|
setprop vendor.chre.enabled 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8660")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Fluid")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
"Dragon")
|
||||||
|
setprop ro.sound.alsa "WM8903"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
"msm8960")
|
||||||
|
# lcd density is write-once. Hence the separate switch case
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Liquid")
|
||||||
|
if [ "$soc_hwver" == "196608" ]; then # version 0x30000 is 3D sku
|
||||||
|
setprop ro.sf.hwrotation 90
|
||||||
|
fi
|
||||||
|
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
"MTP")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case "$soc_hwid" in
|
||||||
|
"109")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#Set up composition type based on the target
|
||||||
|
case "$soc_hwid" in
|
||||||
|
87)
|
||||||
|
#8960
|
||||||
|
setprop debug.composition.type dyn
|
||||||
|
;;
|
||||||
|
153|154|155|156|157|138)
|
||||||
|
#8064 V2 PRIME | 8930AB | 8630AB | 8230AB | 8030AB | 8960AB
|
||||||
|
setprop debug.composition.type c2d
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
"msm8974")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Liquid")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
# Liquid do not have hardware navigation keys, so enable
|
||||||
|
# Android sw navigation bar
|
||||||
|
setprop ro.hw.nav_keys 0
|
||||||
|
;;
|
||||||
|
"Dragon")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 320
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
"msm8226")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 320
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
"msm8610" | "apq8084" | "mpq8092")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"apq8084")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Liquid")
|
||||||
|
setprop vendor.display.lcd_density 320
|
||||||
|
# Liquid do not have hardware navigation keys, so enable
|
||||||
|
# Android sw navigation bar
|
||||||
|
setprop ro.hw.nav_keys 0
|
||||||
|
;;
|
||||||
|
"SBC")
|
||||||
|
setprop vendor.display.lcd_density 200
|
||||||
|
# SBC do not have hardware navigation keys, so enable
|
||||||
|
# Android sw navigation bar
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 480
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8996")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Dragon")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"ADP")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"SBC")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8937" | "msm8940")
|
||||||
|
# Set vendor.opengles.version based on chip id.
|
||||||
|
# MSM8937 and MSM8940 variants supports OpenGLES 3.1
|
||||||
|
# 196608 is decimal for 0x30000 to report version 3.0
|
||||||
|
# 196609 is decimal for 0x30001 to report version 3.1
|
||||||
|
# 196610 is decimal for 0x30002 to report version 3.2
|
||||||
|
case "$soc_hwid" in
|
||||||
|
294|295|296|297|298|313|353|354|363|364)
|
||||||
|
# Disable adsprpcd_sensorspd daemon
|
||||||
|
setprop vendor.fastrpc.disable.adsprpcd_sensorspd.daemon 1
|
||||||
|
|
||||||
|
setprop vendor.opengles.version 196610
|
||||||
|
if [ $soc_hwid = 354 ]
|
||||||
|
then
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
log -t BOOT -p i "SDM429 early_boot prop set for: HwID '$soc_hwid'"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
303|307|308|309|320|386|436)
|
||||||
|
# Vulkan is not supported for 8917 variants
|
||||||
|
setprop vendor.opengles.version 196608
|
||||||
|
setprop persist.graphics.vulkan.disable true
|
||||||
|
setprop vendor.gralloc.disable_ahardware_buffer 1
|
||||||
|
# Disable adsprpcd_sensorspd daemon
|
||||||
|
setprop vendor.fastrpc.disable.adsprpcd_sensorspd.daemon 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.opengles.version 196608
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8909")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
setprop persist.graphics.vulkan.disable true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8998" | "apq8098_latv")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"sdm845")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
if [ $fb_width -le 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msmnile")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
if [ $fb_width -le 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"kona")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
setprop vendor.media.target_variant "_kona"
|
||||||
|
if [ $fb_width -le 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"lito")
|
||||||
|
case "$soc_hwid" in
|
||||||
|
400|440)
|
||||||
|
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
|
||||||
|
if [ $sku_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
434|459)
|
||||||
|
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
|
||||||
|
setprop vendor.media.target.version 2
|
||||||
|
if [ $sku_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 3
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
476)
|
||||||
|
# Fraser soc_id 476
|
||||||
|
setprop vendor.display.enable_qsync_idle 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"bengal")
|
||||||
|
case "$soc_hwid" in
|
||||||
|
441|473)
|
||||||
|
# 441 is for scuba and 473 for scuba iot qcm
|
||||||
|
setprop vendor.fastrpc.disable.cdsprpcd.daemon 1
|
||||||
|
setprop vendor.media.target.version 2
|
||||||
|
setprop vendor.gralloc.disable_ubwc 1
|
||||||
|
setprop vendor.display.enhance_idle_time 1
|
||||||
|
setprop vendor.netflix.bsp_rev ""
|
||||||
|
# 196609 is decimal for 0x30001 to report version 3.1
|
||||||
|
setprop vendor.opengles.version 196609
|
||||||
|
sku_ver=`cat /sys/devices/platform/soc/5a00000.qcom,vidc1/sku_version` 2> /dev/null
|
||||||
|
if [ $sku_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 3
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
471|474)
|
||||||
|
# 471 is for scuba APQ and 474 for scuba iot qcs
|
||||||
|
setprop vendor.fastrpc.disable.cdsprpcd.daemon 1
|
||||||
|
setprop vendor.gralloc.disable_ubwc 1
|
||||||
|
setprop vendor.display.enhance_idle_time 1
|
||||||
|
setprop vendor.netflix.bsp_rev ""
|
||||||
|
;;
|
||||||
|
518)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"sdm710" | "msmpeafowl")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
if [ $fb_width -le 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
fi
|
||||||
|
|
||||||
|
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
|
||||||
|
if [ $sku_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8953")
|
||||||
|
cap_ver = 1
|
||||||
|
if [ -e "/sys/devices/platform/soc/1d00000.qcom,vidc/capability_version" ]; then
|
||||||
|
cap_ver=`cat /sys/devices/platform/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
|
||||||
|
else
|
||||||
|
cap_ver=`cat /sys/devices/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $cap_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
#Set property to differentiate SDM660 & SDM455
|
||||||
|
#SOC ID for SDM455 is 385
|
||||||
|
"sdm660")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
if [ $fb_width -le 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $soc_hwid -eq 385 ]; then
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"holi")
|
||||||
|
setprop vendor.media.target_variant "_holi"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$target" in
|
||||||
|
"msm8937")
|
||||||
|
case "$soc_hwid" in
|
||||||
|
386|354|353|303)
|
||||||
|
# enable qrtr-ns service for kernel 4.14 or above
|
||||||
|
KernelVersionStr=`cat /proc/sys/kernel/osrelease`
|
||||||
|
KernelVersionS=${KernelVersionStr:2:2}
|
||||||
|
KernelVersionA=${KernelVersionStr:0:1}
|
||||||
|
KernelVersionB=${KernelVersionS%.*}
|
||||||
|
|
||||||
|
if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 14 ]; then
|
||||||
|
setprop init.svc.vendor.qrtrns.enable 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
baseband=`getprop ro.baseband`
|
||||||
|
#enable atfwd daemon all targets except sda, apq, qcs
|
||||||
|
case "$baseband" in
|
||||||
|
"apq" | "sda" | "qcs" )
|
||||||
|
setprop persist.vendor.radio.atfwd.start false;;
|
||||||
|
*)
|
||||||
|
setprop persist.vendor.radio.atfwd.start true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#set default lcd density
|
||||||
|
#Since lcd density has read only
|
||||||
|
#property, it will not overwrite previous set
|
||||||
|
#property if any target is setting forcefully.
|
||||||
|
set_density_by_fb
|
||||||
|
|
||||||
|
|
||||||
|
# set Lilliput LCD density for ADP
|
||||||
|
product=`getprop ro.build.product`
|
||||||
|
|
||||||
|
case "$product" in
|
||||||
|
"msmnile_au")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
echo 902400000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq
|
||||||
|
echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/max_freq
|
||||||
|
echo 902400000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/min_freq
|
||||||
|
echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/max_freq
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$product" in
|
||||||
|
"sm6150_au")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$product" in
|
||||||
|
"sdmshrike_au")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$product" in
|
||||||
|
"msmnile_gvmq")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$product" in
|
||||||
|
"msmnile_gvmgh")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# Setup display nodes & permissions
|
||||||
|
# HDMI can be fb1 or fb2
|
||||||
|
# Loop through the sysfs nodes and determine
|
||||||
|
# the HDMI(dtv panel)
|
||||||
|
|
||||||
|
function set_perms() {
|
||||||
|
#Usage set_perms <filename> <ownership> <permission>
|
||||||
|
chown -h $2 $1
|
||||||
|
chmod $3 $1
|
||||||
|
}
|
||||||
|
|
||||||
|
# check for the type of driver FB or DRM
|
||||||
|
fb_driver=/sys/class/graphics/fb0
|
||||||
|
if [ -e "$fb_driver" ]
|
||||||
|
then
|
||||||
|
# check for mdp caps
|
||||||
|
file=/sys/class/graphics/fb0/mdp/caps
|
||||||
|
if [ -f "$file" ]
|
||||||
|
then
|
||||||
|
setprop vendor.gralloc.disable_ubwc 1
|
||||||
|
cat $file | while read line; do
|
||||||
|
case "$line" in
|
||||||
|
*"ubwc"*)
|
||||||
|
setprop vendor.gralloc.enable_fb_ubwc 1
|
||||||
|
setprop vendor.gralloc.disable_ubwc 0
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
set_perms /sys/devices/virtual/hdcp/msm_hdcp/min_level_change system.graphics 0660
|
||||||
|
fi
|
||||||
|
|
||||||
|
# allow system_graphics group to access pmic secure_mode node
|
||||||
|
set_perms /sys/class/lcd_bias/secure_mode system.graphics 0660
|
||||||
|
set_perms /sys/class/leds/wled/secure_mode system.graphics 0660
|
||||||
|
|
||||||
|
boot_reason=`cat /proc/sys/kernel/boot_reason`
|
||||||
|
reboot_reason=`getprop ro.boot.alarmboot`
|
||||||
|
if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then
|
||||||
|
setprop ro.vendor.alarm_boot true
|
||||||
|
else
|
||||||
|
setprop ro.vendor.alarm_boot false
|
||||||
|
fi
|
||||||
|
|
||||||
|
# copy GPU frequencies to vendor property
|
||||||
|
if [ -f /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies ]; then
|
||||||
|
gpu_freq=`cat /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies` 2> /dev/null
|
||||||
|
setprop vendor.gpu.available_frequencies "$gpu_freq"
|
||||||
|
fi
|
6272
rootdir/bin/init.qcom.post_boot.sh
Executable file
6272
rootdir/bin/init.qcom.post_boot.sh
Executable file
File diff suppressed because it is too large
Load diff
465
rootdir/bin/init.qcom.sh
Executable file
465
rootdir/bin/init.qcom.sh
Executable file
|
@ -0,0 +1,465 @@
|
||||||
|
#! /vendor/bin/sh
|
||||||
|
|
||||||
|
# Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
target=`getprop ro.board.platform`
|
||||||
|
low_ram=`getprop ro.config.low_ram`
|
||||||
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
|
platformid=`cat /sys/devices/soc0/soc_id`
|
||||||
|
else
|
||||||
|
platformid=`cat /sys/devices/system/soc/soc0/id`
|
||||||
|
fi
|
||||||
|
|
||||||
|
start_battery_monitor()
|
||||||
|
{
|
||||||
|
if ls /sys/bus/spmi/devices/qpnp-bms-*/fcc_data ; then
|
||||||
|
chown -h root.system /sys/module/pm8921_bms/parameters/*
|
||||||
|
chown -h root.system /sys/module/qpnp_bms/parameters/*
|
||||||
|
chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_data
|
||||||
|
chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_temp
|
||||||
|
chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_chgcyl
|
||||||
|
chmod 0660 /sys/module/qpnp_bms/parameters/*
|
||||||
|
chmod 0660 /sys/module/pm8921_bms/parameters/*
|
||||||
|
mkdir -p /data/bms
|
||||||
|
chown -h root.system /data/bms
|
||||||
|
chmod 0770 /data/bms
|
||||||
|
start battery_monitor
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_charger_monitor()
|
||||||
|
{
|
||||||
|
if ls /sys/module/qpnp_charger/parameters/charger_monitor; then
|
||||||
|
chown -h root.system /sys/module/qpnp_charger/parameters/*
|
||||||
|
chown -h root.system /sys/class/power_supply/battery/input_current_max
|
||||||
|
chown -h root.system /sys/class/power_supply/battery/input_current_trim
|
||||||
|
chown -h root.system /sys/class/power_supply/battery/input_current_settled
|
||||||
|
chown -h root.system /sys/class/power_supply/battery/voltage_min
|
||||||
|
chmod 0664 /sys/class/power_supply/battery/input_current_max
|
||||||
|
chmod 0664 /sys/class/power_supply/battery/input_current_trim
|
||||||
|
chmod 0664 /sys/class/power_supply/battery/input_current_settled
|
||||||
|
chmod 0664 /sys/class/power_supply/battery/voltage_min
|
||||||
|
chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor
|
||||||
|
start charger_monitor
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_vm_bms()
|
||||||
|
{
|
||||||
|
if [ -e /dev/vm_bms ]; then
|
||||||
|
chown -h root.system /sys/class/power_supply/bms/current_now
|
||||||
|
chown -h root.system /sys/class/power_supply/bms/voltage_ocv
|
||||||
|
chmod 0664 /sys/class/power_supply/bms/current_now
|
||||||
|
chmod 0664 /sys/class/power_supply/bms/voltage_ocv
|
||||||
|
start vm_bms
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_msm_irqbalance_8939()
|
||||||
|
{
|
||||||
|
if [ -f /vendor/bin/msm_irqbalance ]; then
|
||||||
|
case "$platformid" in
|
||||||
|
"239" | "293" | "294" | "295" | "304" | "338" | "313" | "353" | "354")
|
||||||
|
start vendor.msm_irqbalance;;
|
||||||
|
"349" | "350" )
|
||||||
|
start vendor.msm_irqbal_lb;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_msm_irqbalance_msmnile()
|
||||||
|
{
|
||||||
|
if [ -f /vendor/bin/msm_irqbalance ]; then
|
||||||
|
start vendor.msm_irqbalance
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_msm_irqbalance_kona()
|
||||||
|
{
|
||||||
|
if [ -f /vendor/bin/msm_irqbalance ]; then
|
||||||
|
start vendor.msm_irqbalance
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_msm_irqbalance_lito()
|
||||||
|
{
|
||||||
|
if [ -f /vendor/bin/msm_irqbalance ]; then
|
||||||
|
start vendor.msm_irqbalance
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_msm_irqbalance_atoll()
|
||||||
|
{
|
||||||
|
if [ -f /vendor/bin/msm_irqbalance ]; then
|
||||||
|
start vendor.msm_irqbalance
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_msm_irqbalance660()
|
||||||
|
{
|
||||||
|
if [ -f /vendor/bin/msm_irqbalance ]; then
|
||||||
|
case "$platformid" in
|
||||||
|
"317" | "321" | "324" | "325" | "326" | "336" | "345" | "346" | "360" | "393")
|
||||||
|
start vendor.msm_irqbalance;;
|
||||||
|
"318" | "327" | "385")
|
||||||
|
start vendor.msm_irqbl_sdm630;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_msm_irqbalance()
|
||||||
|
{
|
||||||
|
if [ -f /vendor/bin/msm_irqbalance ]; then
|
||||||
|
start vendor.msm_irqbalance
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
baseband=`getprop ro.baseband`
|
||||||
|
echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr
|
||||||
|
|
||||||
|
case "$baseband" in
|
||||||
|
"svlte2a")
|
||||||
|
start bridgemgrd
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$target" in
|
||||||
|
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
value=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
else
|
||||||
|
value=`cat /sys/devices/system/soc/soc0/hw_platform`
|
||||||
|
fi
|
||||||
|
case "$value" in
|
||||||
|
"Fluid")
|
||||||
|
start profiler_daemon;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8660" )
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
platformvalue=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
else
|
||||||
|
platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
|
||||||
|
fi
|
||||||
|
case "$platformvalue" in
|
||||||
|
"Fluid")
|
||||||
|
start profiler_daemon;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8960")
|
||||||
|
case "$baseband" in
|
||||||
|
"msm")
|
||||||
|
start_battery_monitor;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
platformvalue=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
else
|
||||||
|
platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
|
||||||
|
fi
|
||||||
|
case "$platformvalue" in
|
||||||
|
"Fluid")
|
||||||
|
start profiler_daemon;;
|
||||||
|
"Liquid")
|
||||||
|
start profiler_daemon;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8974")
|
||||||
|
platformvalue=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
case "$platformvalue" in
|
||||||
|
"Fluid")
|
||||||
|
start profiler_daemon;;
|
||||||
|
"Liquid")
|
||||||
|
start profiler_daemon;;
|
||||||
|
esac
|
||||||
|
case "$baseband" in
|
||||||
|
"msm")
|
||||||
|
start_battery_monitor
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
start_charger_monitor
|
||||||
|
;;
|
||||||
|
"sdm660")
|
||||||
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
|
soc_id=`cat /sys/devices/soc0/soc_id`
|
||||||
|
else
|
||||||
|
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
hw_platform=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
else
|
||||||
|
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$soc_id" in
|
||||||
|
"317" | "324" | "325" | "326" | "318" | "327" )
|
||||||
|
case "$hw_platform" in
|
||||||
|
"Surf")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"MTP")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"RCM")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"QRD")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
start_msm_irqbalance660
|
||||||
|
;;
|
||||||
|
"apq8084")
|
||||||
|
platformvalue=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
case "$platformvalue" in
|
||||||
|
"Fluid")
|
||||||
|
start profiler_daemon;;
|
||||||
|
"Liquid")
|
||||||
|
start profiler_daemon;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8226")
|
||||||
|
start_charger_monitor
|
||||||
|
;;
|
||||||
|
"msm8610")
|
||||||
|
start_charger_monitor
|
||||||
|
;;
|
||||||
|
"msm8916")
|
||||||
|
start_vm_bms
|
||||||
|
start_msm_irqbalance_8939
|
||||||
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
|
soc_id=`cat /sys/devices/soc0/soc_id`
|
||||||
|
else
|
||||||
|
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /sys/devices/soc0/platform_subtype_id ]; then
|
||||||
|
platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
|
||||||
|
fi
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
hw_platform=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
fi
|
||||||
|
case "$soc_id" in
|
||||||
|
"239")
|
||||||
|
case "$hw_platform" in
|
||||||
|
"Surf")
|
||||||
|
case "$platform_subtype_id" in
|
||||||
|
"1")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"MTP")
|
||||||
|
case "$platform_subtype_id" in
|
||||||
|
"3")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8994" | "msm8992" | "msm8998" | "apq8098_latv" | "sdm845" | "sdm710" | "qcs605" | "sm6150" | "trinket" | "bengal")
|
||||||
|
start_msm_irqbalance
|
||||||
|
;;
|
||||||
|
"msm8996")
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
hw_platform=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
fi
|
||||||
|
case "$hw_platform" in
|
||||||
|
"MTP" | "CDP")
|
||||||
|
#Loop through the sysfs nodes and determine the correct sysfs to change the permission and ownership.
|
||||||
|
for count in 0 1 2 3 4 5 6 7 8 9 10
|
||||||
|
do
|
||||||
|
dir="/sys/devices/soc/75ba000.i2c/i2c-12/12-0020/input/input"$count
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
chmod 0660 $dir/secure_touch_enable
|
||||||
|
chmod 0440 $dir/secure_touch
|
||||||
|
chown system.drmrpc $dir/secure_touch_enable
|
||||||
|
chown system.drmrpc $dir/secure_touch
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8909")
|
||||||
|
start_vm_bms
|
||||||
|
;;
|
||||||
|
"msmnile")
|
||||||
|
start_msm_irqbalance_msmnile
|
||||||
|
;;
|
||||||
|
"kona")
|
||||||
|
start_msm_irqbalance_kona
|
||||||
|
;;
|
||||||
|
"lito")
|
||||||
|
start_msm_irqbalance_lito
|
||||||
|
;;
|
||||||
|
"atoll")
|
||||||
|
start_msm_irqbalance_atoll
|
||||||
|
;;
|
||||||
|
"msm8937")
|
||||||
|
start_msm_irqbalance_8939
|
||||||
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
|
soc_id=`cat /sys/devices/soc0/soc_id`
|
||||||
|
else
|
||||||
|
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
hw_platform=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
else
|
||||||
|
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
|
||||||
|
fi
|
||||||
|
if [ "$low_ram" != "true" ]; then
|
||||||
|
case "$soc_id" in
|
||||||
|
"294" | "295" | "303" | "307" | "308" | "309" | "313" | "320" | "353" | "354" | "363" | "364")
|
||||||
|
case "$hw_platform" in
|
||||||
|
"Surf")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"MTP")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"RCM")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"QRD")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"msm8953")
|
||||||
|
start_msm_irqbalance_8939
|
||||||
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
|
soc_id=`cat /sys/devices/soc0/soc_id`
|
||||||
|
else
|
||||||
|
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
hw_platform=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
else
|
||||||
|
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
|
||||||
|
fi
|
||||||
|
case "$soc_id" in
|
||||||
|
"293" | "304" | "338" | "351" | "349" | "350" )
|
||||||
|
case "$hw_platform" in
|
||||||
|
"Surf")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"MTP")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"RCM")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"QRD")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"sdm710")
|
||||||
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
|
soc_id=`cat /sys/devices/soc0/soc_id`
|
||||||
|
else
|
||||||
|
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
hw_platform=`cat /sys/devices/soc0/hw_platform`
|
||||||
|
else
|
||||||
|
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
|
||||||
|
fi
|
||||||
|
case "$soc_id" in
|
||||||
|
"336" | "337" | "347" | "360" | "393" )
|
||||||
|
case "$hw_platform" in
|
||||||
|
"Surf")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"MTP")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"RCM")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"QRD")
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Make modem config folder and copy firmware config to that folder for RIL
|
||||||
|
#
|
||||||
|
if [ -f /data/vendor/modem_config/ver_info.txt ]; then
|
||||||
|
prev_version_info=`cat /data/vendor/modem_config/ver_info.txt`
|
||||||
|
else
|
||||||
|
prev_version_info=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt`
|
||||||
|
if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
|
||||||
|
# add W for group recursively before delete
|
||||||
|
chmod g+w -R /data/vendor/modem_config/*
|
||||||
|
rm -rf /data/vendor/modem_config/*
|
||||||
|
# preserve the read only mode for all subdir and files
|
||||||
|
cp --preserve=m -dr /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
|
||||||
|
cp --preserve=m -d /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/modem_config/
|
||||||
|
cp --preserve=m -d /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/
|
||||||
|
# the group must be root, otherwise this script could not add "W" for group recursively
|
||||||
|
chown -hR radio.root /data/vendor/modem_config/*
|
||||||
|
fi
|
||||||
|
chmod g-w /data/vendor/modem_config
|
||||||
|
setprop ro.vendor.ril.mbn_copy_completed 1
|
||||||
|
|
||||||
|
#check build variant for printk logging
|
||||||
|
#current default minimum boot-time-default
|
||||||
|
buildvariant=`getprop ro.build.type`
|
||||||
|
case "$buildvariant" in
|
||||||
|
"userdebug" | "eng")
|
||||||
|
#set default loglevel to KERN_INFO
|
||||||
|
echo "7 6 1 7" > /proc/sys/kernel/printk
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
#set default loglevel to KERN_WARNING
|
||||||
|
echo "4 4 1 4" > /proc/sys/kernel/printk
|
||||||
|
;;
|
||||||
|
esac
|
44
rootdir/bin/init.qti.dcvs.sh
Executable file
44
rootdir/bin/init.qti.dcvs.sh
Executable file
|
@ -0,0 +1,44 @@
|
||||||
|
#! /vendor/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are
|
||||||
|
# met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived
|
||||||
|
# from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED "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 device in /sys/devices/platform/soc
|
||||||
|
do
|
||||||
|
for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
|
||||||
|
do
|
||||||
|
echo "mem_latency" > $memlat/governor
|
||||||
|
echo 10 > $memlat/polling_interval
|
||||||
|
echo 400 > $memlat/mem_latency/ratio_ceil
|
||||||
|
done
|
||||||
|
|
||||||
|
for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
|
||||||
|
do
|
||||||
|
echo "compute" > $latfloor/governor
|
||||||
|
echo 10 > $latfloor/polling_interval
|
||||||
|
done
|
||||||
|
done;
|
56
rootdir/bin/init.qti.early_init.sh
Executable file
56
rootdir/bin/init.qti.early_init.sh
Executable file
|
@ -0,0 +1,56 @@
|
||||||
|
#! /vendor/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
soc_id=`cat /sys/devices/soc0/soc_id` 2> /dev/null
|
||||||
|
|
||||||
|
# Store soc_id in ro.vendor.qti.soc_id
|
||||||
|
setprop ro.vendor.qti.soc_id $soc_id
|
||||||
|
|
||||||
|
if [ "$soc_id" -eq 444 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model SM6115
|
||||||
|
elif [ "$soc_id" -eq 417 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model SM4250
|
||||||
|
elif [ "$soc_id" -eq 441 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model SM4125
|
||||||
|
elif [ "$soc_id" -eq 518 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model SM6225
|
||||||
|
elif [ "$soc_id" -eq 469 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model QCM4290
|
||||||
|
elif [ "$soc_id" -eq 470 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model QCS4290
|
||||||
|
elif [ "$soc_id" -eq 473 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model QCM2290
|
||||||
|
elif [ "$soc_id" -eq 474 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model QCS2290
|
||||||
|
elif [ "$soc_id" -eq 497 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model QCM6490
|
||||||
|
elif [ "$soc_id" -eq 498 ]; then
|
||||||
|
setprop ro.vendor.qti.soc_model QCS6490
|
||||||
|
fi
|
27
rootdir/etc/init.mmi.charge_only.rc
Normal file
27
rootdir/etc/init.mmi.charge_only.rc
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Wait for the USB init shell script to finish, to prevent enumeration issues
|
||||||
|
on property:init.svc.vendor.mmi-usb-sh=stopped && property:ro.boot.mode=charger
|
||||||
|
setprop sys.usb.configfs 1
|
||||||
|
setprop sys.usb.config charging
|
||||||
|
|
||||||
|
on moto-charger
|
||||||
|
stop vendor.sensors
|
||||||
|
chown radio wakelock /sys/power/wake_lock
|
||||||
|
chmod 0660 /sys/power/wake_lock
|
||||||
|
chown radio wakelock /sys/power/wake_unlock
|
||||||
|
chmod 0660 /sys/power/wake_unlock
|
||||||
|
trigger firmware_mounts_complete
|
||||||
|
start vendor.charge_only_mode
|
||||||
|
start vendor.batt_health
|
||||||
|
start vendor.thermal-com
|
||||||
|
start system_suspend
|
||||||
|
|
||||||
|
# Enable only CPU core 0 to keep current drain to a minimum
|
||||||
|
write /sys/devices/system/cpu/cpu0/online 1
|
||||||
|
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
|
||||||
|
write /sys/devices/system/cpu/cpu1/online 0
|
||||||
|
write /sys/devices/system/cpu/cpu2/online 0
|
||||||
|
write /sys/devices/system/cpu/cpu3/online 0
|
||||||
|
write /sys/devices/system/cpu/cpu4/online 0
|
||||||
|
write /sys/devices/system/cpu/cpu5/online 0
|
||||||
|
write /sys/devices/system/cpu/cpu6/online 0
|
||||||
|
write /sys/devices/system/cpu/cpu7/online 0
|
13
rootdir/etc/init.mmi.chipset.rc
Normal file
13
rootdir/etc/init.mmi.chipset.rc
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Charge only mode configuration
|
||||||
|
import /vendor/etc/init/hw/init.mmi.charge_only.rc
|
||||||
|
|
||||||
|
on early-init
|
||||||
|
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules exfat
|
||||||
|
|
||||||
|
on property:ro.vendor.build.motfactory=1
|
||||||
|
write /sys/class/power_supply/battery/device/factory_image_mode 1
|
||||||
|
wait /sys/class/power_supply/battery/device/force_charger_suspend
|
||||||
|
chown system system /sys/class/power_supply/battery/device/force_charger_suspend
|
||||||
|
|
||||||
|
on property:ro.build.type=userdebug
|
||||||
|
setprop persist.vendor.qg.log_level 1
|
5
rootdir/etc/init.mmi.debug.rc
Normal file
5
rootdir/etc/init.mmi.debug.rc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
on boot && property:ro.boot.adb_early=1
|
||||||
|
start vendor.mmi-usb-sh
|
||||||
|
|
||||||
|
on post-fs && property:ro.boot.force_aplogd_enable=1
|
||||||
|
setprop persist.vendor.log.aplogd.enable 1
|
125
rootdir/etc/init.mmi.overlay.rc
Normal file
125
rootdir/etc/init.mmi.overlay.rc
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
|
||||||
|
on early-init && property:ro.bootmode=mot-factory
|
||||||
|
insmod /vendor/lib/modules/moto_f_usbnet.ko
|
||||||
|
|
||||||
|
on mmi-priority
|
||||||
|
# Only high priority MMI DLKMs loaded here
|
||||||
|
# For instance, sensor_class referenced from several DLKMs
|
||||||
|
# and needs to load first. Touchscreen might need extra time
|
||||||
|
# to perform firmware update if necessary
|
||||||
|
setprop vendor.mmi_init.stage priority
|
||||||
|
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules tzlog_dump watchdog_cpu_ctx wl2864c.ko mmi_sys_temp
|
||||||
|
|
||||||
|
on post-fs
|
||||||
|
# "Tap to wake" gesture
|
||||||
|
chown root input /sys/class/sensors/dt-gesture/enable
|
||||||
|
chmod 0660 /sys/class/sensors/dt-gesture/enable
|
||||||
|
chown root input /sys/class/sensors/dt-gesture/poll_delay
|
||||||
|
chmod 0660 /sys/class/sensors/dt-gesture/poll_delay
|
||||||
|
|
||||||
|
on fs
|
||||||
|
# Majority of MMI DLKMs should be in this group
|
||||||
|
setprop vendor.mmi_init.stage common
|
||||||
|
insmod /vendor/lib/modules/sensors_class.ko
|
||||||
|
#zram wb
|
||||||
|
mount_all /vendor/etc/fstab.qcom.zram --early
|
||||||
|
exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules adapter_class mmi_relay touchscreen_mmi focaltech_v2_mmi regulator_vibrator_mmi leds-indicator-pwm audio_snd_soc_aw882xx aw9610x
|
||||||
|
|
||||||
|
on charger
|
||||||
|
insmod /vendor/lib/modules/cw2217b_fg_mmi.ko
|
||||||
|
insmod /vendor/lib/modules/sm5602_fg_mmi.ko
|
||||||
|
insmod /vendor/lib/modules/mmi_charger.ko
|
||||||
|
insmod /vendor/lib/modules/adapter_class.ko
|
||||||
|
insmod /vendor/lib/modules/mmi_discrete_charger_class.ko
|
||||||
|
insmod /vendor/lib/modules/mmi_discrete_charger.ko
|
||||||
|
insmod /vendor/lib/modules/sgm4154x_charger.ko
|
||||||
|
insmod /vendor/lib/modules/bq2589x_charger.ko
|
||||||
|
insmod /vendor/lib/modules/tcpc_class.ko
|
||||||
|
insmod /vendor/lib/modules/tcpc_sgm7220.ko
|
||||||
|
|
||||||
|
|
||||||
|
on post-fs-data
|
||||||
|
# Load DLKM that can afford being loaded later
|
||||||
|
setprop vendor.mmi_init.stage late
|
||||||
|
start vendor.mmi_modules
|
||||||
|
#wait_for_prop init.svc.vendor.mmi_modules stopped
|
||||||
|
setprop vendor.mmi_init.stage complete
|
||||||
|
|
||||||
|
on early-boot
|
||||||
|
# Goodix fingerprint
|
||||||
|
chown system system /dev/goodix_fp
|
||||||
|
chmod 0664 /dev/goodix_fp
|
||||||
|
chmod 0777 /proc/android_touch/debug
|
||||||
|
mkdir /data/vendor/gf_data 0770 system system
|
||||||
|
mkdir /mnt/vendor/persist/goodix 0770 system system
|
||||||
|
|
||||||
|
on boot
|
||||||
|
# Change ownership for capsensor
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch0/enable
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch0/poll_delay
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch1/enable
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch1/poll_delay
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch2/enable
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch2/poll_delay
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch3/enable
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch3/poll_delay
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch4/enable
|
||||||
|
chown root input /sys/class/sensors/Moto\ CapSense\ Ch4/poll_delay
|
||||||
|
chown system system /sys/class/capsense/reset
|
||||||
|
chown system system /sys/class/capsense/int_state
|
||||||
|
|
||||||
|
# change permission for adaptive charging
|
||||||
|
chown system system /sys/module/qpnp_adaptive_charge/parameters/upper_limit
|
||||||
|
chown system system /sys/module/qpnp_adaptive_charge/parameters/lower_limit
|
||||||
|
# change ownership of display early suspend node
|
||||||
|
chown root system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/dsi_display_early_power
|
||||||
|
chmod 0660 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/dsi_display_early_power
|
||||||
|
|
||||||
|
#on post-fs-data
|
||||||
|
# mkdir /data/vendor/focaltech 0770 system system
|
||||||
|
#service vendor.mmi_modules /vendor/bin/init.mmi.modules.sh
|
||||||
|
# user root
|
||||||
|
# oneshot
|
||||||
|
# disabled
|
||||||
|
|
||||||
|
service capsense_reset /system/vendor/bin/capsense_reset
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system input
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1
|
||||||
|
start capsense_reset
|
||||||
|
|
||||||
|
service vendor.motpsd /vendor/bin/motpsd
|
||||||
|
class late_start
|
||||||
|
user root
|
||||||
|
|
||||||
|
service vendor.vl53l1_daemon /vendor/bin/vl53l1_daemon
|
||||||
|
class late_start
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
socket vl53l1_daemon stream 660 root system
|
||||||
|
|
||||||
|
service vendor.mmi-laser-sh /vendor/bin/init.mmi.laser.sh
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
# Turn on led to indicate device on in factory mode
|
||||||
|
on property:ro.bootmode=mot-factory
|
||||||
|
write /sys/class/leds/charging/brightness 255
|
||||||
|
|
||||||
|
# on property:ro.build.type=userdebug
|
||||||
|
# start vendor.touchRec
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1
|
||||||
|
write /sys/devices/platform/soc/soc:mmi,charger/state_sync 1
|
||||||
|
|
||||||
|
on post-fs && property:ro.vendor.build.motfactory=1
|
||||||
|
write /sys/devices/platform/soc/soc:mmi,charger/state_sync 1
|
||||||
|
wait /sys/class/power_supply/battery/device/factory_image_mode
|
||||||
|
write /sys/class/power_supply/battery/device/factory_image_mode 1
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1 && property:ro.build.type=userdebug
|
||||||
|
stop llkd-${ro.debuggable:-0}
|
653
rootdir/etc/init.mmi.rc
Normal file
653
rootdir/etc/init.mmi.rc
Normal file
|
@ -0,0 +1,653 @@
|
||||||
|
# Chipset-specific file
|
||||||
|
import /vendor/etc/init/hw/init.mmi.chipset.rc
|
||||||
|
|
||||||
|
# Target-specific file
|
||||||
|
import /vendor/etc/init/hw/init.mmi.overlay.rc
|
||||||
|
|
||||||
|
# Moto USB configuration
|
||||||
|
# import /vendor/etc/init/hw/init.mmi.usb.rc
|
||||||
|
# Moto debugging
|
||||||
|
import /vendor/etc/init/hw/init.mmi.debug.rc
|
||||||
|
|
||||||
|
#import /vendor/etc/init/hw/init.oem.rc
|
||||||
|
#import /vendor/etc/init/hw/init.mmi.common.rc
|
||||||
|
#import /vendor/etc/init/hw/init.mmi.nonab.rc
|
||||||
|
|
||||||
|
#Moto wlan configuration
|
||||||
|
#import /vendor/etc/init/hw/init.mmi.wlan.rc
|
||||||
|
|
||||||
|
# Moto verified boot extension
|
||||||
|
#import /vendor/etc/init/hw/init.mmi.hab.rc
|
||||||
|
|
||||||
|
# Test commands
|
||||||
|
#import /vendor/etc/init/hw/init.mmi.tcmd.rc
|
||||||
|
|
||||||
|
# Carrier specific script
|
||||||
|
import /vendor/etc/init/carrier/init.${ro.boot.carrier}.rc
|
||||||
|
import /vendor/etc/init/carrier/init.default.rc
|
||||||
|
|
||||||
|
on early-boot
|
||||||
|
write /sys/module/subsystem_restart/parameters/disable_restart_work 0x0
|
||||||
|
|
||||||
|
on init
|
||||||
|
chown system log /sys/fs/pstore/console-ramoops-0
|
||||||
|
chmod 0440 /sys/fs/pstore/console-ramoops-0
|
||||||
|
chown system log /sys/fs/pstore/annotate-ramoops-0
|
||||||
|
chmod 0640 /sys/fs/pstore/annotate-ramoops-0
|
||||||
|
chown system log /sys/fs/pstore/dmesg-ramoops-0
|
||||||
|
chmod 0640 /sys/fs/pstore/dmesg-ramoops-0
|
||||||
|
chown system log /proc/driver/mmi_annotate
|
||||||
|
chmod 0640 /proc/driver/mmi_annotate
|
||||||
|
|
||||||
|
on early-init && property:ro.bootmode=mot-factory
|
||||||
|
setprop ro.vendor.mot.factory true
|
||||||
|
|
||||||
|
on early-init && property:ro.vendor.build.motfactory=1
|
||||||
|
setprop ro.vendor.mot.factory true
|
||||||
|
|
||||||
|
on early-init
|
||||||
|
# Need to wait for platform path for UTAGs driver to succeed
|
||||||
|
wait /dev/block/platform/soc/${ro.boot.bootdevice}/by-name/hw
|
||||||
|
|
||||||
|
# initialize ro.vendor.mot.factory with default value when it is not set
|
||||||
|
setprop ro.vendor.mot.factory false
|
||||||
|
|
||||||
|
# If utags driver is DLKM, script will load it,
|
||||||
|
# otherwise it has to be already loaded
|
||||||
|
exec_start vendor.oem-hw-sh
|
||||||
|
|
||||||
|
# Map oem properties, this must follow
|
||||||
|
# execution of vendor.oem-hw-sh to set
|
||||||
|
# required properties.
|
||||||
|
setprop ro.carrier ${ro.boot.carrier}
|
||||||
|
setprop ro.sf.lcd_density ${ro.boot.lcd_density}
|
||||||
|
setprop ro.vendor.fsg-id ${ro.boot.fsg-id}
|
||||||
|
setprop ro.vendor.hw.device ${ro.boot.device}
|
||||||
|
setprop ro.vendor.hw.hwrev ${ro.boot.hwrev}
|
||||||
|
setprop ro.vendor.hw.modelno ${ro.boot.modelno}
|
||||||
|
setprop ro.vendor.hw.revision ${ro.boot.revision}
|
||||||
|
setprop ro.vendor.hw.nav_keys ${ro.boot.nav_keys}
|
||||||
|
setprop ro.product.vendor.device ${ro.vendor.product.device}
|
||||||
|
setprop ro.product.vendor.name ${ro.vendor.product.name}
|
||||||
|
setprop ro.product.vendor.model ${ro.vendor.product.model}
|
||||||
|
setprop ro.vendor.boot.cid ${ro.boot.cid}
|
||||||
|
setprop ro.vendor.boot.powerup_reason ${ro.boot.powerup_reason}
|
||||||
|
setprop ro.vendor.boot.bl_state ${ro.boot.bl_state}
|
||||||
|
setprop ro.vendor.boot.serialno ${ro.boot.serialno}
|
||||||
|
setprop ro.vendor.zygote ${ro.zygote}
|
||||||
|
|
||||||
|
# Make sure ro.boot.product.hardware.sku is set before hwservicemanager startup.
|
||||||
|
setprop ro.boot.product.hardware.sku ${ro.vendor.product.hardware.sku.variant}
|
||||||
|
|
||||||
|
# Trigger priority stage of MMI init
|
||||||
|
trigger mmi-priority
|
||||||
|
|
||||||
|
# Log kernel wake-up source
|
||||||
|
write /sys/module/msm_show_resume_irq/parameters/debug_mask 1
|
||||||
|
|
||||||
|
on fs
|
||||||
|
insmod /vendor/lib/modules/cci_intf.ko
|
||||||
|
mkdir /mnt/vendor/persist/fps 0770 system system
|
||||||
|
exec_start vendor.ident-fps-sh
|
||||||
|
|
||||||
|
on fs && property:ro.vendor.hw.modem_version=*
|
||||||
|
# Super modem detection
|
||||||
|
exec_start vendor.oem-super-image-detector-sh
|
||||||
|
|
||||||
|
on property:ro.vendor.hw.super_image_failure=yes
|
||||||
|
setprop sys.powerctl reboot,recovery
|
||||||
|
|
||||||
|
on post-fs && property:ro.vendor.hw.modem_super_image=yes
|
||||||
|
umount /vendor/firmware_mnt
|
||||||
|
mount ext4 /dev/block/bootdevice/by-name/modem${ro.boot.slot_suffix} /vendor/super_modem ro nosuid nodev context=u:object_r:firmware_file:s0
|
||||||
|
mount ext4 loop@/vendor/super_modem/${ro.vendor.hw.modem_mount_file} /vendor/firmware_mnt ro nosuid nodev context=u:object_r:firmware_file:s0
|
||||||
|
|
||||||
|
on post-fs && property:ro.vendor.hw.fsg_super_image=yes
|
||||||
|
umount /vendor/fsg
|
||||||
|
mount ext4 /dev/block/bootdevice/by-name/fsg${ro.boot.slot_suffix} /vendor/super_fsg ro nosuid nodev context=u:object_r:fsg_file:s0
|
||||||
|
mount ext4 loop@/vendor/super_fsg/${ro.vendor.hw.fsg_mount_file} /vendor/fsg ro nosuid nodev context=u:object_r:fsg_file:s0
|
||||||
|
|
||||||
|
on post-fs
|
||||||
|
mkdir /mnt/vendor/persist/camera 0755 vendor_tcmd vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/camera/dualcal 0775 camera vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/camera/focus 0775 camera vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/camera/ledcal 0775 camera vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/camera/mot_ledcal 0775 camera camera
|
||||||
|
mkdir /mnt/vendor/persist/camera/mot_gyrocal 0775 camera camera
|
||||||
|
mkdir /mnt/vendor/persist/batt_health 0775 vendor_pwric vendor_pwric
|
||||||
|
mkdir /mnt/vendor/persist/mdm 0770 radio radio
|
||||||
|
mkdir /mnt/vendor/persist/factory 0755 vendor_tcmd vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/factory/audio 0755 vendor_tcmd system
|
||||||
|
mkdir /mnt/vendor/persist/factory/wlan 0755 vendor_tcmd vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/factory/regulatory 0755 vendor_tcmd system
|
||||||
|
mkdir /mnt/vendor/persist/public 0755 vendor_tcmd vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/public/att_dm 0775 radio vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/public/hiddenmenu 0775 radio vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/public/hiddenmenu/data 0775 system vendor_tcmd
|
||||||
|
mkdir /persist/public/locale 0700 system system
|
||||||
|
mkdir /persist/public/omadm 0700 radio radio
|
||||||
|
mkdir /persist/public/svcs 0770 system system
|
||||||
|
mkdir /mnt/vendor/persist/wifi 0755 vendor_tcmd vendor_tcmd
|
||||||
|
mkdir /mnt/vendor/persist/bt 0755 vendor_tcmd bluetooth
|
||||||
|
mkdir /persist/public/usc_dm 0775 radio radio
|
||||||
|
mkdir /mnt/vendor/persist/rfs/msm/mpss/mot_rfs 0771 vendor_rfs system
|
||||||
|
mkdir /mnt/vendor/persist/rfs/mdm/mpss/mot_rfs 0771 vendor_rfs system
|
||||||
|
|
||||||
|
# This dir is used to store any OMA(both DM and CP) files in persist partition
|
||||||
|
# Any app with radio UID or vendor_tcmd GID can read/write/execute files in this dir.
|
||||||
|
mkdir /mnt/vendor/persist/public/oma 0775 radio vendor_tcmd
|
||||||
|
|
||||||
|
chown vendor_tcmd vendor_tcmd /mnt/vendor/persist/factory/fti
|
||||||
|
chmod 0664 /mnt/vendor/persist/factory/fti
|
||||||
|
chown vendor_tcmd vendor_tcmd /mnt/vendor/persist/factory/byte
|
||||||
|
chmod 0660 /mnt/vendor/persist/factory/byte
|
||||||
|
chmod 0660 /mnt/vendor/persist/wifi/wlan_mac.bin
|
||||||
|
chown vendor_tcmd vendor_tcmd /mnt/vendor/persist/bt/bt_bdaddr
|
||||||
|
chmod 0664 /mnt/vendor/persist/bt/bt_bdaddr
|
||||||
|
|
||||||
|
# Set life_calls and life_timer file permissions
|
||||||
|
chown radio vendor_tcmd /mnt/vendor/persist/public/hiddenmenu/life_calls
|
||||||
|
chmod 0775 /mnt/vendor/persist/public/hiddenmenu/life_calls
|
||||||
|
chown radio vendor_tcmd /mnt/vendor/persist/public/hiddenmenu/life_timer
|
||||||
|
chmod 0775 /mnt/vendor/persist/public/hiddenmenu/life_timer
|
||||||
|
|
||||||
|
chmod 0711 /mnt/vendor/persist/rfs
|
||||||
|
chmod 0711 /mnt/vendor/persist/rfs/msm
|
||||||
|
chmod 0711 /mnt/vendor/persist/rfs/msm/mpss
|
||||||
|
chmod 0771 /mnt/vendor/persist/rfs/msm/mpss/mot_rfs
|
||||||
|
chmod 0711 /mnt/vendor/persist/rfs/mdm
|
||||||
|
chmod 0711 /mnt/vendor/persist/rfs/mdm/mpss
|
||||||
|
chmod 0771 /mnt/vendor/persist/rfs/mdm/mpss/mot_rfs
|
||||||
|
|
||||||
|
# Set dm-verity property for system partition
|
||||||
|
verity_update_state
|
||||||
|
|
||||||
|
# Set capsensor calibration sysfs for MDMCTBK
|
||||||
|
chown radio radio /sys/class/capsense/calibrate
|
||||||
|
chmod 0660 /sys/class/capsense/calibrate
|
||||||
|
|
||||||
|
on post-fs-data
|
||||||
|
setprop ro.vendor.build.fingerprint ${ro.product.vendor.brand}/${ro.product.vendor.name}/${ro.product.vendor.device}:${ro.vendor.build.version.release}/${ro.vendor.build.id}/${ro.vendor.build.version.incremental}:${ro.vendor.build.type}/${ro.vendor.build.tags}
|
||||||
|
|
||||||
|
# Setup folders for security
|
||||||
|
mkdir /mnt/vendor/persist/security 02770 drmrpc drmrpc
|
||||||
|
mkdir /data/vendor/dbvc 0750 vendor_tcmd shell
|
||||||
|
chown drmrpc vendor_tcmd /mnt/vendor/persist/security
|
||||||
|
|
||||||
|
# Setup folder for Pre-Activation Kill Switch app (PAKS)
|
||||||
|
mkdir /mnt/vendor/persist/paks 02770 vendor_tcmd vendor_tcmd
|
||||||
|
|
||||||
|
# Create directory used by power_supply_logger
|
||||||
|
mkdir /data/vendor/power_supply_logger 0750 vendor_pwric log
|
||||||
|
# Create directory power_supply_logger used by memtest and batt_health
|
||||||
|
mkdir /data/vendor_de/power_supply_logger 0770 root log
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/cycle_count
|
||||||
|
chmod 0664 /sys/class/power_supply/battery/cycle_count
|
||||||
|
chmod 0664 /sys/class/power_supply/battery/charge_control_limit
|
||||||
|
|
||||||
|
# Permissions for Factory Test of Charging Paths
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_auto_enable
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_ibatt
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_itrick
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_iusb
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_idc
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_usb_suspend
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_fail_clear
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_usb_otg_ctl
|
||||||
|
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/mmi_battery/device/force_chg_auto_enable
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/mmi_battery/device/force_chg_ibatt
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/mmi_battery/device/force_chg_itrick
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/mmi_battery/device/force_chg_iusb
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/mmi_battery/device/force_chg_idc
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/mmi_battery/device/force_chg_usb_suspend
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/mmi_battery/device/force_chg_fail_clear
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/mmi_battery/device/force_chg_usb_otg_ctl
|
||||||
|
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/wireless/device/chip_id
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/wireless/current_now
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/wireless/voltage_now
|
||||||
|
chown vendor_pwric vendor_pwric /sys/class/power_supply/wireless/voltage_max
|
||||||
|
chmod 0664 /sys/class/power_supply/wireless/voltage_max
|
||||||
|
chown vendor_pwric vendor_pwric /sys/kernel/debug/pmic-votable/CHG_DISABLE/force_val
|
||||||
|
chmod 0664 /sys/kernel/debug/pmic-votable/CHG_DISABLE/force_val
|
||||||
|
chown vendor_pwric vendor_pwric /sys/kernel/debug/pmic-votable/CHG_DISABLE/force_active
|
||||||
|
chmod 0664 /sys/kernel/debug/pmic-votable/CHG_DISABLE/force_active
|
||||||
|
chown vendor_pwric vendor_pwric /sys/kernel/debug/regulator/smb5-vconn/enable
|
||||||
|
chmod 0664 /sys/kernel/debug/regulator/smb5-vconn/enable
|
||||||
|
|
||||||
|
chown root vendor_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_rechrg_start_soc
|
||||||
|
chown root vendor_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_rechrg_stop_soc
|
||||||
|
chown root vendor_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_attach_start_soc
|
||||||
|
chown root vendor_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_attach_stop_soc
|
||||||
|
chown root vendor_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_low_start_soc
|
||||||
|
chown root vendor_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_low_stop_soc
|
||||||
|
chown root vendor_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_on_sw
|
||||||
|
|
||||||
|
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_rechrg_start_soc
|
||||||
|
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_rechrg_stop_soc
|
||||||
|
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_attach_start_soc
|
||||||
|
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_attach_stop_soc
|
||||||
|
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_low_start_soc
|
||||||
|
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_low_stop_soc
|
||||||
|
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_on_sw
|
||||||
|
|
||||||
|
chown root vendor_mod /sys/class/power_supply/usb/usb_priority
|
||||||
|
chmod 0660 /sys/class/power_supply/usb/usb_priority
|
||||||
|
chown root vendor_mod /sys/module/dwc3_msm/parameters/usb_priority
|
||||||
|
chmod 0660 /sys/module/dwc3_msm/parameters/usb_priority
|
||||||
|
chown root vendor_mod /sys/module/usbnet/parameters/force_on
|
||||||
|
chmod 0666 /sys/module/usbnet/parameters/force_on
|
||||||
|
|
||||||
|
# Setup folder for native to transfer data to NativeDropBoxAgent
|
||||||
|
mkdir /data/vendor/dropbox-add 0730 log diag
|
||||||
|
|
||||||
|
# Create panic dump dir.
|
||||||
|
mkdir /data/vendor/dontpanic 0750 root log
|
||||||
|
|
||||||
|
# Create directory for cutback
|
||||||
|
mkdir /data/vendor/misc/cutback 0770 radio wifi
|
||||||
|
|
||||||
|
# Create bug2go folder
|
||||||
|
mkdir /data/vendor/bug2go 0770 log log
|
||||||
|
|
||||||
|
# Setup folder for aplogd
|
||||||
|
mkdir /data/vendor/aplogd 0770 log log
|
||||||
|
|
||||||
|
# Create directory used by chargeonlymode
|
||||||
|
mkdir /data/vendor/chargeonly 0750 root log
|
||||||
|
|
||||||
|
# Subsystem RAM-dumps
|
||||||
|
mkdir /data/vendor/ss-ram-dumps 0750 system log
|
||||||
|
mkdir /data/vendor/ss-ram-dumps/bp-dumps 0750 system log
|
||||||
|
mkdir /data/vendor/ss-ram-dumps/riva-dumps 0750 system log
|
||||||
|
|
||||||
|
# folder for Blueooth ramdump
|
||||||
|
mkdir /data/vendor/bt-ram-dumps 0750 bluetooth log
|
||||||
|
|
||||||
|
# folder for ssrdumps
|
||||||
|
mkdir /data/vendor/ssrdump 0775 root system
|
||||||
|
|
||||||
|
#Folder for hardware properties
|
||||||
|
mkdir /data/vendor/hardware_revisions 0755 system system
|
||||||
|
|
||||||
|
# Imager tuning data for camera subsystem
|
||||||
|
mkdir /data/vendor/misc/imager 0771 camera camera
|
||||||
|
|
||||||
|
# NFC vendor data
|
||||||
|
mkdir /data/vendor/nfc 0770 nfc nfc
|
||||||
|
|
||||||
|
# Required by FingerPrint Cards (FPC) via init so we don't need to give qseecomd or fingerprintd permissions to create them
|
||||||
|
mkdir /data/vendor/fpc 0700 system system
|
||||||
|
mkdir /data/vendor/.fps 0770 system vendor_fingerp
|
||||||
|
|
||||||
|
# Required by touchRec for write the touch data
|
||||||
|
mkdir /data/vendor/touchrec 0770 input input
|
||||||
|
chown input input /data/vendor/touchrec/bootindex
|
||||||
|
chown input input /data/vendor/touchrec/lastbootuuid
|
||||||
|
chown input input /data/vendor/touchrec/touch_data.txt
|
||||||
|
chmod 0664 /data/vendor/touchrec/touch_data.txt
|
||||||
|
|
||||||
|
on boot
|
||||||
|
# restore default console_loglevel to KERN_DEBUG
|
||||||
|
# restore default_message_loglevel to KERN_WARNING
|
||||||
|
write /proc/sys/kernel/printk "7 4 1 7"
|
||||||
|
|
||||||
|
# MOTO, NJH348, IKHALFMWK-1864, change system max tcp buffer sizes based on RAT changes
|
||||||
|
# Define system changable TCP buffer max values
|
||||||
|
chown system system /proc/sys/net/core/rmem_max
|
||||||
|
chown system system /proc/sys/net/core/wmem_max
|
||||||
|
|
||||||
|
# Change ownership and permission for leds backlight
|
||||||
|
chmod 0664 /sys/class/leds/lcd-backlight/brightness
|
||||||
|
chown system system /sys/class/leds/charging/brightness
|
||||||
|
chmod 0664 /sys/class/leds/charging/brightness
|
||||||
|
|
||||||
|
# change permission of red leds
|
||||||
|
chown system system /sys/class/leds/red/brightness
|
||||||
|
chmod 0664 /sys/class/leds/red/brightness
|
||||||
|
|
||||||
|
# Change ownership and permission for vibrator
|
||||||
|
chown system system /sys/class/timed_output/vibrator/enable
|
||||||
|
chmod 0660 /sys/class/timed_output/vibrator/enable
|
||||||
|
chown system system /sys/class/leds/vibrator/state
|
||||||
|
chmod 0660 /sys/class/leds/vibrator/state
|
||||||
|
chown system system /sys/class/leds/vibrator/activate
|
||||||
|
chmod 0660 /sys/class/leds/vibrator/activate
|
||||||
|
chown system system /sys/class/leds/vibrator/duration
|
||||||
|
chmod 0660 /sys/class/leds/vibrator/duration
|
||||||
|
chown system system /sys/class/leds/vibrator/seq
|
||||||
|
chmod 0660 /sys/class/leds/vibrator/seq
|
||||||
|
chown system system /sys/class/leds/vibrator/extra
|
||||||
|
chmod 0660 /sys/class/leds/vibrator/extra
|
||||||
|
chown root vendor_mod /sys/bus/i2c/devices/2-005a/reduce
|
||||||
|
|
||||||
|
# Change ownership of aov related sysfs entries
|
||||||
|
chown audio audio /sys/kernel/aov/trigger
|
||||||
|
chown audio audio /sys/kernel/aov/register
|
||||||
|
chown audio audio /sys/kernel/aov/event
|
||||||
|
|
||||||
|
# Quiet binder logs
|
||||||
|
write /sys/module/binder/parameters/debug_mask 0x5
|
||||||
|
|
||||||
|
# Clear cooldown state
|
||||||
|
mkdir /mnt/vendor/persist/chargeonly 0770 system system
|
||||||
|
write /mnt/vendor/persist/chargeonly/cooldown n
|
||||||
|
chown system system /mnt/vendor/persist/chargeonly/cooldown
|
||||||
|
chmod 0660 /mnt/vendor/persist/chargeonly/cooldown
|
||||||
|
|
||||||
|
# Change owner ship of l5 laser calibration
|
||||||
|
chown camera vendor_tcmd /mnt/vendor/persist/camera/focus/offset_cal
|
||||||
|
chmod 0660 /mnt/vendor/persist/camera/focus/offset_cal
|
||||||
|
|
||||||
|
# change ownership of capsensor related sysfs node
|
||||||
|
chown system system /sys/class/capsense/reset
|
||||||
|
chown system system /sys/class/capsense/int_state
|
||||||
|
|
||||||
|
#service vendor.mmi-block-perm /vendor/bin/init.mmi.block_perm.sh
|
||||||
|
# class main
|
||||||
|
# user root
|
||||||
|
# oneshot
|
||||||
|
|
||||||
|
#service vendor.pstore_annotate /vendor/bin/pstore_annotate.sh build
|
||||||
|
# class main
|
||||||
|
# user system
|
||||||
|
# group log
|
||||||
|
# oneshot
|
||||||
|
|
||||||
|
#service vendor.apanic_copy /vendor/bin/apanic_copy.sh
|
||||||
|
# class late_start
|
||||||
|
# group log
|
||||||
|
# oneshot
|
||||||
|
# disabled
|
||||||
|
|
||||||
|
#service vendor.bl_logs_copy /vendor/bin/apanic_copy.sh -i
|
||||||
|
# class late_start
|
||||||
|
# group log
|
||||||
|
# oneshot
|
||||||
|
# disabled
|
||||||
|
|
||||||
|
on charger
|
||||||
|
trigger early-fs
|
||||||
|
trigger fs
|
||||||
|
trigger post-fs
|
||||||
|
trigger late-fs
|
||||||
|
trigger post-fs-data
|
||||||
|
trigger moto-charger
|
||||||
|
class_stop main
|
||||||
|
class_stop late_start
|
||||||
|
|
||||||
|
#service vendor.apanic_annotate /vendor/bin/apanic_save.sh build
|
||||||
|
# class late_start
|
||||||
|
# group log
|
||||||
|
# oneshot
|
||||||
|
# disabled
|
||||||
|
|
||||||
|
service vendor.batt_health /vendor/bin/batt_health
|
||||||
|
class late_start
|
||||||
|
user vendor_pwric
|
||||||
|
group vendor_pwric cache net_admin log
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1
|
||||||
|
start vendor.batt_health
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1 && property:ro.vendor.zram.product_swapon=""
|
||||||
|
write /proc/sys/vm/page-cluster 0
|
||||||
|
swapon_all /vendor/etc/fstab.qcom
|
||||||
|
write /proc/sys/vm/swappiness 100
|
||||||
|
setprop sys.sysctl.swappiness 100
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1 && property:ro.vendor.bootreason=coldboot
|
||||||
|
start vendor.apanic_copy
|
||||||
|
|
||||||
|
on property:ro.vendor.bootreason=watchdog
|
||||||
|
stop surfaceflinger
|
||||||
|
stop zygote
|
||||||
|
stop zygote_secondary
|
||||||
|
stop sensors
|
||||||
|
start vendor.apanic_annotate
|
||||||
|
|
||||||
|
on property:ro.vendor.bootreason=pmic_watchdog
|
||||||
|
stop surfaceflinger
|
||||||
|
stop zygote
|
||||||
|
stop zygote_secondary
|
||||||
|
stop sensors
|
||||||
|
start vendor.apanic_annotate
|
||||||
|
|
||||||
|
on property:ro.vendor.bootreason=kernel_panic
|
||||||
|
stop surfaceflinger
|
||||||
|
stop zygote
|
||||||
|
stop zygote_secondary
|
||||||
|
stop sensors
|
||||||
|
start vendor.apanic_annotate
|
||||||
|
|
||||||
|
on property:ro.vendor.bootreason=hw_warmreset
|
||||||
|
stop surfaceflinger
|
||||||
|
stop zygote
|
||||||
|
stop zygote_secondary
|
||||||
|
stop sensors
|
||||||
|
start vendor.apanic_annotate
|
||||||
|
|
||||||
|
on property:persist.vendor.log.aplogd.enable=1
|
||||||
|
start vendor.aplogd
|
||||||
|
|
||||||
|
on property:persist.vendor.log.aplogd.enable=0
|
||||||
|
stop vendor.aplogd
|
||||||
|
|
||||||
|
service vendor.aplogd /vendor/bin/aplogd
|
||||||
|
class late_start
|
||||||
|
#user log
|
||||||
|
#group log system sdcard_rw sdcard_r media_rw mount
|
||||||
|
# The user and group definitions above are intentionally disabled and left
|
||||||
|
# only as documentation. It actually starts as root and immediately drops
|
||||||
|
# to log plus those groups after preserving CAP_SYS_ADMIN, which is required
|
||||||
|
# for kernel logging.
|
||||||
|
disabled
|
||||||
|
|
||||||
|
# from P onwards aplogd cannot read vold.post_fs_data_done so a new property
|
||||||
|
# shall be used to allow aplogd checking if FBE has finished /data decryption
|
||||||
|
on property:vold.post_fs_data_done=*
|
||||||
|
setprop vendor.vold.post_fs_data_done ${vold.post_fs_data_done}
|
||||||
|
|
||||||
|
service vendor.mmi-boot-sh /vendor/bin/init.mmi.boot.sh
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
#service vendor.mmi-shutdown-sh /vendor/bin/init.mmi.shutdown.sh
|
||||||
|
# class core
|
||||||
|
## oneshot
|
||||||
|
# disabled
|
||||||
|
|
||||||
|
# translate to qcom property name in order to keep the consistent with
|
||||||
|
# our legacy property
|
||||||
|
on property:persist.vendor.qc.sub.rdump.on=*
|
||||||
|
setprop persist.vendor.ssr.enable_ramdumps ${persist.vendor.qc.sub.rdump.on}
|
||||||
|
|
||||||
|
# translate MMI property in order to keep the consistent with QCOM
|
||||||
|
on property:ro.vendor.hw.dualsim=true
|
||||||
|
setprop persist.radio.multisim.config dsds
|
||||||
|
|
||||||
|
on property:persist.vendor.qc.sub.rdump.on=*
|
||||||
|
setprop persist.vendor.ssr.enable_ramdumps ${persist.vendor.qc.sub.rdump.on}
|
||||||
|
|
||||||
|
on property:ro.vendor.hw.dualsim=false
|
||||||
|
setprop persist.radio.multisim.config ""
|
||||||
|
|
||||||
|
on property:sys.sysctl.swappiness=*
|
||||||
|
write /proc/sys/vm/swappiness ${sys.sysctl.swappiness}
|
||||||
|
|
||||||
|
service vendor.mbm_spy /vendor/bin/mbm_spy
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1
|
||||||
|
start vendor.mbm_spy
|
||||||
|
|
||||||
|
service vendor.hw_revs /vendor/bin/hardware_revisions.sh
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.mmi-touch-sh /vendor/bin/init.mmi.touch.sh
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.touchUpg /vendor/bin/touchUpg
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.oem-hw-sh /vendor/bin/init.oem.hw.sh
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.oem-super-image-detector-sh /vendor/bin/init.oem.hw.sh -M
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.ident-fps-sh /vendor/bin/init.oem.fingerprint.sh
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
group drmrpc system
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.hal-fps-sh /vendor/bin/init.oem.fingerprint2.sh
|
||||||
|
class late_start
|
||||||
|
user root
|
||||||
|
group system
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service fpc_ident /vendor/bin/hw/fpc_ident
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service egis_ident /vendor/bin/hw/egis_ident
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.touch-dead-sh /vendor/bin/init.oem.hw.sh -f
|
||||||
|
class main
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.touch-ready-sh /vendor/bin/init.oem.hw.sh -r
|
||||||
|
class main
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.oem-hw-config-sh /vendor/bin/init.oem.hw.sh -p
|
||||||
|
class main
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:vendor.hw.touch.status="dead"
|
||||||
|
start vendor.touch-dead-sh
|
||||||
|
|
||||||
|
on property:vendor.hw.touch.status="ready"
|
||||||
|
start vendor.touch-ready-sh
|
||||||
|
|
||||||
|
service vendor.charge_only_mode /vendor/bin/charge_only_mode
|
||||||
|
user root
|
||||||
|
group graphics system input
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.thermal-com /vendor/bin/thermal-engine --minimode
|
||||||
|
class main
|
||||||
|
user root
|
||||||
|
group root system oem_2907
|
||||||
|
socket thermal-send-client stream 0666 system oem_2907
|
||||||
|
socket thermal-recv-client stream 0660 system oem_2907
|
||||||
|
socket thermal-recv-passive-client stream 0666 system oem_2907
|
||||||
|
socket thermal-send-rule stream 0660 system oem_2907
|
||||||
|
disabled
|
||||||
|
|
||||||
|
# bugreport is triggered by holding down volume down, volume up and power
|
||||||
|
service bugreport /system/bin/dumpstate -d -p -B -z \
|
||||||
|
-o /data/user_de/0/com.android.shell/files/bugreports/bugreport
|
||||||
|
class main
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
keycodes 114 115 116
|
||||||
|
|
||||||
|
# touchRec
|
||||||
|
service vendor.touchRec /vendor/bin/touchRec
|
||||||
|
class late_start
|
||||||
|
user input
|
||||||
|
group input
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:vendor.wifi.tethering=false
|
||||||
|
write /sys/module/wlan/parameters/sar_mhs disabled
|
||||||
|
|
||||||
|
on property:vendor.wifi.tethering=true
|
||||||
|
write /sys/module/wlan/parameters/sar_mhs enabled
|
||||||
|
|
||||||
|
# Override the AOSP sensor HAL service definition
|
||||||
|
# from hardware/interfaces/sensors/2.0/multihal
|
||||||
|
# to add input and uhid group access
|
||||||
|
service vendor.sensors-hal-2-0-multihal /vendor/bin/hw/android.hardware.sensors@2.0-service.multihal
|
||||||
|
class hal
|
||||||
|
user system
|
||||||
|
group system wakelock context_hub input uhid
|
||||||
|
writepid /dev/cpuset/system-background/tasks
|
||||||
|
capabilities BLOCK_SUSPEND
|
||||||
|
rlimit rtprio 10 10
|
||||||
|
|
||||||
|
# from hardware/interfaces/sensors/2.1/multihal
|
||||||
|
# to add input and uhid group access
|
||||||
|
service vendor.sensors-hal-2-1-multihal /vendor/bin/hw/android.hardware.sensors@2.1-service.multihal
|
||||||
|
class hal
|
||||||
|
user system
|
||||||
|
group system wakelock context_hub input uhid
|
||||||
|
writepid /dev/cpuset/system-background/tasks
|
||||||
|
capabilities BLOCK_SUSPEND
|
||||||
|
rlimit rtprio 10 10
|
||||||
|
|
||||||
|
#Override fwpath string when wpa_supplicant server was killed
|
||||||
|
on property:vendor.wifi.station=true
|
||||||
|
write /sys/module/wlan/parameters/sar_sta enabled
|
||||||
|
|
||||||
|
on property:vendor.wifi.station=false
|
||||||
|
write /sys/module/wlan/parameters/sar_sta disabled
|
||||||
|
|
||||||
|
on shutdown
|
||||||
|
exec_start vendor.mmi-shutdown-sh
|
||||||
|
|
||||||
|
on property:persist.sys.locale=*
|
||||||
|
mkdir /mnt/vendor/persist/chargeonly 0770 system system
|
||||||
|
write /mnt/vendor/persist/chargeonly/locale ${persist.sys.locale}
|
||||||
|
chown system system /mnt/vendor/persist/chargeonly/locale
|
||||||
|
chmod 0660 /mnt/vendor/persist/chargeonly/locale
|
||||||
|
|
||||||
|
# IKSWQ-149109: Force shutter tone on Japan softbank carrier
|
||||||
|
on property:ro.carrier=softbank
|
||||||
|
setprop audio.camerasound.force true
|
||||||
|
|
||||||
|
on property:ro.sys.force_max_chrg_temp=*
|
||||||
|
write /sys/class/power_supply/battery/device/force_max_chrg_temp ${ro.sys.force_max_chrg_temp}
|
||||||
|
|
||||||
|
on property:ro.sys.force_demo_mode=*
|
||||||
|
write /sys/class/power_supply/battery/device/force_demo_mode ${ro.sys.force_demo_mode}
|
258
rootdir/etc/init.qcom.factory.rc
Normal file
258
rootdir/etc/init.qcom.factory.rc
Normal file
|
@ -0,0 +1,258 @@
|
||||||
|
#
|
||||||
|
# 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_ext/bin/mmi
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.mmid /vendor/bin/mmid
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service mmi_diag /system_ext/bin/mmi_diag
|
||||||
|
class main
|
||||||
|
user root
|
||||||
|
group root oem_2901
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:vendor.sys.boot_mode=ffbm
|
||||||
|
write ${persist.vendor.mmi.misc_dev_path} "ffbm-01"
|
||||||
|
|
||||||
|
on property:vendor.sys.boot_mode=qmmi
|
||||||
|
write ${persist.vendor.mmi.misc_dev_path} "qmmi"
|
||||||
|
|
||||||
|
on property:vendor.sys.boot_mode=normal
|
||||||
|
write ${persist.vendor.mmi.misc_dev_path} "normal"
|
||||||
|
|
||||||
|
# Creating a scratch storage on /data for factory testing.
|
||||||
|
on factory-fs && property:ro.bootmode=ffbm-00
|
||||||
|
mount tmpfs tmpfs /data
|
||||||
|
|
||||||
|
on factory-fs && property:ro.bootmode=ffbm-01
|
||||||
|
mount tmpfs tmpfs /data
|
||||||
|
|
||||||
|
# aligned the usb port with system standard, otherwise if only diag be added
|
||||||
|
# Then in QMMI mode, the whole Andoid be booted, but due to the ro.bootmode is
|
||||||
|
# not normal/unknow, then when it apply the default funcs, it will turn to MTP
|
||||||
|
# which cause the diag/Wwan/modem port all be lost in qmmi mode. Details:
|
||||||
|
# UsbDeviceManager.java---->getDefaultFunctions and trySetEnabledFunctions
|
||||||
|
on property:persist.vendor.usb.config=*
|
||||||
|
setprop persist.sys.usb.qmmi.func ${persist.vendor.usb.config}
|
||||||
|
|
||||||
|
on mmi && property:ro.bootmode=ffbm-00
|
||||||
|
# ========================================================
|
||||||
|
# This is FFBM only settings.
|
||||||
|
# ========================================================
|
||||||
|
#mkdir for factory data files.
|
||||||
|
mkdir /mnt/vendor/persist/FTM_AP 0750 system system
|
||||||
|
|
||||||
|
start fastmmi
|
||||||
|
# start qcom-post-boot to set the misc partition path property value
|
||||||
|
start qcom-post-boot
|
||||||
|
start mmi_diag
|
||||||
|
|
||||||
|
on mmi && property:ro.bootmode=ffbm-01
|
||||||
|
# ========================================================
|
||||||
|
# This is FFBM only settings.
|
||||||
|
# ========================================================
|
||||||
|
#mkdir for factory data files.
|
||||||
|
mkdir /mnt/vendor/persist/FTM_AP 0750 system system
|
||||||
|
|
||||||
|
start fastmmi
|
||||||
|
## start qcom-post-boot to set the misc partition path property value
|
||||||
|
start qcom-post-boot
|
||||||
|
start mmi_diag
|
||||||
|
|
||||||
|
on property:persist.vendor.usb.config=* && property:ro.bootmode=ffbm-00
|
||||||
|
setprop sys.usb.config ${persist.vendor.usb.config}
|
||||||
|
|
||||||
|
on property:persist.vendor.usb.config=* && property:ro.bootmode=ffbm-01
|
||||||
|
setprop sys.usb.config ${persist.vendor.usb.config}
|
||||||
|
|
||||||
|
on property:persist.vendor.usb.config=* && property:ro.bootmode=ffbm-02
|
||||||
|
setprop sys.usb.config ${persist.vendor.usb.config}
|
||||||
|
|
||||||
|
on property:persist.vendor.usb.config=* && property:ro.bootmode=qmmi
|
||||||
|
setprop sys.usb.config ${persist.vendor.usb.config}
|
||||||
|
|
||||||
|
on ffbm
|
||||||
|
trigger early-fs
|
||||||
|
trigger factory-fs
|
||||||
|
trigger fs
|
||||||
|
trigger post-fs
|
||||||
|
|
||||||
|
# Mount fstab in init.{$device}.rc by mount_all with '--late' parameter
|
||||||
|
# to only mount entries with 'latemount'. This is needed if '--early' is
|
||||||
|
# specified in the previous mount_all command on the fs stage.
|
||||||
|
# With /system mounted and properties form /system + /factory available,
|
||||||
|
# some services can be started.
|
||||||
|
trigger late-fs
|
||||||
|
|
||||||
|
# Now we can mount /data. File encryption requires keymaster to decrypt
|
||||||
|
# /data, which in turn can only be loaded when system properties are present.
|
||||||
|
trigger post-fs-data
|
||||||
|
|
||||||
|
# Now we can start zygote for devices with file based encryption
|
||||||
|
trigger zygote-start
|
||||||
|
|
||||||
|
# Load persist properties and override properties (if enabled) from /data.
|
||||||
|
trigger load_persist_props_action
|
||||||
|
|
||||||
|
# Remove a file to wake up anything waiting for firmware.
|
||||||
|
trigger firmware_mounts_complete
|
||||||
|
|
||||||
|
trigger early-boot
|
||||||
|
trigger boot
|
||||||
|
trigger mmi
|
||||||
|
|
||||||
|
|
||||||
|
# ========================================================
|
||||||
|
# Start for audio TC
|
||||||
|
# ========================================================
|
||||||
|
|
||||||
|
service vendor.audio_tc53 /vendor/bin/mm-audio-ftm -tc 53
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
|
||||||
|
service vendor.audio_tc51 /vendor/bin/mm-audio-ftm -tc 51
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc56 /vendor/bin/mm-audio-ftm -tc 56
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc222 /vendor/bin/mm-audio-ftm -tc 222
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc228 /vendor/bin/mm-audio-ftm -tc 228
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc229 /vendor/bin/mm-audio-ftm -tc 229
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc230 /vendor/bin/mm-audio-ftm -tc 230
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc225 /vendor/bin/mm-audio-ftm -tc 225
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc246 /vendor/bin/mm-audio-ftm -tc 246
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc247 /vendor/bin/mm-audio-ftm -tc 247
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc250 /vendor/bin/mm-audio-ftm -tc 250
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc251 /vendor/bin/mm-audio-ftm -tc 251
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc252 /vendor/bin/mm-audio-ftm -tc 252
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc253 /vendor/bin/mm-audio-ftm -tc 253
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc11 /vendor/bin/mm-audio-ftm -tc 11 -file /data/vendor/audio/ftm_headset_mic_record.wav
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc101 /vendor/bin/mm-audio-ftm -tc 101 -file /data/vendor/audio/ftm_mic1_record.wav
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc102 /vendor/bin/mm-audio-ftm -tc 102 -file /data/vendor/audio/ftm_mic2_record.wav
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc103 /vendor/bin/mm-audio-ftm -tc 103 -file /data/vendor/audio/ftm_mic3_record.wav
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.audio_tc104 /vendor/bin/mm-audio-ftm -tc 104 -file /data/vendor/audio/ftm_mic4_record.wav
|
||||||
|
user audio
|
||||||
|
group audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
# ========================================================
|
||||||
|
# End for audio TC
|
||||||
|
# ========================================================
|
942
rootdir/etc/init.qcom.rc
Executable file
942
rootdir/etc/init.qcom.rc
Executable file
|
@ -0,0 +1,942 @@
|
||||||
|
# Copyright (c) 2009-2012, 2014-2020, The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
#import /vendor/etc/init/hw/init.qti.ufs.rc
|
||||||
|
#import /vendor/etc/init/hw/init.qcom.usb.rc
|
||||||
|
#import /vendor/etc/init/hw/init.qcom.test.rc
|
||||||
|
import /vendor/etc/init/hw/init.target.rc
|
||||||
|
import /vendor/etc/init/hw/init.qcom.factory.rc
|
||||||
|
|
||||||
|
on early-init
|
||||||
|
mount debugfs debugfs /sys/kernel/debug
|
||||||
|
chmod 0755 /sys/kernel/debug
|
||||||
|
mount tracefs tracefs /sys/kernel/tracing
|
||||||
|
chmod 0755 /sys/kernel/tracing
|
||||||
|
|
||||||
|
# create symlink for vendor mount points
|
||||||
|
symlink /vendor/firmware_mnt /firmware
|
||||||
|
symlink /vendor/bt_firmware /bt_firmware
|
||||||
|
symlink /vendor/dsp /dsp
|
||||||
|
|
||||||
|
# Change ownership of hw_recovery related nodes
|
||||||
|
chown system graphics /sys/kernel/debug/dri/0/debug/dump
|
||||||
|
chown system graphics /sys/kernel/debug/dri/0/debug/recovery_reg
|
||||||
|
chown system graphics /sys/kernel/debug/dri/0/debug/recovery_dbgbus
|
||||||
|
chown system graphics /sys/kernel/debug/dri/0/debug/recovery_vbif_dbgbus
|
||||||
|
chown system graphics /sys/kernel/debug/dri/0/debug/recovery_dsi_dbgbus
|
||||||
|
|
||||||
|
# Change ownership of sysfs power control node
|
||||||
|
chown system graphics /sys/class/drm/card0/device/power/control
|
||||||
|
|
||||||
|
# Change ownership of sw_sync node
|
||||||
|
chown system graphics /sys/kernel/debug/sync/sw_sync
|
||||||
|
chmod 0666 /sys/kernel/debug/sync/sw_sync
|
||||||
|
|
||||||
|
#Disable UFS clock scaling
|
||||||
|
write /sys/bus/platform/devices/${ro.boot.bootdevice}/clkscale_enable 0
|
||||||
|
|
||||||
|
chown root system /dev/kmsg
|
||||||
|
chmod 0620 /dev/kmsg
|
||||||
|
# Load WIGIG platform driver
|
||||||
|
# exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules msm_11ad_proxy
|
||||||
|
|
||||||
|
on init
|
||||||
|
|
||||||
|
# Support legacy paths
|
||||||
|
symlink /sdcard /mnt/sdcard
|
||||||
|
symlink /sdcard /storage/sdcard0
|
||||||
|
|
||||||
|
# Create cgroup mount point for memory
|
||||||
|
mkdir /sys/fs/cgroup/memory/bg 0750 root system
|
||||||
|
write /sys/fs/cgroup/memory/bg/memory.swappiness 140
|
||||||
|
write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1
|
||||||
|
chown root system /sys/fs/cgroup/memory/bg/tasks
|
||||||
|
chmod 0660 /sys/fs/cgroup/memory/bg/tasks
|
||||||
|
|
||||||
|
on post-fs
|
||||||
|
chmod 0755 /sys/kernel/debug/tracing
|
||||||
|
|
||||||
|
on early-boot
|
||||||
|
# set RLIMIT_MEMLOCK to 64MB
|
||||||
|
setrlimit 8 67108864 67108864
|
||||||
|
# Allow subsystem (modem etc) debugging
|
||||||
|
write /sys/kernel/boot_adsp/boot 1
|
||||||
|
write /sys/kernel/boot_cdsp/boot 1
|
||||||
|
write /sys/devices/virtual/npu/msm_npu/boot 1
|
||||||
|
write /sys/devices/virtual/cvp/cvp/boot 1
|
||||||
|
exec u:r:vendor_qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh
|
||||||
|
exec u:r:vendor_qti_init_shell:s0 -- /vendor/bin/init.qti.can.sh
|
||||||
|
setprop ro.sf.lcd_density ${vendor.display.lcd_density}
|
||||||
|
|
||||||
|
chown system system /mnt/vendor/persist/data/pfm/licenses
|
||||||
|
chmod 0775 /mnt/vendor/persist/data/pfm/licenses
|
||||||
|
chown system system /mnt/vendor/persist/data/pfm/licenses/store_0
|
||||||
|
chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_0
|
||||||
|
chown system system /mnt/vendor/persist/data/pfm/licenses/store_1
|
||||||
|
chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_1
|
||||||
|
chown system system /mnt/vendor/persist/data/pfm/licenses/store_2
|
||||||
|
chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_2
|
||||||
|
chown system system /mnt/vendor/persist/data/pfm/licenses/store_3
|
||||||
|
chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_3
|
||||||
|
chown system system /mnt/vendor/persist/data/pfm/licenses/store_4
|
||||||
|
chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_4
|
||||||
|
|
||||||
|
on boot
|
||||||
|
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
|
||||||
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
|
||||||
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
|
||||||
|
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
|
||||||
|
chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
|
||||||
|
chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
|
||||||
|
chown system system /sys/module/sco/parameters/disable_esco
|
||||||
|
chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
|
||||||
|
chown system system /sys/module/msm_core/parameters/polling_interval
|
||||||
|
chown system system /sys/module/msm_core/parameters/disabled
|
||||||
|
chown system system /sys/kernel/debug/msm_core/enable
|
||||||
|
chown system system /sys/kernel/debug/msm_core/ptable
|
||||||
|
chown system system /sys/kernel/boot_slpi/ssr
|
||||||
|
chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
|
||||||
|
chmod 0660 /sys/module/bluetooth_power/parameters/power
|
||||||
|
chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
|
||||||
|
chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set
|
||||||
|
chmod 0660 /sys/class/rfkill/rfkill0/state
|
||||||
|
chmod 0660 /proc/bluetooth/sleep/proto
|
||||||
|
chown bluetooth net_bt /dev/ttyHS0
|
||||||
|
chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
|
||||||
|
chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
|
||||||
|
chmod 0660 /dev/ttyHS0
|
||||||
|
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
|
||||||
|
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
|
||||||
|
|
||||||
|
chmod 0660 /dev/ttyHS2
|
||||||
|
chown bluetooth bluetooth /dev/ttyHS2
|
||||||
|
|
||||||
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
|
||||||
|
chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
|
||||||
|
|
||||||
|
# This location is used by QCRIL to host UNIX domain
|
||||||
|
# socket files used for internal IPC within QCRIL
|
||||||
|
# modules
|
||||||
|
mkdir /dev/socket/qmux_radio 0770 radio radio
|
||||||
|
chmod 2770 /dev/socket/qmux_radio
|
||||||
|
|
||||||
|
mkdir /persist/drm 0770 system system
|
||||||
|
mkdir /persist/bluetooth 0770 bluetooth bluetooth
|
||||||
|
mkdir /persist/misc 0770 system system
|
||||||
|
mkdir /persist/alarm 0770 system system
|
||||||
|
mkdir /mnt/vendor/persist/time 0770 system system
|
||||||
|
mkdir /mnt/vendor/persist/secnvm 0770 system system
|
||||||
|
mkdir /mnt/vendor/persist/iar_db 0770 system system
|
||||||
|
mkdir /mnt/vendor/spunvm 0770 system system
|
||||||
|
|
||||||
|
#Create WIGIG socket area
|
||||||
|
mkdir /dev/socket/wigig 0770 wifi wifi
|
||||||
|
|
||||||
|
setprop wifi.interface wlan0
|
||||||
|
|
||||||
|
setprop ro.telephony.call_ring.multiple false
|
||||||
|
|
||||||
|
#Remove SUID bit for iproute2 ip tool
|
||||||
|
chmod 0755 /system/bin/ip
|
||||||
|
|
||||||
|
|
||||||
|
chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
|
||||||
|
|
||||||
|
setprop net.tcp.2g_init_rwnd 10
|
||||||
|
|
||||||
|
# To prevent out of order acknowledgements from making
|
||||||
|
# connection tracking to treat them as not belonging to
|
||||||
|
# the connection they belong to.
|
||||||
|
# Otherwise, a weird issue happens in which some long
|
||||||
|
# connections on high-throughput links get dropped when
|
||||||
|
# an ack packet comes out of order
|
||||||
|
write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
|
||||||
|
|
||||||
|
# Set the console loglevel to < KERN_WARN
|
||||||
|
# Set the default message loglevel to KERN_INFO
|
||||||
|
write /proc/sys/kernel/printk "4 6 1 7"
|
||||||
|
|
||||||
|
# Allow access for CCID command/response timeout configuration
|
||||||
|
chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
|
||||||
|
|
||||||
|
# bond0 used by FST Manager
|
||||||
|
chown wifi wifi /sys/class/net/bond0/bonding/queue_id
|
||||||
|
|
||||||
|
# Allow access to emmc rawdump block partition and dload sysfs node
|
||||||
|
chown root system /dev/block/bootdevice/by-name/rawdump
|
||||||
|
chmod 0660 /dev/block/bootdevice/by-name/rawdump
|
||||||
|
chown root system /sys/kernel/dload/emmc_dload
|
||||||
|
chmod 0660 /sys/kernel/dload/emmc_dload
|
||||||
|
chown root system /dev/block/bootdevice/by-name/ramdump
|
||||||
|
chmod 0660 /dev/block/bootdevice/by-name/ramdump
|
||||||
|
chown root system /sys/kernel/dload/dload_mode
|
||||||
|
chmod 0660 /sys/kernel/dload/dload_mode
|
||||||
|
|
||||||
|
chown system system /sys/class/backlight/panel0-backlight/brightness
|
||||||
|
chown system system /sys/class/backlight/panel0-backlight/max_brightness
|
||||||
|
chown system system /sys/class/backlight/panel1-backlight/brightness
|
||||||
|
chown system system /sys/class/backlight/panel1-backlight/max_brightness
|
||||||
|
|
||||||
|
# Allow access to sensors device attributes
|
||||||
|
chown system system /sys/class/sensors/MPU6050-accel/enable
|
||||||
|
chown system system /sys/class/sensors/MPU6050-accel/poll_delay
|
||||||
|
chown system system /sys/class/sensors/MPU6050-gyro/enable
|
||||||
|
chown system system /sys/class/sensors/MPU6050-gyro/poll_delay
|
||||||
|
chown system system /sys/class/sensors/apds9930-light/enable
|
||||||
|
chown system system /sys/class/sensors/apds9930-light/poll_delay
|
||||||
|
chown system system /sys/class/sensors/apds9930-proximity/enable
|
||||||
|
chown system system /sys/class/sensors/apds9930-proximity/poll_delay
|
||||||
|
|
||||||
|
# Create directory used for display
|
||||||
|
# for backward compatibility
|
||||||
|
mkdir /persist/display 0770 system graphics
|
||||||
|
mkdir /mnt/vendor/persist/display 0770 system graphics
|
||||||
|
|
||||||
|
# Create vpp directory
|
||||||
|
mkdir /mnt/vendor/persist/vpp 0770 media media
|
||||||
|
|
||||||
|
|
||||||
|
# Create hvdcp_opti directory
|
||||||
|
mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system
|
||||||
|
|
||||||
|
# limit discard size to 128MB in order to avoid long IO latency
|
||||||
|
write /sys/block/sda/queue/discard_max_bytes 134217728
|
||||||
|
|
||||||
|
# msm specific files that need to be created on /data
|
||||||
|
on post-fs-data
|
||||||
|
mkdir /data/vendor/misc 01771 system system
|
||||||
|
|
||||||
|
# Create directory used for dump collection
|
||||||
|
mkdir /data/vendor/ssrdump 0770 root system
|
||||||
|
|
||||||
|
# Create directory used by display clients
|
||||||
|
mkdir /data/vendor/display 0770 system graphics
|
||||||
|
|
||||||
|
# Change lm related dirs
|
||||||
|
mkdir /data/vendor/lm 0700 root root
|
||||||
|
|
||||||
|
# Create directory used by powermodule
|
||||||
|
mkdir /data/vendor/pwr 0700 root root
|
||||||
|
|
||||||
|
# Create directory used by media clients
|
||||||
|
mkdir /data/vendor/media 0770 mediacodec media
|
||||||
|
|
||||||
|
# Create /data/vendor/tzstorage directory for SFS listener
|
||||||
|
mkdir /data/vendor/tzstorage 0770 system system
|
||||||
|
|
||||||
|
# Create directory for apps access via QTEEConnector
|
||||||
|
mkdir /data/vendor/qtee 0770 system system
|
||||||
|
|
||||||
|
#Create folder of camera
|
||||||
|
mkdir /data/vendor/camera 0770 camera camera
|
||||||
|
|
||||||
|
|
||||||
|
#Create directory for tftp
|
||||||
|
mkdir /data/vendor/tombstones 0771 system system
|
||||||
|
mkdir /data/vendor/tombstones/rfs 0771 system system
|
||||||
|
|
||||||
|
mkdir /data/vendor/ramdump 0771 root system
|
||||||
|
mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth
|
||||||
|
mkdir /data/vendor/ramdump/bluetooth 0770 bluetooth bluetooth
|
||||||
|
|
||||||
|
# Create the directories used by the Wireless subsystem
|
||||||
|
mkdir /data/vendor/wifi 0770 wifi wifi
|
||||||
|
mkdir /data/vendor/wifi/sockets 0770 wifi wifi
|
||||||
|
mkdir /data/vendor/wifi/hostapd 0770 wifi wifi
|
||||||
|
mkdir /data/vendor/wifi/hostapd/ctrl 0770 wifi wifi
|
||||||
|
mkdir /data/vendor/wifi/wpa_supplicant 0770 wifi wifi
|
||||||
|
mkdir /data/vendor/wifi/wigig_hostapd 0770 wifi wifi
|
||||||
|
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
|
||||||
|
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
|
||||||
|
|
||||||
|
# Create the directories used by WiGig Sensing
|
||||||
|
mkdir /data/vendor/sensing 0770 system wifi
|
||||||
|
|
||||||
|
# Create the directories used by CnE subsystem
|
||||||
|
mkdir /data/vendor/connectivity 0771 radio radio
|
||||||
|
chown radio radio /data/vendor/connectivity
|
||||||
|
|
||||||
|
# Create directory used by audio subsystem
|
||||||
|
mkdir /data/vendor/audio 0770 audio audio
|
||||||
|
|
||||||
|
# Create directory for audio delta files
|
||||||
|
mkdir /data/vendor/audio/acdbdata 0770 media audio
|
||||||
|
mkdir /data/vendor/audio/acdbdata/delta 0770 media audio
|
||||||
|
|
||||||
|
# Create directory for radio
|
||||||
|
mkdir /data/vendor/radio 0770 system radio
|
||||||
|
rm /data/vendor/radio/shmbus
|
||||||
|
|
||||||
|
# Create directory for modem_config
|
||||||
|
mkdir /data/vendor/modem_config 0570 radio root
|
||||||
|
|
||||||
|
# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
|
||||||
|
# We chown/chmod /persist again so because mount is run as root + defaults
|
||||||
|
chown root system /persist
|
||||||
|
chmod 0771 /persist
|
||||||
|
chown system system /persist/WCNSS_qcom_wlan_nv.bin
|
||||||
|
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
|
||||||
|
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
|
||||||
|
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
|
||||||
|
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
|
||||||
|
|
||||||
|
# Chown polling nodes as needed from UI running on system server
|
||||||
|
chown system system /sys/devices/platform/msm_sdcc.1/polling
|
||||||
|
chown system system /sys/devices/platform/msm_sdcc.2/polling
|
||||||
|
chown system system /sys/devices/platform/msm_sdcc.3/polling
|
||||||
|
chown system system /sys/devices/platform/msm_sdcc.4/polling
|
||||||
|
|
||||||
|
#Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
|
||||||
|
#symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
|
||||||
|
|
||||||
|
#Create directories for Location services
|
||||||
|
mkdir /data/vendor/location 0770 gps gps
|
||||||
|
mkdir /data/vendor/location/mq 0770 gps gps
|
||||||
|
mkdir /data/vendor/location/xtwifi 0770 gps gps
|
||||||
|
mkdir /dev/socket/location 0770 gps gps
|
||||||
|
mkdir /dev/socket/location/mq 0770 gps gps
|
||||||
|
mkdir /dev/socket/location/xtra 0770 gps gps
|
||||||
|
mkdir /dev/socket/location/dgnss 0770 gps gps
|
||||||
|
|
||||||
|
#Create directories for wifihal services
|
||||||
|
mkdir /dev/socket/wifihal 0770 wifi wifi
|
||||||
|
chmod 2770 /dev/socket/wifihal
|
||||||
|
|
||||||
|
# Create /data/time folder for time-services
|
||||||
|
mkdir /data/vendor/time/ 0700 system system
|
||||||
|
|
||||||
|
setprop vold.post_fs_data_done 1
|
||||||
|
|
||||||
|
#Create a folder for SRS to be able to create a usercfg file
|
||||||
|
#mkdir /data/data/media 0770 media media
|
||||||
|
|
||||||
|
#Create FM dir for patchdownloader
|
||||||
|
mkdir /data/vendor/fm 0770 system system
|
||||||
|
chmod 0770 /data/vendor/fm
|
||||||
|
|
||||||
|
#Create PERFD deamon related dirs
|
||||||
|
mkdir /data/vendor/perfd 0770 root system
|
||||||
|
chmod 2770 /data/vendor/perfd
|
||||||
|
rm /data/vendor/perfd/default_values
|
||||||
|
|
||||||
|
mkdir /data/vendor/secure_element 0777 system system
|
||||||
|
|
||||||
|
#Create IOP deamon related dirs
|
||||||
|
mkdir /data/vendor/iop 0700 root system
|
||||||
|
|
||||||
|
# Mark the copy complete flag to not completed
|
||||||
|
write /data/vendor/radio/copy_complete 0
|
||||||
|
chown radio radio /data/vendor/radio/copy_complete
|
||||||
|
chmod 0660 /data/vendor/radio/copy_complete
|
||||||
|
|
||||||
|
# copy prebuilt qcril.db files always
|
||||||
|
copy /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db
|
||||||
|
chown radio radio /data/vendor/radio/qcril_prebuilt.db
|
||||||
|
chmod 0660 /data/vendor/radio/qcril_prebuilt.db
|
||||||
|
copy /vendor/radio/qcril_database/qcrilNr.db /data/vendor/radio/qcrilNr_prebuilt.db
|
||||||
|
copy /vendor/etc/qcril_database/qcrilNr.db /data/vendor/radio/qcrilNr_prebuilt.db
|
||||||
|
chown radio radio /data/vendor/radio/qcrilNr_prebuilt.db
|
||||||
|
chmod 0660 /data/vendor/radio/qcrilNr_prebuilt.db
|
||||||
|
|
||||||
|
# File flags for prebuilt ril db file
|
||||||
|
write /data/vendor/radio/prebuilt_db_support 1
|
||||||
|
chown radio radio /data/vendor/radio/prebuilt_db_support
|
||||||
|
chmod 0400 /data/vendor/radio/prebuilt_db_support
|
||||||
|
write /data/vendor/radio/db_check_done 0
|
||||||
|
chown radio radio /data/vendor/radio/db_check_done
|
||||||
|
chmod 0660 /data/vendor/radio/db_check_done
|
||||||
|
|
||||||
|
# qti-logkit data
|
||||||
|
mkdir /data/vendor/qti-logkit/ 0771 system system
|
||||||
|
mkdir /data/vendor/qti-logkit/shared-privileged/ 2770 system system
|
||||||
|
mkdir /data/vendor/qti-logkit/shared-public/ 2770 system diag
|
||||||
|
mkdir /data/vendor/qti-logkit/socket-privileged/ 2770 system system
|
||||||
|
mkdir /data/vendor/qti-logkit/socket-public/ 2750 system diag
|
||||||
|
mkdir /data/vendor/qti-logkit/logdata/ 2750 system shell
|
||||||
|
|
||||||
|
#Create SWAP related dirs
|
||||||
|
mkdir /data/vendor/swap 0770 root system
|
||||||
|
chmod 2770 /data/vendor/swap
|
||||||
|
|
||||||
|
# set aggressive read ahead for dm-0 and dm-1 during boot up
|
||||||
|
write /sys/block/dm-0/queue/read_ahead_kb 2048
|
||||||
|
write /sys/block/dm-1/queue/read_ahead_kb 2048
|
||||||
|
write /sys/block/dm-2/queue/read_ahead_kb 2048
|
||||||
|
|
||||||
|
# Create vpp directory
|
||||||
|
mkdir /data/vendor/vpp 0770 media media
|
||||||
|
|
||||||
|
#Create dir for TUI
|
||||||
|
mkdir /data/vendor/tui 0700 system drmrpc
|
||||||
|
|
||||||
|
service nqnfcinfo /system/vendor/bin/nqnfcinfo
|
||||||
|
class late_start
|
||||||
|
group nfc
|
||||||
|
user system
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service iop /system/vendor/bin/iop
|
||||||
|
class main
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
disabled
|
||||||
|
socket iop seqpacket 0666 root system
|
||||||
|
|
||||||
|
on property:ro.vendor.hw.dualsim=true
|
||||||
|
setprop persist.vendor.radio.multisim.config dsds
|
||||||
|
|
||||||
|
on property:ro.vendor.hw.dualsim=false
|
||||||
|
setprop persist.vendor.radio.multisim.config ""
|
||||||
|
|
||||||
|
#service qcomsysd /system/vendor/bin/qcom-system-daemon
|
||||||
|
# class main
|
||||||
|
# user root
|
||||||
|
# group root diag oem_2901
|
||||||
|
# disabled
|
||||||
|
|
||||||
|
#on property:persist.vendor.qcomsysd.enabled=1
|
||||||
|
# enable qcomsysd
|
||||||
|
|
||||||
|
#on property:persist.vendor.qcomsysd.enabled=0
|
||||||
|
# stop qcomsysd
|
||||||
|
|
||||||
|
service vendor.ssr_setup /system/vendor/bin/ssr_setup
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.ss_ramdump /system/vendor/bin/subsystem_ramdump
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group log sdcard_rw sdcard_r diag
|
||||||
|
ioprio rt 4
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:ro.vendor.iocgrp.config=1
|
||||||
|
mkdir /dev/blkio
|
||||||
|
mount cgroup none /dev/blkio blkio
|
||||||
|
chown system system /dev/blkio
|
||||||
|
chown system system /dev/blkio/tasks
|
||||||
|
chmod 0664 /dev/blkio/tasks
|
||||||
|
mkdir /dev/blkio/bg 0755 system system
|
||||||
|
chown system system /dev/blkio/bg/tasks
|
||||||
|
chmod 0664 /dev/blkio/bg/tasks
|
||||||
|
write /dev/blkio/blkio.weight 1000
|
||||||
|
write /dev/blkio/bg/blkio.weight 100
|
||||||
|
|
||||||
|
on property:persist.sys.ssr.enable_debug=*
|
||||||
|
write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
|
||||||
|
|
||||||
|
on property:persist.sys.mba_boot_timeout=*
|
||||||
|
write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
|
||||||
|
|
||||||
|
on property:persist.sys.modem_auth_timeout=*
|
||||||
|
write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
|
||||||
|
|
||||||
|
on property:persist.sys.pil_proxy_timeout=*
|
||||||
|
write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
|
||||||
|
|
||||||
|
on property:persist.vendor.ssr.restart_level=*
|
||||||
|
start vendor.ssr_setup
|
||||||
|
|
||||||
|
on property:persist.vendor.ssr.enable_ramdumps=1
|
||||||
|
write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
|
||||||
|
mkdir /data/vendor/ramdump_ssr 770 system system
|
||||||
|
start vendor.ss_ramdump
|
||||||
|
|
||||||
|
on property:persist.vendor.ssr.enable_ramdumps=0
|
||||||
|
write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
|
||||||
|
|
||||||
|
on property:persist.vendor.sys.rawdump_copy=1
|
||||||
|
write /sys/kernel/dload/emmc_dload 1
|
||||||
|
|
||||||
|
on property:persist.vendor.sys.rawdump_copy=0
|
||||||
|
write /sys/kernel/dload/emmc_dload 0
|
||||||
|
|
||||||
|
on charger
|
||||||
|
#Enable UFS clock scaling back
|
||||||
|
write /sys/bus/platform/devices/${ro.boot.bootdevice}/clkscale_enable 1
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1
|
||||||
|
write /dev/kmsg "Boot completed "
|
||||||
|
#Enable UFS clock scaling back
|
||||||
|
write /sys/bus/platform/devices/${ro.boot.bootdevice}/clkscale_enable 1
|
||||||
|
#Reset read ahead for dm-0 and dm-1 to 512kb
|
||||||
|
write /sys/block/dm-0/queue/read_ahead_kb 512
|
||||||
|
write /sys/block/dm-1/queue/read_ahead_kb 512
|
||||||
|
#WDSP FW boot sysfs node used by STHAL
|
||||||
|
chown media audio /sys/kernel/wdsp0/boot
|
||||||
|
chown media audio /sys/kernel/wcd_cpe0/fw_name
|
||||||
|
#Reinit lmkd to reconfigure lmkd properties
|
||||||
|
setprop lmkd.reinit 1
|
||||||
|
|
||||||
|
on property:persist.vendor.radio.atfwd.start=false
|
||||||
|
stop vendor.atfwd
|
||||||
|
|
||||||
|
on property:vendor.radio.atfwd.start=false
|
||||||
|
stop vendor.atfwd
|
||||||
|
|
||||||
|
# corefile limit
|
||||||
|
on property:persist.debug.trace=1
|
||||||
|
mkdir /data/core 0777 root root
|
||||||
|
write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
|
||||||
|
|
||||||
|
on property:vendor.media.target.version=*
|
||||||
|
setprop vendor.sys.media.target.version ${vendor.media.target.version}
|
||||||
|
|
||||||
|
on property:vendor.netflix.bsp_rev=*
|
||||||
|
setprop ro.netflix.bsp_rev ${vendor.netflix.bsp_rev}
|
||||||
|
|
||||||
|
on property:vendor.media.target_variant=*
|
||||||
|
setprop ro.media.xml_variant.codecs ${vendor.media.target_variant}
|
||||||
|
setprop ro.media.xml_variant.codecs_performance ${vendor.media.target_variant}
|
||||||
|
|
||||||
|
service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service qcom-c_main-sh /vendor/bin/init.class_main.sh
|
||||||
|
class main
|
||||||
|
user root
|
||||||
|
group root system
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
on property:vold.decrypt=trigger_restart_framework
|
||||||
|
start qcom-c_main-sh
|
||||||
|
start wcnss-service
|
||||||
|
|
||||||
|
service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
|
||||||
|
class core
|
||||||
|
user vendor_qrtr
|
||||||
|
group vendor_qrtr
|
||||||
|
capabilities NET_BIND_SERVICE
|
||||||
|
|
||||||
|
service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service qmiproxy /system/bin/qmiproxy
|
||||||
|
class main
|
||||||
|
user radio
|
||||||
|
group radio diag
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
|
||||||
|
-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
|
||||||
|
-g@android:vendor_wpa_wlan0
|
||||||
|
# we will start as root and wpa_supplicant will switch to user wifi
|
||||||
|
# after setting up the capabilities required for WEXT
|
||||||
|
# user wifi
|
||||||
|
# group wifi inet keystore
|
||||||
|
interface android.hardware.wifi.supplicant@1.0::ISupplicant default
|
||||||
|
interface android.hardware.wifi.supplicant@1.1::ISupplicant default
|
||||||
|
interface android.hardware.wifi.supplicant@1.2::ISupplicant default
|
||||||
|
interface android.hardware.wifi.supplicant@1.3::ISupplicant default
|
||||||
|
interface vendor.qti.hardware.wifi.supplicant@2.0::ISupplicantVendor default
|
||||||
|
interface vendor.qti.hardware.wifi.supplicant@2.1::ISupplicantVendor default
|
||||||
|
interface vendor.qti.hardware.wifi.supplicant@2.2::ISupplicantVendor default
|
||||||
|
class main
|
||||||
|
socket vendor_wpa_wlan0 dgram 660 wifi wifi
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \
|
||||||
|
-iwigig0 -Dnl80211 -c/data/vendor/wifi/wigig_supplicant.conf \
|
||||||
|
-m/data/vendor/wifi/wigig_p2p_supplicant.conf \
|
||||||
|
-O/data/vendor/wifi/wigig_sockets -dd \
|
||||||
|
-e/data/vendor/wifi/wigig_entropy.bin -g@android:wigig/wpa_wigig0 \
|
||||||
|
-S wigigsvc
|
||||||
|
# we will start as root and wpa_supplicant will switch to user wifi
|
||||||
|
# after setting up the capabilities required for WEXT
|
||||||
|
# user wifi
|
||||||
|
# group wifi inet keystore
|
||||||
|
class main
|
||||||
|
socket wigig/wpa_wigig0 dgram 660 wifi wifi
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
# Data Migration
|
||||||
|
service vendor.move_wifi_data /system/bin/move_wifi_data.sh
|
||||||
|
class main
|
||||||
|
user wifi
|
||||||
|
group wifi
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service wigignpt /vendor/bin/wigignpt
|
||||||
|
interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default
|
||||||
|
class hal
|
||||||
|
socket wigig/wigignpt stream 660 system wifi
|
||||||
|
user system
|
||||||
|
group wifi
|
||||||
|
capabilities NET_ADMIN
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:persist.vendor.wigig.npt.enable=1
|
||||||
|
start wigignpt
|
||||||
|
|
||||||
|
service vendor.sensingdaemon /vendor/bin/sensingdaemon
|
||||||
|
class hal
|
||||||
|
socket wigig/sensingdaemon stream 660 system wifi
|
||||||
|
user system
|
||||||
|
group wifi
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service dhcpcd_bond0 /system/bin/dhcpcd -ABKLG
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service dhcpcd_wigig0 /system/bin/dhcpcd -ABKLG
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service iprenew_wlan0 /system/bin/dhcpcd -n
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service iprenew_bond0 /system/bin/dhcpcd -n
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service iprenew_p2p /system/bin/dhcpcd -n
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service iprenew_wigig0 /system/bin/dhcpcd -n
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service ptt_socket_app /system/vendor/bin/ptt_socket_app -d
|
||||||
|
class main
|
||||||
|
user wifi
|
||||||
|
group wifi system inet net_admin
|
||||||
|
capabilities NET_ADMIN
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service ptt_ffbm /system/vendor/bin/ptt_socket_app -f -d
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service wifi_ftmd /system/vendor/bin/wifi_ftmd
|
||||||
|
user system
|
||||||
|
group system inet net_admin
|
||||||
|
socket wififtmd_server dgram 0660 system system
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
on property:vendor.wifi.ftmd.load=true
|
||||||
|
insmod /system/lib/modules/pronto/pronto_wlan.ko con_mode=5
|
||||||
|
|
||||||
|
service cnss-daemon /system/vendor/bin/cnss-daemon -n -l
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system inet net_admin wifi
|
||||||
|
capabilities NET_ADMIN
|
||||||
|
|
||||||
|
on property:sys.shutdown.requested=*
|
||||||
|
write /sys/kernel/shutdown_wlan/shutdown 1
|
||||||
|
stop cnss-daemon
|
||||||
|
|
||||||
|
service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service iprenew_bt-pan /system/bin/dhcpcd -n
|
||||||
|
class late_start
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
#service ssgqmigd /vendor/bin/ssgqmigd
|
||||||
|
# class late_start
|
||||||
|
# user radio
|
||||||
|
# group radio gps system
|
||||||
|
# socket ssgqmig seqpacket 0660 radio inet
|
||||||
|
|
||||||
|
service mlid /vendor/bin/mlid
|
||||||
|
class late_start
|
||||||
|
user gps
|
||||||
|
group gps
|
||||||
|
socket mlid stream 0666 gps gps
|
||||||
|
|
||||||
|
service loc_launcher /system/vendor/bin/loc_launcher
|
||||||
|
class late_start
|
||||||
|
user gps
|
||||||
|
group gps
|
||||||
|
|
||||||
|
service qcom-sh /vendor/bin/init.qcom.sh
|
||||||
|
class late_start
|
||||||
|
user root
|
||||||
|
group root system radio
|
||||||
|
oneshot
|
||||||
|
# Remove since is deprecated but throws AVC denial.
|
||||||
|
# service crashdata-sh /vendor/bin/init.qcom.crashdata.sh
|
||||||
|
# class late_start
|
||||||
|
# user root
|
||||||
|
# oneshot
|
||||||
|
|
||||||
|
service qcom-post-boot /vendor/bin/init.qcom.post_boot.sh
|
||||||
|
class late_start
|
||||||
|
user root
|
||||||
|
group root system wakelock graphics
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service qti-testscripts /system/bin/sh /product/etc/init.qcom.testscripts.sh
|
||||||
|
class late_start
|
||||||
|
user root
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
seclabel u:r:qti-testscripts:s0
|
||||||
|
|
||||||
|
service wifi-sdio-on /vendor/bin/init.qcom.sdio.sh
|
||||||
|
class late_start
|
||||||
|
group wifi inet
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service wifi-crda /vendor/bin/init.crda.sh
|
||||||
|
class late_start
|
||||||
|
user root
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1
|
||||||
|
start qcom-post-boot
|
||||||
|
start qti-testscripts
|
||||||
|
|
||||||
|
on property:ro.vendor.ril.mbn_copy_completed=1
|
||||||
|
write /data/vendor/radio/copy_complete 1
|
||||||
|
|
||||||
|
service qvop-daemon /vendor/bin/qvop-daemon
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system drmrpc
|
||||||
|
|
||||||
|
service vendor.atfwd /vendor/bin/ATFWD-daemon
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system radio
|
||||||
|
|
||||||
|
service hostapd_fst /vendor/bin/hw/hostapd -dd -g /data/vendor/wifi/hostapd/global
|
||||||
|
class main
|
||||||
|
capabilities NET_ADMIN NET_RAW
|
||||||
|
user wifi
|
||||||
|
group wifi
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service battery_monitor /system/bin/battery_monitor
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.ril-daemon2 /vendor/bin/hw/rild -c 2
|
||||||
|
class main
|
||||||
|
user radio
|
||||||
|
disabled
|
||||||
|
group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log
|
||||||
|
capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
|
||||||
|
|
||||||
|
service vendor.ril-daemon3 /vendor/bin/hw/rild -c 3
|
||||||
|
class main
|
||||||
|
user radio
|
||||||
|
disabled
|
||||||
|
group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log
|
||||||
|
capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
|
||||||
|
|
||||||
|
service profiler_daemon /system/bin/profiler_daemon
|
||||||
|
class late_start
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.ssr_diag /system/vendor/bin/ssr_diag
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
disabled
|
||||||
|
|
||||||
|
#service diag_mdlog_start /system/vendor/bin/diag_mdlog
|
||||||
|
# class late_start
|
||||||
|
# user shell
|
||||||
|
# group system oem_2901 sdcard_rw sdcard_r media_rw
|
||||||
|
# disabled
|
||||||
|
# oneshot
|
||||||
|
|
||||||
|
#service diag_mdlog_stop /system/vendor/bin/diag_mdlog -k
|
||||||
|
# class late_start
|
||||||
|
# user shell
|
||||||
|
# group system oem_2901 sdcard_rw sdcard_r media_rw
|
||||||
|
# disabled
|
||||||
|
# oneshot
|
||||||
|
|
||||||
|
service qlogd /system/xbin/qlogd
|
||||||
|
socket qlogd stream 0662 system system
|
||||||
|
class main
|
||||||
|
disabled
|
||||||
|
on property:persist.sys.qlogd=1
|
||||||
|
start qlogd
|
||||||
|
on property:persist.sys.qlogd=0
|
||||||
|
stop qlogd
|
||||||
|
|
||||||
|
service vm_bms /vendor/bin/vm_bms
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.msm_irqbal_lb /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_little_big.conf
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.msm_irqbl_sdm630 /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_sdm630.conf
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
disabled
|
||||||
|
|
||||||
|
# service for USERDEBUG
|
||||||
|
service vendor.LKCore-dbg /vendor/bin/LKCore
|
||||||
|
class late_start
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
user root
|
||||||
|
group root system log diag net_raw
|
||||||
|
|
||||||
|
# service for USER
|
||||||
|
service vendor.LKCore-rel /vendor/bin/LKCore
|
||||||
|
class late_start
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
user system
|
||||||
|
group system log diag
|
||||||
|
|
||||||
|
service qseeproxydaemon /system/vendor/bin/qseeproxydaemon
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
|
||||||
|
service esepmdaemon /system/vendor/bin/esepmdaemon
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group nfc
|
||||||
|
|
||||||
|
#add poweroffhandler
|
||||||
|
service poweroffhandler /system/vendor/bin/poweroffhandler
|
||||||
|
class core
|
||||||
|
user media
|
||||||
|
group graphics audio
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service time_daemon /vendor/bin/time_daemon
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
capabilities SYS_TIME
|
||||||
|
|
||||||
|
# Set vendor-ril lib path based on Meta version
|
||||||
|
on property:vendor.rild.libpath=*
|
||||||
|
setprop rild.libpath ${vendor.rild.libpath}
|
||||||
|
|
||||||
|
on property:ro.vendor.radio.noril=*
|
||||||
|
setprop ro.radio.noril ${ro.vendor.radio.noril}
|
||||||
|
|
||||||
|
service vendor.power_off_alarm /vendor/bin/power_off_alarm
|
||||||
|
class core
|
||||||
|
group system
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.hbtp /vendor/bin/hbtp_daemon
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
capabilities SYS_NICE
|
||||||
|
disabled
|
||||||
|
|
||||||
|
#service chre /vendor/bin/chre
|
||||||
|
# class late_start
|
||||||
|
# user system
|
||||||
|
# group system
|
||||||
|
# socket chre seqpacket 0660 root system
|
||||||
|
# shutdown critical
|
||||||
|
|
||||||
|
on property:vendor.chre.enabled=0
|
||||||
|
stop chre
|
||||||
|
|
||||||
|
service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
|
||||||
|
class main
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
keycodes 114 115 116
|
||||||
|
|
||||||
|
#Set GPU Opengles version
|
||||||
|
on property:vendor.opengles.version=*
|
||||||
|
setprop ro.opengles.version ${vendor.opengles.version}
|
||||||
|
|
||||||
|
#Set gpu available frequencies property
|
||||||
|
on property:vendor.gpu.available_frequencies=*
|
||||||
|
setprop ro.vendor.gpu.available_frequencies ${vendor.gpu.available_frequencies}
|
||||||
|
|
||||||
|
service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service
|
||||||
|
override
|
||||||
|
class hal
|
||||||
|
user audioserver
|
||||||
|
# media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
|
||||||
|
group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock
|
||||||
|
capabilities BLOCK_SUSPEND
|
||||||
|
ioprio rt 4
|
||||||
|
writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
|
||||||
|
onrestart restart audioserver
|
157
rootdir/etc/init.target.rc
Executable file
157
rootdir/etc/init.target.rc
Executable file
|
@ -0,0 +1,157 @@
|
||||||
|
# Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||||
|
# Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are
|
||||||
|
# met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived
|
||||||
|
# from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||||
|
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||||
|
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||||
|
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
import /vendor/etc/init/hw/init.mmi.rc
|
||||||
|
|
||||||
|
on early-init
|
||||||
|
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules audio_q6_pdr audio_q6_notifier audio_snd_event audio_apr audio_adsp_loader audio_q6 audio_native audio_usf audio_pinctrl_lpi audio_swr audio_swr_ctrl audio_platform audio_stub audio_wcd_core audio_wcd9xxx audio_wsa881x_analog audio_bolero_cdc audio_va_macro audio_rx_macro audio_tx_macro audio_mbhc audio_wcd937x audio_wcd937x_slave audio_pm2250_spmi audio_rouleur audio_rouleur_slave audio_machine_bengal
|
||||||
|
write /proc/sys/kernel/sched_boost 1
|
||||||
|
exec u:r:vendor_qti_init_shell:s0 -- /vendor/bin/init.qti.early_init.sh
|
||||||
|
setprop ro.soc.model ${ro.vendor.qti.soc_model}
|
||||||
|
|
||||||
|
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
|
||||||
|
#Moving to init as this is needed for qseecomd
|
||||||
|
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
||||||
|
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
|
||||||
|
start vendor.qseecomd
|
||||||
|
start keymaster-4-0
|
||||||
|
|
||||||
|
on early-fs
|
||||||
|
start vold
|
||||||
|
|
||||||
|
on fs
|
||||||
|
start hwservicemanager
|
||||||
|
mount_all --early
|
||||||
|
chown root system /mnt/vendor/persist
|
||||||
|
chmod 0771 /mnt/vendor/persist
|
||||||
|
restorecon_recursive /mnt/vendor/persist
|
||||||
|
mkdir /mnt/vendor/persist/data 0700 system system
|
||||||
|
|
||||||
|
on post-fs
|
||||||
|
# set RLIMIT_MEMLOCK to 64MB
|
||||||
|
setrlimit 8 67108864 67108864
|
||||||
|
|
||||||
|
on late-fs
|
||||||
|
wait_for_prop hwservicemanager.ready true
|
||||||
|
exec_start wait_for_keymaster
|
||||||
|
mount_all --late
|
||||||
|
|
||||||
|
on post-fs-data
|
||||||
|
mkdir /vendor/data/tombstones 0771 system system
|
||||||
|
|
||||||
|
on early-boot
|
||||||
|
start vendor.sensors
|
||||||
|
|
||||||
|
on boot
|
||||||
|
write /dev/cpuset/audio-app/cpus 1-2
|
||||||
|
#USB controller configuration
|
||||||
|
setprop vendor.usb.rndis.func.name "gsi"
|
||||||
|
setprop vendor.usb.rmnet.func.name "gsi"
|
||||||
|
setprop vendor.usb.rmnet.inst.name "rmnet"
|
||||||
|
setprop vendor.usb.dpl.inst.name "dpl"
|
||||||
|
setprop vendor.usb.qdss.inst.name "qdss"
|
||||||
|
setprop vendor.usb.controller 4e00000.dwc3
|
||||||
|
|
||||||
|
#Load WLAN driver
|
||||||
|
insmod /vendor/lib/modules/qca_cld3_wlan.ko
|
||||||
|
|
||||||
|
on boot && property:persist.vendor.usb.controller.default=*
|
||||||
|
setprop vendor.usb.controller ${persist.vendor.usb.controller.default}
|
||||||
|
|
||||||
|
on property:vendor.usb.controller=*
|
||||||
|
setprop sys.usb.controller ${vendor.usb.controller}
|
||||||
|
|
||||||
|
on charger
|
||||||
|
start vendor.power_off_alarm
|
||||||
|
setprop vendor.usb.controller 4e00000.dwc3
|
||||||
|
setprop sys.usb.configfs 1
|
||||||
|
|
||||||
|
#pd-mapper
|
||||||
|
service vendor.pd_mapper /vendor/bin/pd-mapper
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system log diag
|
||||||
|
|
||||||
|
#Peripheral manager
|
||||||
|
service vendor.per_mgr /vendor/bin/pm-service
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
ioprio rt 4
|
||||||
|
|
||||||
|
service vendor.per_proxy /vendor/bin/pm-proxy
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.mdm_helper /vendor/bin/mdm_helper
|
||||||
|
class core
|
||||||
|
group system wakelock
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh
|
||||||
|
class core
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
on property:init.svc.vendor.per_mgr=running
|
||||||
|
start vendor.per_proxy
|
||||||
|
|
||||||
|
on property:sys.shutdown.requested=*
|
||||||
|
stop vendor.per_proxy
|
||||||
|
|
||||||
|
on property:vendor.vold.post_fs_data_done=1 && property:ro.debuggable=1
|
||||||
|
start vendor.wlan_logging
|
||||||
|
|
||||||
|
on property:vendor.vold.post_fs_data_done=1 && property:persist.wlan.debug_log=1
|
||||||
|
start vendor.wlan_logging
|
||||||
|
|
||||||
|
service vendor.wlan_logging /system/vendor/bin/cnss_diag -q -f -t HELIUM
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group system wifi inet sdcard_rw media_rw diag
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service dcvs-sh /vendor/bin/init.qti.dcvs.sh
|
||||||
|
class late_start
|
||||||
|
user root
|
||||||
|
group root system
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
on property:vendor.dcvs.prop=1
|
||||||
|
start dcvs-sh
|
522
rootdir/etc/ueventd.qcom.rc
Executable file
522
rootdir/etc/ueventd.qcom.rc
Executable file
|
@ -0,0 +1,522 @@
|
||||||
|
# Copyright (c) 2012-2015, 2017-2020, The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Firmware directory Path
|
||||||
|
# Below macro will be read by uevent and path will
|
||||||
|
# be added to search path for firmware loading
|
||||||
|
firmware_directories /vendor/firmware_mnt/image/
|
||||||
|
|
||||||
|
# the DIAG device node is not world writable/readable.
|
||||||
|
/dev/diag 0660 system oem_2901
|
||||||
|
/dev/mhi_*_pipe_4 0660 system system
|
||||||
|
/dev/ttydiag0 0660 system oem_2901
|
||||||
|
/dev/ttydiag1 0660 system oem_2901
|
||||||
|
/dev/ttydiag2 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/membuf 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
|
||||||
|
/dev/ipa_odl_ctl 0660 radio radio
|
||||||
|
/dev/ipa_adpl 0660 system oem_2905
|
||||||
|
/dev/synx_device 0660 root camera
|
||||||
|
/dev/hab 0666 system system
|
||||||
|
/dev/hgsl 0666 system system
|
||||||
|
/dev/iio:device* 0664 system system
|
||||||
|
|
||||||
|
#permissions for UFS RPMB BSG device node
|
||||||
|
/dev/0:0:0:49476 0600 system system
|
||||||
|
|
||||||
|
#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
|
||||||
|
/dev/btfmslim 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/cvp* 0660 system camera
|
||||||
|
/dev/media* 0660 system camera
|
||||||
|
/dev/v4l-subdev* 0660 system camera
|
||||||
|
/dev/qseecom 0660 system drmrpc
|
||||||
|
/dev/qce 0660 system drmrpc
|
||||||
|
/dev/smcinvoke 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/spss_utils 0660 system system
|
||||||
|
/dev/sp_kernel 0660 system system
|
||||||
|
/dev/sp_nvm 0660 system system
|
||||||
|
/dev/sp_ssr 0660 system system
|
||||||
|
/dev/sp_keymaster 0660 system system
|
||||||
|
/dev/sp_keymaster_ssr 0660 system system
|
||||||
|
/dev/sec_nvm_* 0660 system system
|
||||||
|
/dev/cryptoapp 0660 system system
|
||||||
|
/dev/spdaemon_ssr 0660 system system
|
||||||
|
/dev/spu_hal_ssr 0660 system system
|
||||||
|
/dev/iuicc* 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/adsprpc-smd-secure 0644 system system
|
||||||
|
/dev/system_health_monitor 0644 radio system
|
||||||
|
/dev/mdss_rotator 0664 system system
|
||||||
|
|
||||||
|
#QDSS
|
||||||
|
/dev/byte-cntr 0660 system oem_2902
|
||||||
|
/dev/mhi_qdss 0660 system oem_2902
|
||||||
|
/sys/class/qdss_bridge/mhi_qdss mode 0660 system oem_2902
|
||||||
|
|
||||||
|
#qg
|
||||||
|
/dev/qg 0660 system system
|
||||||
|
/dev/qg_battery 0660 system system
|
||||||
|
|
||||||
|
#qvr
|
||||||
|
/dev/qvr_external_sensor_ioctl 0660 system system
|
||||||
|
/dev/bus/usb/* 0660 root usb
|
||||||
|
/dev/hidraw* 0660 root usb
|
||||||
|
|
||||||
|
# Trustonic TEE device
|
||||||
|
/dev/mobicore 0600 system system
|
||||||
|
/dev/mobicore-user 0666 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
|
||||||
|
/sys/devices/platform/soc/*.qcom,icnss/net/wlan*/queues/rx-* rps_cpus 0660 system system
|
||||||
|
/sys/devices/platform/soc/1c00000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan*/queues/rx-* rps_cpus 0660 system system
|
||||||
|
/sys/devices/platform/soc/17a10040.qcom,wcn6750/net/wlan*/queues/rx-* rps_cpus 0660 system system
|
||||||
|
/dev/spidev0.0 0660 system audio
|
||||||
|
/dev/i2c-7 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
|
||||||
|
/dev/spidev2.0 0660 system audio
|
||||||
|
/dev/spidev22.0 0660 system audio
|
||||||
|
/dev/spidev10.0 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
|
||||||
|
/dev/sensors 0660 system system
|
||||||
|
/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
|
||||||
|
/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
|
||||||
|
/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
|
||||||
|
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
|
||||||
|
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
|
||||||
|
|
||||||
|
# GNSS Device premissions
|
||||||
|
/dev/gnss_sirf 0660 gps gps
|
||||||
|
|
||||||
|
# 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
|
||||||
|
/dev/laser 0660 system camera
|
||||||
|
|
||||||
|
# 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/qbt* 0660 system system
|
||||||
|
/sys/class/fts/touch_aoi aoi_set 0660 root system
|
||||||
|
/sys/class/fts/touch_aoi power_set 0660 root 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
|
||||||
|
/dev/block/platform/soc/7c4000.sdhci/by-name/frp 0600 system system
|
||||||
|
/dev/block/platform/soc/4744000.sdhci/by-name/frp 0600 system system
|
||||||
|
/dev/block/platform/soc/4804000.ufshc/by-name/frp 0600 system system
|
||||||
|
|
||||||
|
# This is temporary while using SD card for initial bring-up
|
||||||
|
/dev/block/platform/soc/8804000.sdhci/by-name/frp 0600 system system
|
||||||
|
|
||||||
|
# Add device block for MISC
|
||||||
|
/dev/block/platform/soc/7464900.sdhci/by-name/misc 0660 root system
|
||||||
|
/dev/block/platform/soc/624000.ufshc/by-name/misc 0660 root system
|
||||||
|
/dev/block/platform/soc/1da4000.ufshc/by-name/misc 0660 root system
|
||||||
|
/dev/block/platform/soc/c0c4000.sdhci/by-name/misc 0660 root system
|
||||||
|
/dev/block/platform/soc/1d84000.ufshc/by-name/misc 0660 root system
|
||||||
|
/dev/block/platform/soc/7c4000.sdhci/by-name/misc 0660 root system
|
||||||
|
/dev/block/platform/soc/4744000.sdhci/by-name/misc 0660 root system
|
||||||
|
/dev/block/platform/soc/4804000.ufshc/by-name/misc 0660 root system
|
||||||
|
|
||||||
|
# Kmsg device
|
||||||
|
/dev/kmsg 0620 root system
|
||||||
|
|
||||||
|
# LED class devices
|
||||||
|
/sys/class/leds/red delay_on 0640 system system
|
||||||
|
/sys/class/leds/red delay_off 0640 system system
|
||||||
|
/sys/class/leds/red breath 0640 system system
|
||||||
|
/sys/class/leds/red trigger 0640 system system
|
||||||
|
/sys/class/leds/green delay_on 0640 system system
|
||||||
|
/sys/class/leds/green delay_off 0640 system system
|
||||||
|
/sys/class/leds/green breath 0640 system system
|
||||||
|
/sys/class/leds/green trigger 0640 system system
|
||||||
|
/sys/class/leds/blue delay_on 0640 system system
|
||||||
|
/sys/class/leds/blue delay_off 0640 system system
|
||||||
|
/sys/class/leds/blue breath 0640 system system
|
||||||
|
/sys/class/leds/blue trigger 0640 system system
|
||||||
|
|
||||||
|
# LED class vibrator
|
||||||
|
/sys/class/leds/vibrator state 0660 system system
|
||||||
|
/sys/class/leds/vibrator duration 0660 system system
|
||||||
|
/sys/class/leds/vibrator activate 0660 system system
|
||||||
|
/sys/class/leds/vibrator extra 0660 system system
|
||||||
|
/sys/class/leds/vibrator seq 0660 system system
|
||||||
|
|
||||||
|
# NPU device
|
||||||
|
/dev/msm_npu 0644 system system
|
||||||
|
|
||||||
|
# Egistec fingerprint
|
||||||
|
/dev/esfp0 0660 system system
|
||||||
|
|
||||||
|
# Goodix FPS
|
||||||
|
/dev/goodix_fp 0664 system system
|
||||||
|
|
||||||
|
# Chipone FPS
|
||||||
|
/dev/fpsensor 0660 system system
|
||||||
|
|
||||||
|
#Focaltech FPS
|
||||||
|
/dev/focaltech_fp 0660 system system
|
||||||
|
|
||||||
|
# Change permission for FPC fingerprint
|
||||||
|
/sys/class/fingerprint/fpc1020 nav 0440 system system
|
||||||
|
/sys/class/fingerprint/fpc1020 irq 0440 system system
|
||||||
|
/sys/class/fingerprint/fpc1020 irq_cnt 0440 system system
|
||||||
|
/sys/class/fingerprint/fpc1020 dev_enable 0220 system system
|
||||||
|
/sys/class/fingerprint/fpc1020 vendor 0444 system system
|
||||||
|
|
||||||
|
#Memory Offline
|
||||||
|
/sys/devices/system/memory/memory* state 0660 system system
|
||||||
|
|
||||||
|
/sys/devices/virtual/hdcp/msm_hdcp min_level_change 0664 system graphics
|
||||||
|
|
||||||
|
# sys-fs display
|
||||||
|
/sys/class/graphics/fb* hpd 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* res_info 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* vendor_name 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* product_description 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* video_mode 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* format_3d 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* s3d_mode 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* dynamic_fps 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* msm_fb_dfps_mode 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* hdr_stream 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* cec/enable 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* cec/logical_addr 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* cec/rd_msg 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* pa 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* cec/wr_msg 0600 system graphics
|
||||||
|
/sys/class/graphics/fb* hdcp/tp 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* hdcp2p2/min_level_change 0660 system graphics
|
||||||
|
/sys/class/graphics/fb* hdmi_audio_cb 0600 audioserver audio
|
||||||
|
|
||||||
|
/sys/class/graphics/fb* lineptr_value 0664 system graphics
|
||||||
|
/sys/class/graphics/fb* msm_fb_persist_mode 0664 system graphics
|
||||||
|
|
||||||
|
/sys/class/graphics/fb0 idle_time 0664 system graphics
|
||||||
|
/sys/class/graphics/fb0 dynamic_fps 0664 system graphics
|
||||||
|
/sys/class/graphics/fb0 dyn_pu 0664 system graphics
|
||||||
|
/sys/class/graphics/fb0 modes 0664 system graphics
|
||||||
|
/sys/class/graphics/fb0 mode 0664 system graphics
|
||||||
|
/sys/class/graphics/fb0 msm_cmd_autorefresh_en 0664 system graphics
|
||||||
|
*/
|
||||||
|
|
||||||
|
/sys/devices/platform/soc/ae00000.qcom,mdss_mdp power/control 0664 system graphics
|
||||||
|
|
||||||
|
#asm330 sensor
|
||||||
|
#common sensors files
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* buffer/enable 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* buffer/length 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* buffer/watermark 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* discharded_samples 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* current_timestamp_clock 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* hwfifo_flush 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* hwfifo_watermark 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* hwfifo_watermark_max 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* mount_matrix 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* name 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* sampling_frequency 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* sampling_frequency_available 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_timestamp_en 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_timestamp_index 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_timestamp_type 0664 system system
|
||||||
|
|
||||||
|
# standard iio accel attributes
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_scale_available 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_x_raw 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_x_scale 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_y_raw 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_y_scale 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_z_raw 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_z_scale 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_x_en 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_x_index 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_x_type 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_y_en 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_y_index 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_y_type 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_z_en 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_z_index 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_z_type 0664 system system
|
||||||
|
|
||||||
|
# standard iio gyro attributes
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_scale_available 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_x_raw 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_x_scale 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_y_raw 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_y_scale 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_z_raw 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_z_scale 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_x_en 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_x_index 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_x_type 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_y_en 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_y_index 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_y_type 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_z_en 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_z_index 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_z_type 0664 system system
|
||||||
|
|
||||||
|
|
||||||
|
# standard iio temp attributes
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_offset 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_raw 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_scale 0664 system system
|
||||||
|
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_scale_available 0664 system system
|
||||||
|
|
||||||
|
# I2C
|
||||||
|
/dev/i2c-* 0660 system system
|
Loading…
Reference in a new issue