sm7125: Update rootdir to S

Change-Id: Iac543ceaaf468ab0e001443ee1e88ca00aaa5b1d
fourteen-wip
Simon1511 3 years ago
parent 3dbc73cda2
commit 0bf3b2abe3
  1. 17
      common.mk
  2. 108
      rootdir/Android.mk
  3. 35
      rootdir/bin/init.crda.sh
  4. 216
      rootdir/bin/init.qcom.class_core.sh
  5. 115
      rootdir/bin/init.qcom.coex.sh
  6. 518
      rootdir/bin/init.qcom.early_boot.sh
  7. 35
      rootdir/bin/init.qcom.efs.sync.sh
  8. 78
      rootdir/bin/init.qcom.sdio.sh
  9. 33
      rootdir/bin/init.qcom.sensors.sh
  10. 236
      rootdir/bin/init.qcom.usb.sh
  11. 55
      rootdir/bin/init.qti.dcvs.sh
  12. 19
      rootdir/bin/init.qti.qcv.sh
  13. 87
      rootdir/bin/qca6234-service.sh
  14. 9
      rootdir/etc/fstab.default
  15. 5
      rootdir/etc/fstab.ramplus
  16. 37
      rootdir/etc/init.fingerprint.rc
  17. 16
      rootdir/etc/init.nfc.samsung.rc
  18. 258
      rootdir/etc/init.qcom.factory.rc
  19. 41
      rootdir/etc/init.qcom.usb.rc
  20. 3
      rootdir/etc/init.ramplus.rc
  21. 133
      rootdir/etc/init.samsung.rc
  22. 2
      rootdir/etc/init.target.rc
  23. 16
      rootdir/etc/init.vendor.sysfw.rc
  24. 4
      rootdir/etc/wifi_qcom.rc
  25. 3
      rootdir/etc/wifi_sec.rc

@ -37,13 +37,14 @@ AB_OTA_UPDATER := false
PRODUCT_PACKAGES += \
fstab.default \
fstab.default.ramdisk \
fstab.sqzr \
init.qcom.factory.rc \
fstab.ramplus \
init.qcom.rc \
init.qcom.usb.rc \
init.samsung.bsp.rc \
init.samsung.display.rc \
init.samsung.rc \
init.fingerprint.rc \
init.ramplus.rc \
init.target.rc \
ueventd.qcom.rc \
wifi_qcom.rc \
@ -59,19 +60,9 @@ PRODUCT_PACKAGES += \
# Vendor scripts
PRODUCT_PACKAGES += \
init.class_main.sh \
init.crda.sh \
init.qcom.early_boot.sh \
init.qcom.post_boot.sh \
init.qcom.sdio.sh \
init.qcom.sh \
init.qcom.usb.sh \
init.qti.chg_policy.sh \
init.qti.dcvs.sh \
init.qcom.coex.sh \
init.qcom.efs.sync.sh \
init.qcom.sensors.sh \
init.qti.qcv.sh \
qca6234-service.sh
init.qti.chg_policy.sh
# Audio
PRODUCT_PACKAGES += \

@ -21,21 +21,13 @@ LOCAL_MODULE_PATH := $(TARGET_RAMDISK_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.sqzr
LOCAL_MODULE := fstab.ramplus
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/fstab.sqzr
LOCAL_SRC_FILES := etc/fstab.ramplus
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)
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
@ -76,6 +68,22 @@ LOCAL_SRC_FILES := etc/init.samsung.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.fingerprint.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.fingerprint.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.ramplus.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.ramplus.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.target.rc
LOCAL_MODULE_TAGS := optional
@ -175,62 +183,6 @@ LOCAL_SRC_FILES := bin/init.class_main.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.coex.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := bin/init.qcom.coex.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.efs.sync.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := bin/init.qcom.efs.sync.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.sensors.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := bin/init.qcom.sensors.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qti.qcv.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := bin/init.qti.qcv.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.crda.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := bin/init.crda.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := qca6234-service.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := bin/qca6234-service.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
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)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.post_boot.sh
LOCAL_MODULE_TAGS := optional
@ -239,14 +191,6 @@ LOCAL_SRC_FILES := bin/init.qcom.post_boot.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.sdio.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := bin/init.qcom.sdio.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.sh
LOCAL_MODULE_TAGS := optional
@ -255,14 +199,6 @@ LOCAL_SRC_FILES := bin/init.qcom.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.usb.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := bin/init.qcom.usb.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qti.chg_policy.sh
LOCAL_MODULE_TAGS := optional
@ -270,11 +206,3 @@ LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := bin/init.qti.chg_policy.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
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)/bin
include $(BUILD_PREBUILT)

@ -1,35 +0,0 @@
#! /vendor/bin/sh
# Copyright (c) 2012, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
country=`getprop wlan.crda.country`
# crda takes input in COUNTRY environment variable
if [ $country != "" ]
then
COUNTRY="$country" /system/bin/crda
fi

@ -1,216 +0,0 @@
#!/vendor/bin/sh
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Set platform variables
target=`getprop ro.board.platform`
if [ -f /sys/devices/soc0/hw_platform ]; then
soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
else
soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
fi
if [ -f /sys/devices/soc0/soc_id ]; then
soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
else
soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
fi
if [ -f /sys/devices/soc0/platform_version ]; then
soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
else
soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
fi
# Dynamic Memory Managment (DMM) provides a sys file system to the userspace
# that can be used to plug in/out memory that has been configured as unstable.
# This unstable memory can be in Active or In-Active State.
# Each of which the userspace can request by writing to a sys file.
#
# ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This
# property is set in the Android system properties file.
#
# If ro.dev.dmm.dpd.start_address is set here then the target has a memory
# configuration that supports DynamicMemoryManagement.
init_DMM()
{
block=-1
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm8960")
;;
*)
return
;;
esac
mem="/sys/devices/system/memory"
op=`cat $mem/movable_start_bytes`
case "$op" in
"0")
log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op
;;
"$mem/movable_start_bytes: No such file or directory ")
log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op
;;
*)
log -p i -t DMM DMM available. movable_start_bytes at $op
movable_start_bytes=0x`cat $mem/movable_start_bytes`
block_size_bytes=0x`cat $mem/block_size_bytes`
block=$((#${movable_start_bytes}/${block_size_bytes}))
chown -h system.system $mem/memory$block/state
chown -h system.system $mem/probe
chown -h system.system $mem/active
chown -h system.system $mem/remove
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
echo $movable_start_bytes > $mem/probe
case "$?" in
"0")
log -p i -t DMM $movable_start_bytes to physical hotplug succeeded.
;;
*)
log -p e -t DMM $movable_start_bytes to physical hotplug failed.
return
;;
esac
echo online > $mem/memory$block/state
case "$?" in
"0")
log -p i -t DMM \'echo online\' to logical hotplug succeeded.
;;
*)
log -p e -t DMM \'echo online\' to logical hotplug failed.
return
;;
esac
;;
esac
setprop ro.dev.dmm.dpd.start_address $movable_start_bytes
setprop ro.dev.dmm.dpd.block $block
;;
esac
case "$target" in
"msm8960")
return
;;
esac
# For 7X30 targets:
# ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory
# configuration. This is also used to indicate that the target is capable of
# setting EBI-1 to Deep Power Down or Self Refresh.
op=`cat $mem/low_power_memory_start_bytes`
case "$op" in
"0")
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op
;;
"$mem/low_power_memory_start_bytes No such file or directory ")
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op
;;
*)
log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op
;;
esac
}
#
# For controlling console and shell on console on 8960 - perist.serial.enable 8960
# On other target use default ro.debuggable property.
#
serial=`getprop persist.serial.enable`
dserial=`getprop ro.debuggable`
case "$target" in
"msm8960")
case "$serial" in
"0")
echo 0 > /sys/devices/platform/msm_serial_hsl.0/console
;;
"1")
echo 1 > /sys/devices/platform/msm_serial_hsl.0/console
start console
;;
*)
case "$dserial" in
"1")
start console
;;
esac
;;
esac
;;
"msm8610" | "msm8974" | "msm8226")
case "$serial" in
"0")
echo 0 > /sys/devices/f991f000.serial/console
;;
"1")
echo 1 > /sys/devices/f991f000.serial/console
start console
;;
*)
case "$dserial" in
"1")
start console
;;
esac
;;
esac
;;
*)
case "$dserial" in
"1")
start console
;;
esac
;;
esac
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
insmod /system/lib/modules/ss_mfcinit.ko
insmod /system/lib/modules/ss_vencoder.ko
insmod /system/lib/modules/ss_vdecoder.ko
chmod -h 0666 /dev/ss_mfc_reg
chmod -h 0666 /dev/ss_vdec
chmod -h 0666 /dev/ss_venc
init_DMM
;;
"msm8960")
init_DMM
;;
esac

@ -1,115 +0,0 @@
#! /vendor/bin/sh
# Copyright (c) 2009-2010, 2012, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
LOG_TAG="qcom-bt-wlan-coex"
LOG_NAME="${0}:"
coex_pid=""
ath_wlan_supported=`getprop wlan.driver.ath`
loge ()
{
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
}
logi ()
{
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
}
failed ()
{
loge "$1: exit code $2"
exit $2
}
start_coex ()
{
case "$ath_wlan_supported" in
"2")
echo "ATH WLAN Chip ID AR6004 is enabled"
/system/bin/abtfilt -d -z -n -m -a -w wlan0 &
;;
"1")
echo "ATH WLAN Chip ID is enabled"
# Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter.
/system/bin/abtfilt -d -z -n -v -q -s -w wlan0 &
;;
"0")
echo "WCN WLAN Chip ID is enabled"
# Must have -o turned on to avoid daemon (otherwise we cannot get pid)
/system/bin/btwlancoex -o $opt_flags &
;;
*)
echo "NO WLAN Chip ID is enabled, so enabling ATH as default"
# Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter.
/system/bin/abtfilt -d -z -n -v -q -s -w wlan0 &
;;
esac
coex_pid=$!
logi "start_coex: pid = $coex_pid"
}
kill_coex ()
{
logi "kill_coex: pid = $coex_pid"
kill -TERM $coex_pid
# this shell doesn't exit now -- wait returns for normal exit
}
# mimic coex options parsing -- maybe a waste of effort
USAGE="${0} [-o] [-c] [-r] [-i] [-h]"
while getopts "ocrih" f
do
case $f in
o | c | r | i | h) opt_flags="$opt_flags -$f" ;;
\?) echo $USAGE; exit 1;;
esac
done
# init does SIGTERM on ctl.stop for service
trap "kill_coex" TERM INT
#Selectively start coex module
target=`getprop ro.board.platform`
if [ "$target" == "msm8960" ] && [ "$ath_wlan_supported" != "2" ]; then
logi "btwlancoex/abtfilt is not needed"
else
# Build settings may not produce the coex executable
if ls /system/bin/btwlancoex || ls /system/bin/abtfilt
then
start_coex
wait $coex_pid
logi "Coex stopped"
else
logi "btwlancoex/abtfilt not available"
fi
fi
exit 0

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

@ -1,35 +0,0 @@
#! /vendor/bin/sh
# Copyright (c) 2012, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
PATH=/system/bin:$PATH
export PATH
cat /sys/devices/platform/rs300000a7.65536/force_sync
cat /sys/devices/platform/rs300100a7.65536/force_sync

@ -1,78 +0,0 @@
#! /vendor/bin/sh
# Copyright (c) 2010, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# For successful WLAN card detection, WLAN needs SDIO polling turned on.
# This script can be used to turn on/off SDIO polling on appropriate
# SDIO slot on the MSM target (e.g. slot 3 on 7x30 surf).
arg=$1
target=`getprop ro.board.platform`
case "$target" in
"msm7627_6x")
echo 1 > /sys/devices/platform/msm_sdcc.1/polling
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
;;
"msm7627_ffa")
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
;;
"msm7627_surf")
echo 1 > /sys/devices/platform/msm_sdcc.1/polling
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
;;
"msm7627a")
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
;;
"msm7630_surf")
echo 1 > /sys/devices/platform/msm_sdcc.3/polling
;;
"msm7630_1x")
echo 1 > /sys/devices/platform/msm_sdcc.3/polling
;;
"msm7630_fusion")
echo 1 > /sys/devices/platform/msm_sdcc.3/polling
;;
"msm8660")
echo 1 > /sys/devices/platform/msm_sdcc.4/polling
;;
"msm8660_csfb")
echo 1 > /sys/devices/platform/msm_sdcc.4/polling
;;
esac
exit 0

@ -1,33 +0,0 @@
#!/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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
# Function to start sensors for SSC enabled platforms
#
cp /vendor/etc/sensors/scripts/* /data/vendor/sensors/scripts/
chmod a+rw /data/vendor/sensors/scripts/*

@ -1,236 +0,0 @@
#!/vendor/bin/sh
# Copyright (c) 2012-2018, 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.
#
#
# Set platform variables
soc_hwplatform=`cat /sys/devices/soc0/hw_platform 2> /dev/null`
soc_machine=`cat /sys/devices/soc0/machine 2> /dev/null`
soc_machine=${soc_machine:0:2}
soc_id=`cat /sys/devices/soc0/soc_id 2> /dev/null`
#
# Check ESOC for external modem
#
# Note: currently only a single MDM/SDX is supported
#
esoc_name=`cat /sys/bus/esoc/devices/esoc0/esoc_name 2> /dev/null`
target=`getprop ro.board.platform`
#
# Override USB default composition
#
# If USB persist config not set, set default configuration
if [ "$(getprop persist.vendor.usb.config)" == "" -a "$(getprop ro.build.type)" != "user" -a \
"$(getprop init.svc.vendor.usb-gadget-hal-1-0)" != "running" ]; then
if [ "$esoc_name" != "" ]; then
setprop persist.vendor.usb.config diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb
else
case "$(getprop ro.baseband)" in
"apq")
setprop persist.vendor.usb.config diag,adb
;;
*)
case "$soc_hwplatform" in
"Dragon" | "SBC")
setprop persist.vendor.usb.config diag,adb
;;
*)
case "$soc_machine" in
"SA")
setprop persist.vendor.usb.config diag,adb
;;
*)
case "$target" in
"msm8996")
setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
;;
"msm8909")
setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
;;
"msm8937")
if [ -d /config/usb_gadget ]; then
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
else
case "$soc_id" in
"313" | "320")
setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
;;
*)
setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
;;
esac
fi
;;
"msm8953")
if [ -d /config/usb_gadget ]; then
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
else
setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
fi
;;
"msm8998" | "sdm660" | "apq8098_latv")
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb
;;
"sdm845" | "sdm710")
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
;;
"msmnile" | "sm6150" | "trinket" | "lito" | "atoll" | "bengal" | "lahaina" | "holi")
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,qdss,adb
;;
*)
setprop persist.vendor.usb.config diag,adb
;;
esac
;;
esac
;;
esac
;;
esac
fi
fi
# This check is needed for GKI 1.0 targets where QDSS is not available
if [ "$(getprop persist.vendor.usb.config)" == "diag,serial_cdev,rmnet,dpl,qdss,adb" -a \
! -d /config/usb_gadget/g1/functions/qdss.qdss ]; then
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
fi
# Start peripheral mode on primary USB controllers for Automotive platforms
case "$soc_machine" in
"SA")
if [ -f /sys/bus/platform/devices/a600000.ssusb/mode ]; then
default_mode=`cat /sys/bus/platform/devices/a600000.ssusb/mode`
case "$default_mode" in
"none")
echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode
;;
esac
fi
;;
esac
# check configfs is mounted or not
if [ -d /config/usb_gadget ]; then
# Chip-serial is used for unique MSM identification in Product string
msm_serial=`cat /sys/devices/soc0/serial_number`;
msm_serial_hex=`printf %08X $msm_serial`
machine_type=`cat /sys/devices/soc0/machine`
setprop vendor.usb.product_string "$machine_type-$soc_hwplatform _SN:$msm_serial_hex"
# ADB requires valid iSerialNumber; if ro.serialno is missing, use dummy
serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber 2> /dev/null`
if [ "$serialnumber" == "" ]; then
serialno=1234567
echo $serialno > /config/usb_gadget/g1/strings/0x409/serialnumber
fi
setprop vendor.usb.configfs 1
persist_comp=`getprop persist.sys.usb.config`
comp=`getprop sys.usb.config`
echo $persist_comp
echo $comp
if [ "$comp" != "$persist_comp" ]; then
echo "setting sys.usb.config"
setprop sys.usb.config $persist_comp
fi
fi
#
# Initialize RNDIS Diag option. If unset, set it to 'none'.
#
diag_extra=`getprop persist.vendor.usb.config.extra`
if [ "$diag_extra" == "" ]; then
setprop persist.vendor.usb.config.extra none
fi
# enable rps cpus on msm8937 target
setprop vendor.usb.rps_mask 0
case "$soc_id" in
"294" | "295" | "353" | "354")
setprop vendor.usb.rps_mask 40
;;
esac
#
# Initialize UVC conifguration.
#
if [ -d /config/usb_gadget/g1/functions/uvc.0 ]; then
cd /config/usb_gadget/g1/functions/uvc.0
echo 3072 > streaming_maxpacket
echo 1 > streaming_maxburst
mkdir control/header/h
ln -s control/header/h control/class/fs/
ln -s control/header/h control/class/ss
mkdir -p streaming/uncompressed/u/360p
echo "666666\n1000000\n5000000\n" > streaming/uncompressed/u/360p/dwFrameInterval
mkdir -p streaming/uncompressed/u/720p
echo 1280 > streaming/uncompressed/u/720p/wWidth
echo 720 > streaming/uncompressed/u/720p/wWidth
echo 29491200 > streaming/uncompressed/u/720p/dwMinBitRate
echo 29491200 > streaming/uncompressed/u/720p/dwMaxBitRate
echo 1843200 > streaming/uncompressed/u/720p/dwMaxVideoFrameBufferSize
echo 5000000 > streaming/uncompressed/u/720p/dwDefaultFrameInterval
echo "5000000\n" > streaming/uncompressed/u/720p/dwFrameInterval
mkdir -p streaming/mjpeg/m/360p
echo "666666\n1000000\n5000000\n" > streaming/mjpeg/m/360p/dwFrameInterval
mkdir -p streaming/mjpeg/m/720p
echo 1280 > streaming/mjpeg/m/720p/wWidth
echo 720 > streaming/mjpeg/m/720p/wWidth
echo 29491200 > streaming/mjpeg/m/720p/dwMinBitRate
echo 29491200 > streaming/mjpeg/m/720p/dwMaxBitRate
echo 1843200 > streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize
echo 5000000 > streaming/mjpeg/m/720p/dwDefaultFrameInterval
echo "5000000\n" > streaming/mjpeg/m/720p/dwFrameInterval
echo 0x04 > /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmaControls
mkdir -p streaming/h264/h/960p
echo 1920 > streaming/h264/h/960p/wWidth
echo 960 > streaming/h264/h/960p/wWidth
echo 40 > streaming/h264/h/960p/bLevelIDC
echo "333667\n" > streaming/h264/h/960p/dwFrameInterval
mkdir -p streaming/h264/h/1920p
echo "333667\n" > streaming/h264/h/1920p/dwFrameInterval
mkdir streaming/header/h
ln -s streaming/uncompressed/u streaming/header/h
ln -s streaming/mjpeg/m streaming/header/h
ln -s streaming/h264/h streaming/header/h
ln -s streaming/header/h streaming/class/fs/
ln -s streaming/header/h streaming/class/hs/
ln -s streaming/header/h streaming/class/ss/
fi

@ -1,55 +0,0 @@
#! /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
#Enable mem_latency governor for L3, LLCC, and DDR scaling
for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
do
echo "mem_latency" > $memlat/governor
echo 10 > $memlat/polling_interval
echo 400 > $memlat/mem_latency/ratio_ceil
done
#Enable cdspl3 governor for L3 cdsp nodes
for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
do
echo "cdspl3" > $l3cdsp/governor
done
#Gold L3 ratio ceil
echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil
#Enable compute governor for gold latfloor
for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
do
echo "compute" > $latfloor/governor
echo 10 > $latfloor/polling_interval
done
done;

@ -1,19 +0,0 @@
#! /vendor/bin/sh
#=============================================================================
# Copyright (c) 2020 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#=============================================================================
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
# For chipsets in QCV family, convert soc_id to soc_name
# and store it in ro.vendor.qti.soc_name.
if [ "$soc_id" -eq 415 ] || [ "$soc_id" -eq 439 ] || [ "$soc_id" -eq 456 ]; then
setprop ro.vendor.qti.soc_name lahaina
elif [ "$soc_id" -eq 450 ]; then
setprop ro.vendor.qti.soc_name shima
fi

@ -1,87 +0,0 @@
#! /vendor/bin/sh
# Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Check whether device is plugged on the HSIC bus
# Currently HSIC bus will be the first index
PATH=/sbin:/system/sbin:/system/bin:/system/xbin
export PATH
deviceprop=`getprop ro.baseband`
boardprop=`getprop ro.board.platform`
if [ -e /sys/bus/platform/drivers/msm_hsic_host ]; then
if [ ! -L /sys/bus/usb/devices/1-1 ]; then
echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
fi
chown -h system.system /sys/bus/platform/drivers/msm_hsic_host/bind
chown -h system.system /sys/bus/platform/drivers/msm_hsic_host/unbind
chmod -h 0200 /sys/bus/platform/drivers/msm_hsic_host/bind
chmod -h 0200 /sys/bus/platform/drivers/msm_hsic_host/unbind
fi
wlanchip=""
if [ "$deviceprop" == "apq" ] && [ "$boardprop" == "msm8974" ]; then
wlanchip="AR6004-USB"
fi
# force ar6004 is ar6004_wlan.conf existed.
if [ -f /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf ]; then
wlanchip=`cat /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf`
fi
echo "The WLAN Chip ID is $wlanchip"
if [ "$wlanchip" == "AR6004-USB" ]; then
echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
setprop wlan.driver.ath 2
setprop vendor.bluetooth.soc ath3k
setprop wlan.driver.name /system/lib/modules/ath6kl-3.5/ath6kl_usb.ko
setprop wlan.supp.template /system/etc/wifi/wpa_supplicant_ath6kl.conf
btsoc="ath3k"
elif [ "$wlanchip" == "AR6004-SDIO" ]; then
setprop wlan.driver.ath 2
setprop vendor.bluetooth.soc ath3k
setprop wlan.driver.name /system/lib/modules/ath6kl-3.5/ath6kl_sdio.ko
setprop wlan.supp.template /system/etc/wifi/wpa_supplicant_ath6kl.conf
btsoc="ath3k"
# Chown polling nodes as needed from UI running on system server
chmod -h 0200 /sys/devices/msm_sdcc.1/polling
chmod -h 0200 /sys/devices/msm_sdcc.2/polling
chmod -h 0200 /sys/devices/msm_sdcc.3/polling
chmod -h 0200 /sys/devices/msm_sdcc.4/polling
chown -h system.system /sys/devices/msm_sdcc.1/polling
chown -h system.system /sys/devices/msm_sdcc.2/polling
chown -h system.system /sys/devices/msm_sdcc.3/polling
chown -h system.system /sys/devices/msm_sdcc.4/polling
fi

@ -33,10 +33,11 @@
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
system /system ext4 ro,barrier=1,discard wait,logical,first_stage_mount
product /product ext4 ro,barrier=1,discard wait,logical,first_stage_mount
vendor /vendor ext4 ro,barrier=1,discard wait,logical,first_stage_mount
odm /odm ext4 ro,barrier=1,discard wait,logical,first_stage_mount
system /system ext4 ro wait,logical,first_stage_mount
system /system f2fs ro wait,logical,first_stage_mount
product /product ext4 ro wait,logical,first_stage_mount
vendor /vendor ext4 ro wait,logical,first_stage_mount
odm /odm ext4 ro wait,logical,first_stage_mount
/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic,sync wait,formattable,wrappedkey,first_stage_mount,check

@ -3,6 +3,5 @@
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# SWAP (SQZR)
/dev/block/zram0 none swap defaults zramsize=4294967296,zram_backingdev_size=1G
# SWAP
/dev/block/zram0 none swap defaults zramsize=2147483648,auto_configure

@ -0,0 +1,37 @@
on boot
# Fingerprint sensor
chmod 0660 /dev/esfp0
chown system system /dev/esfp0
chmod 0660 /dev/goodix_fp
chown system system /dev/goodix_fp
chmod 0660 /dev/qbt2000_fd
chmod 0660 /dev/qbt2000_ipc
chmod 0660 /dev/qbtspi
chown system system /dev/qbt2000_fd
chown system system /dev/qbt2000_ipc
chown system system /dev/qbtspi
chown system radio /sys/class/fingerprint/fingerprint/type_check
chown system radio /sys/class/fingerprint/fingerprint/name
chown system radio /sys/class/fingerprint/fingerprint/vendor
chown system radio /sys/class/fingerprint/fingerprint/adm
chown system radio /sys/class/fingerprint/fingerprint/bfs_values
chown system radio /sys/class/fingerprint/fingerprint/position
chown system radio /sys/class/fingerprint/fingerprint/cbgecnt
chown system radio /sys/class/fingerprint/fingerprint/intcnt
chown system radio /sys/class/fingerprint/fingerprint/resetcnt
chown system radio /sys/class/fingerprint/fingerprint/wuhbtest
chown system radio /sys/class/fingerprint/fingerprint/rb
mkdir /data/vendor/misc 0770 system system
mkdir /data/vendor/misc/qti_fp 0770 system system
mkdir /data/vendor/misc/qti_fp/bg_estimation 0770 system system
mkdir /data/vendor/misc/qti_fp/calib_test 0770 system system
mkdir /data/vendor/misc/qti_fp/template 0770 system system
mkdir /data/vendor/biometrics 0770 system system
mkdir /data/vendor/fpSnrTest 0770 system system
mkdir /efs/biometrics 0770 system system
mkdir /efs/biometrics/meta 0770 system system

@ -1,4 +1,8 @@
on boot
on post-fs-data
# NFC KEY
mkdir /data/vendor/nfc 0770 nfc nfc
# NFC driver permission
chmod 0660 /dev/sec-nfc
chown nfc nfc /dev/sec-nfc
chmod 0660 /dev/p3
@ -7,16 +11,16 @@ on boot
chown nfc nfc /dev/pn547
chmod 0660 /dev/p61
chown system system /dev/p61
on post-fs-data
# NFC KEY
mkdir /data/vendor/nfc 0770 nfc nfc
chmod 0660 /dev/st21nfc
chown nfc nfc /dev/st21nfc
chmod 0660 /dev/st54spi
chown system system /dev/st54spi
# NFC: create data/nfc for nv storage
mkdir /data/nfc 0770 nfc nfc
mkdir /data/nfc/param 0770 nfc nfc
# NFC: create /efs/nfc for nv storage
# NFC: /efs/nfc for nv storage
mkdir /efs/nfc 0700 nfc nfc
# NFC KEY

@ -1,258 +0,0 @@
#
# Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Define fastmmi
service fastmmi /system_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
# ========================================================

@ -79,8 +79,6 @@ on boot
write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
write /config/usb_gadget/g2/strings/0x409/manufacturer ${ro.product.manufacturer}
mkdir /config/usb_gadget/g1/functions/mass_storage.0
mkdir /config/usb_gadget/g1/functions/mtp.gs0
mkdir /config/usb_gadget/g1/functions/ptp.gs1
mkdir /config/usb_gadget/g1/functions/accessory.gs2
mkdir /config/usb_gadget/g1/functions/audio_source.gs3
mkdir /config/usb_gadget/g1/functions/midi.gs5
@ -111,6 +109,8 @@ on boot
mkdir /config/usb_gadget/g1/functions/uac2.0
mkdir /config/usb_gadget/g1/functions/uvc.0
mkdir /config/usb_gadget/g1/functions/conn_gadget.0
mkdir /config/usb_gadget/g1/functions/ss_mon.mtp
mkdir /config/usb_gadget/g1/functions/ss_mon.ptp
mkdir /config/usb_gadget/g1/configs/b.1 0770
mkdir /config/usb_gadget/g2/configs/b.1 0770
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770
@ -157,7 +157,6 @@ on boot
# Set rndis_class_id = 1 for Samsung RNDIS driver
write /config/usb_gadget/g1/functions/gsi.rndis/rndis_class_id 1
on boot && property:vendor.usb.use_ffs_mtp=1
mkdir /config/usb_gadget/g1/functions/ffs.mtp
mkdir /config/usb_gadget/g1/functions/ffs.ptp
mkdir /dev/usb-ffs/mtp 0770 mtp mtp
@ -336,7 +335,8 @@ on property:sys.usb.config=sec_charging && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f2
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -355,8 +355,9 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=sec_charging,adb && p
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f3
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -372,8 +373,9 @@ on property:sys.usb.config=mtp && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/acm.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f3
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -392,9 +394,10 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:s
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/acm.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f4
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -411,9 +414,10 @@ on property:sys.usb.config=mtp,conn_gadget && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/acm.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/conn_gadget.0 /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f4
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -433,10 +437,11 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,conn_gadget,adb &
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/acm.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/conn_gadget.0 /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f5
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -453,8 +458,9 @@ on property:sys.usb.config=mtp,categories && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/acm.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f3
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -473,9 +479,10 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,categories,adb &&
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/acm.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f4
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -492,9 +499,10 @@ on property:sys.usb.config=mtp,categories,conn_gadget && property:sys.usb.config
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/acm.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/conn_gadget.0 /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f4
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -514,10 +522,11 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,categories,conn_g
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6860
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/acm.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/conn_gadget.0 /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
symlink /config/usb_gadget/g1/functions/ss_mon.mtp /config/usb_gadget/g1/configs/b.1/f5
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
#]
@ -534,7 +543,8 @@ on property:sys.usb.config=ptp && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6865
symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.ptp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ss_mon.ptp /config/usb_gadget/g1/configs/b.1/f2
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@ -553,8 +563,9 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:s
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x04E8
write /config/usb_gadget/g1/idProduct 0x6866
symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.ptp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/ss_mon.ptp /config/usb_gadget/g1/configs/b.1/f3
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}

@ -0,0 +1,3 @@
# KERNEL CORE MEMORY
on property:sys.boot_completed=1
swapon_all /vendor/etc/fstab.ramplus

@ -34,6 +34,15 @@ on early-init
mkdir /mnt/vendor/efs 0771 radio system
mkdir /mnt/vendor/persist 0771 root system
mkdir /efs/taas 0770 system system
mkdir /mnt/vendor/efs/taas 0770 system system
chown system system /dev/tspio
chown system system /sys/class/sec/tsp/enable
chown system system /dev/tsp_data
# pogo keyboard
chown system system /sys/class/sec/sec_keypad/fw_update
on init
symlink /dev/block/bootdevice/by-name/steady /dev/block/steady
symlink /dev/block/bootdevice/by-name/persistent /dev/block/persistent
@ -55,6 +64,8 @@ on init
chown system system /sys/class/timed_output/vibrator/vibe_state
chown system system /sys/class/timed_output/vibrator/intensities
chown system system /sys/class/timed_output/vibrator/haptic_intensities
chown system system /sys/class/timed_output/vibrator/fifo
chown system system /sys/class/timed_output/vibrator/hybrid_haptic_engine
chown system system /sys/class/leds/vibrator/intensity
chown system system /sys/class/leds/vibrator/force_touch_intensity
@ -70,6 +81,8 @@ on init
chown system system /sys/class/leds/vibrator/vibe_state
chown system system /sys/class/leds/vibrator/intensities
chown system system /sys/class/leds/vibrator/haptic_intensities
chown system system /sys/class/leds/vibrator/fifo
chown system system /sys/class/leds/vibrator/hybrid_haptic_engine
chmod 660 /sys/class/timed_output/vibrator/intensity
chmod 660 /sys/class/timed_output/vibrator/force_touch_intensity
@ -85,6 +98,8 @@ on init
chmod 660 /sys/class/timed_output/vibrator/vibe_state
chmod 660 /sys/class/timed_output/vibrator/intensities
chmod 660 /sys/class/timed_output/vibrator/haptic_intensities
chmod 660 /sys/class/timed_output/vibrator/fifo
chmod 660 /sys/class/timed_output/vibrator/hybrid_haptic_engine
chmod 660 /sys/class/leds/vibrator/intensity
chmod 660 /sys/class/leds/vibrator/force_touch_intensity
@ -100,6 +115,8 @@ on init
chmod 660 /sys/class/leds/vibrator/vibe_state
chmod 660 /sys/class/leds/vibrator/intensities
chmod 660 /sys/class/leds/vibrator/haptic_intensities
chmod 660 /sys/class/leds/vibrator/fifo
chmod 660 /sys/class/leds/vibrator/hybrid_haptic_engine
# Create carrier folder for HiddenMenu
on post-fs
@ -121,7 +138,7 @@ on post-fs
# Meta event
chown system radio /sys/class/sensors/sensor_dev/flush
# Fingerprint sensor
chmod 0660 /dev/goodix_fp
chown system system /dev/goodix_fp
@ -140,6 +157,120 @@ on post-fs
restorecon /spu
on boot
# Permissions for Touchscreen
chown system radio /sys/class/sec/tsp/cmd
chown system system /sys/class/sec/tsp/input/enabled
chmod 0660 /sys/class/sec/tsp/input/enabled
chown system system /sys/class/sec/tsp/enabled
chmod 0660 /sys/class/sec/tsp/enabled
chown root system /proc/tsp_msg
chmod 0440 /proc/tsp_msg
chown system radio /sys/class/sec/tsp/pressure_enable
chown system system /sys/class/sec/tsp/multi_count
chown system system /sys/class/sec/tsp/wet_mode
chown system system /sys/class/sec/tsp/noise_mode
chown system system /sys/class/sec/tsp/comm_err_count
chown system system /sys/class/sec/tsp/checksum
chown system system /sys/class/sec/tsp/holding_time
chown system system /sys/class/sec/tsp/all_touch_count
chown system system /sys/class/sec/tsp/z_value
chown system system /sys/class/sec/tsp/sensitivity_mode
chown system system /sys/class/sec/tsp/prox_power_off
chown system system /sys/class/sec/tsp/irq_recovery_count
chown system system /sys/class/sec/tsp/ic_reset_count
chown system system /sys/class/sec/tsp/mode_change_failed_count
chown system system /sys/class/sec/sec_key/key_pressed_count
chown system system /dev/tspio
chown system system /sys/class/sec/tsp/ear_detect_enable
chown system system /sys/class/sec/tsp/ta_mode
chown system system /sys/class/sec/tsp/virtual_prox
chown system system /sys/class/sec/tsp/hw_param
chown system system /sys/class/sec/tsp/input/trusted_touch_enable
chown system system /sys/class/sec/tsp/input/trusted_touch_event
chown system system /sys/class/sec/tsp/input/trusted_touch_type
# Permissions for Touchscreen-1
chown system radio /sys/class/sec/tsp1/cmd
chown system system /sys/class/sec/tsp1/input/enabled
chmod 0660 /sys/class/sec/tsp/input1/enabled
chown system system /sys/class/sec/tsp1/multi_count
chown system system /sys/class/sec/tsp1/wet_mode
chown system system /sys/class/sec/tsp1/noise_mode
chown system system /sys/class/sec/tsp1/comm_err_count
chown system system /sys/class/sec/tsp1/checksum
chown system system /sys/class/sec/tsp1/all_touch_count
chown system system /sys/class/sec/tsp1/z_value
chown system system /sys/class/sec/tsp1/sensitivity_mode
chown system system /sys/class/sec/tsp1/prox_power_off
chown system system /sys/class/sec/tsp1/ic_reset_count
chown system system /sys/class/sec/tsp1/mode_change_failed_count
# Permissions for Touchscreen-2
chown system radio /sys/class/sec/tsp2/cmd
chown system system /sys/class/sec/tsp2/input/enabled
chmod 0660 /sys/class/sec/tsp/input2/enabled
chown system system /sys/class/sec/tsp2/multi_count
chown system system /sys/class/sec/tsp2/wet_mode
chown system system /sys/class/sec/tsp2/noise_mode
chown system system /sys/class/sec/tsp2/comm_err_count
chown system system /sys/class/sec/tsp2/checksum
chown system system /sys/class/sec/tsp2/all_touch_count
chown system system /sys/class/sec/tsp2/z_value
chown system system /sys/class/sec/tsp2/sensitivity_mode
chown system system /sys/class/sec/tsp2/prox_power_off
chown system system /sys/class/sec/tsp2/ic_reset_count
chown system system /sys/class/sec/tsp2/mode_change_failed_count
# Permissions for Wacom
chown system radio /sys/class/sec/sec_epen/cmd
chown system system /sys/class/sec/sec_epen/input/enabled
chmod 0660 /sys/class/sec/sec_epen/input/enabled
chown system radio /sys/class/sec/sec_epen/epen_firm_update
chown system radio /sys/class/sec/sec_epen/epen_reset
chown system radio /sys/class/sec/sec_epen/epen_reset_result
chown system radio /sys/class/sec/sec_epen/epen_checksum
chown system radio /sys/class/sec/sec_epen/epen_checksum_result
chown system radio /sys/class/sec/sec_epen/epen_saving_mode
chown system radio /sys/class/sec/sec_epen/epen_wcharging_mode
chown system radio /sys/class/sec/sec_epen/epen_ble_charging_mode
chown system radio /sys/class/sec/sec_epen/keyboard_mode
chown system radio /sys/class/sec/sec_epen/epen_disable_mode
chown system radio /sys/class/sec/sec_epen/aod_enable
chown system radio /sys/class/sec/sec_epen/aod_lcd_onoff_status
chown system radio /sys/class/sec/sec_epen/screen_off_memo_enable
chown system radio /sys/class/sec/sec_epen/dex_enable
chown system radio /sys/class/sec/sec_epen/epen_fac_garage_mode
chown system radio /sys/class/sec/sec_epen/epen_fac_select_firmware
chown system system /sys/class/sec/sec_epen/abnormal_reset_count
chown system system /sys/class/sec/sec_epen/i2c_fail_count
chown system system /sys/class/sec/sec_epen/pen_out_count
chown system system /sys/class/sec/sec_epen/hw_param
# Permission for Securetouch
chown system system /sys/class/sec/ss_touch/secure/secure_touch_enable
chown system system /sys/class/sec/tsp1/input/secure_touch_enable
chown system system /sys/class/sec/tsp2/input/secure_touch_enable
# Key
chown system radio /sys/class/sec/sec_key/wakeup_keys
write /sys/class/sec/sec_key/wakeup_keys 116,172
chown system system /sys/class/sec/sec_key/key_pressed_count
chown system radio /sys/class/sec/sec_sidekey/cmd
chown system system /sys/class/sec/sec_sidekey/input/enabled
chmod 0660 /sys/class/sec/sec_sidekey/input/enabled
# TAAS
chown system system /mnt/vendor/efs/taas
chown system system /mnt/vendor/efs/taas/taas
chmod 0770 /mnt/vendor/efs/taas
chmod 0660 /mnt/vendor/efs/taas/taas
chown system system /mnt/vendor/efs/taas/taaslog
chmod 0660 /mnt/vendor/efs/taas/taaslog
chown system system /efs/taas/taaslog
chmod 0660 /efs/taas/taaslog
# Permission for nfc, eSE driver
chmod 0660 /dev/pn547
chmod 0660 /dev/p61

@ -148,7 +148,7 @@ on boot
# Add a cpuset for the camera daemon
# We want all cores for camera
mkdir /dev/cpuset/camera-daemon
write /dev/cpuset/camera-daemon/cpus 0-3
write /dev/cpuset/camera-daemon/cpus 0-7
write /dev/cpuset/camera-daemon/mems 0
chown cameraserver cameraserver /dev/cpuset/camera-daemon
chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks

@ -1,3 +1,7 @@
on post-fs
# make fsdbg on /dev for filesystem debug info.
mkdir /dev/fsdbg 0775 root system
on boot
# FSDBG dlog permissions
chown root system /proc/fslog/dlog_efs
@ -5,9 +9,9 @@ on boot
chown root system /proc/fslog/dlog_mm
chown root system /proc/fslog/dlog_rmdir
# Permissions for Filesystem
# change owner f2fs bigdata node for hqm write
chown system system /sys/fs/f2fs/userdata/sec_gc_stat
chown system system /sys/fs/f2fs/userdata/sec_io_stat
chown system system /sys/fs/f2fs/userdata/sec_fsck_stat
chown system system /sys/fs/f2fs/userdata/sec_defrag_stat
# Permissions for Filesystem
# change owner f2fs bigdata node for hqm write
chown system system /sys/fs/f2fs/userdata/sec_gc_stat
chown system system /sys/fs/f2fs/userdata/sec_io_stat
chown system system /sys/fs/f2fs/userdata/sec_fsck_stat
chown system system /sys/fs/f2fs/userdata/sec_defrag_stat

@ -13,10 +13,6 @@ on post-fs-data
chmod 0640 /sys/wifi/softap
symlink /data/vendor/ramdump /data/vendor/log/wifi/ramdump
chown system wifi /data/vendor/log/wifi/ramdump
# for WIFI MEMDUMP
# The default value of below memdump file is set in SecProductFeature
write /data/vendor/conn/.memdump.info 0
# for WIFI Antenna
write /data/vendor/conn/.wificable.info E

@ -39,6 +39,9 @@ on post-fs-data
chown wifi wifi /sys/wifi/mac_addr
chmod 0640 /sys/wifi/mac_addr
chown wifi wifi /sys/wifi/dump_in_progress
chmod 0640 /sys/wifi/dump_in_progress
on boot
setprop wifi.interface wlan0

Loading…
Cancel
Save