kunlun2: Import stock init scripts
This commit is contained in:
parent
38b77bd32e
commit
08e188d663
19 changed files with 11956 additions and 13 deletions
18
device.mk
18
device.mk
|
@ -45,8 +45,24 @@ PRODUCT_COPY_FILES += \
|
||||||
|
|
||||||
# Common init scripts
|
# Common init scripts
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
|
fstab.qcom \
|
||||||
|
init.class_main.sh \
|
||||||
init.custom.rc \
|
init.custom.rc \
|
||||||
init.power.rc
|
init.fpc.rc \
|
||||||
|
init.lenovo.common.rc \
|
||||||
|
init.lenovo.rc \
|
||||||
|
init.lenovo.usb.configfs.rc \
|
||||||
|
init.msm.usb.configfs.rc \
|
||||||
|
init.power.rc \
|
||||||
|
init.qcom.rc \
|
||||||
|
init.qcom.sh \
|
||||||
|
init.qcom.early_boot.sh \
|
||||||
|
init.qcom.post_boot.sh \
|
||||||
|
init.qcom.sensors.sh \
|
||||||
|
init.qcom.usb.rc \
|
||||||
|
init.qcom.usb.sh \
|
||||||
|
init.target.rc \
|
||||||
|
ueventd.qcom.rc
|
||||||
|
|
||||||
# Display
|
# Display
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
|
|
|
@ -1,17 +1,9 @@
|
||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := init.custom.rc
|
LOCAL_MODULE := ueventd.qcom.rc
|
||||||
LOCAL_MODULE_TAGS := optional
|
|
||||||
LOCAL_MODULE_CLASS := ETC
|
LOCAL_MODULE_CLASS := ETC
|
||||||
LOCAL_SRC_FILES := etc/init.custom.rc
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init
|
LOCAL_MODULE_STEM := ueventd.rc
|
||||||
include $(BUILD_PREBUILT)
|
LOCAL_SRC_FILES := etc/$(LOCAL_MODULE)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := init.power.rc
|
|
||||||
LOCAL_MODULE_TAGS := optional
|
|
||||||
LOCAL_MODULE_CLASS := ETC
|
|
||||||
LOCAL_SRC_FILES := etc/init.power.rc
|
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init
|
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
111
rootdir/etc/Android.bp
Normal file
111
rootdir/etc/Android.bp
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "fstab.qcom",
|
||||||
|
src: "fstab.qcom",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.qcom.rc",
|
||||||
|
src: "init.qcom.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.qcom.usb.rc",
|
||||||
|
src: "init.qcom.usb.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.custom.rc",
|
||||||
|
src: "init.custom.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.fpc.rc",
|
||||||
|
src: "init.fpc.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.lenovo.common.rc",
|
||||||
|
src: "init.lenovo.common.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.lenovo.rc",
|
||||||
|
src: "init.lenovo.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.lenovo.usb.configfs.rc",
|
||||||
|
src: "init.lenovo.usb.configfs.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.power.rc",
|
||||||
|
src: "init.power.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.target.rc",
|
||||||
|
src: "init.target.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.msm.usb.configfs.rc",
|
||||||
|
src: "init.msm.usb.configfs.rc",
|
||||||
|
sub_dir: "init/hw",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
sh_binary {
|
||||||
|
name: "init.class_main.sh",
|
||||||
|
src: "init.class_main.sh",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
sh_binary {
|
||||||
|
name: "init.qcom.early_boot.sh",
|
||||||
|
src: "init.qcom.early_boot.sh",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
sh_binary {
|
||||||
|
name: "init.qcom.post_boot.sh",
|
||||||
|
src: "init.qcom.post_boot.sh",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
sh_binary {
|
||||||
|
name: "init.qcom.sh",
|
||||||
|
src: "init.qcom.sh",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
sh_binary {
|
||||||
|
name: "init.qcom.usb.sh",
|
||||||
|
src: "init.qcom.usb.sh",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
sh_binary {
|
||||||
|
name: "init.qcom.sensors.sh",
|
||||||
|
src: "init.qcom.sensors.sh",
|
||||||
|
vendor: true,
|
||||||
|
}
|
22
rootdir/etc/fstab.qcom
Normal file
22
rootdir/etc/fstab.qcom
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Android fstab file.
|
||||||
|
# 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
|
||||||
|
|
||||||
|
#TODO: Add 'check' as fs_mgr_flags with data partition.
|
||||||
|
# Currently we dont have e2fsck compiled. So fs check would failed.
|
||||||
|
|
||||||
|
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||||
|
/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,avb
|
||||||
|
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,noatime,nodev,barrier=1,noauto_da_alloc,discard,lazytime latemount,wait,check,forceencrypt=footer,quota,reservedsize=128M
|
||||||
|
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,noatime,nodev,barrier=1 wait
|
||||||
|
/devices/platform/soc/8804000.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer
|
||||||
|
/devices/platform/soc/1da4000.ufshc_card/host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer
|
||||||
|
/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
|
||||||
|
/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait
|
||||||
|
/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 nosuid,noatime,nodev,barrier=1 wait
|
||||||
|
/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait
|
||||||
|
# Need to have this entry in here even though the mount point itself is no longer needed.
|
||||||
|
# The update_engine code looks for this entry in order to determine the boot device address
|
||||||
|
# and fails if it does not find it.
|
||||||
|
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
|
||||||
|
/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.*.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
|
153
rootdir/etc/init.class_main.sh
Executable file
153
rootdir/etc/init.class_main.sh
Executable file
|
@ -0,0 +1,153 @@
|
||||||
|
#! /vendor/bin/sh
|
||||||
|
|
||||||
|
# Copyright (c) 2013-2014, 2019 The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# start ril-daemon only for targets on which radio is present
|
||||||
|
#
|
||||||
|
baseband=`getprop ro.baseband`
|
||||||
|
sgltecsfb=`getprop persist.vendor.radio.sglte_csfb`
|
||||||
|
datamode=`getprop persist.vendor.data.mode`
|
||||||
|
qcrild_status=true
|
||||||
|
|
||||||
|
case "$baseband" in
|
||||||
|
"apq" | "sda" | "qcs" )
|
||||||
|
setprop ro.vendor.radio.noril yes
|
||||||
|
stop ril-daemon
|
||||||
|
stop vendor.ril-daemon
|
||||||
|
stop vendor.qcrild
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$baseband" in
|
||||||
|
"msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6")
|
||||||
|
|
||||||
|
# For older modem packages launch ril-daemon.
|
||||||
|
if [ -f /vendor/firmware_mnt/verinfo/ver_info.txt ]; then
|
||||||
|
modem=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
|
||||||
|
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||||
|
sed 's/.*MPSS.\(.*\)/\1/g' | cut -d \. -f 1`
|
||||||
|
if [ "$modem" = "AT" ]; then
|
||||||
|
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
|
||||||
|
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||||
|
sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1`
|
||||||
|
if [ ! -z $version ]; then
|
||||||
|
if [ "$version" \< "3.1" ]; then
|
||||||
|
qcrild_status=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [ "$modem" = "TA" ]; then
|
||||||
|
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
|
||||||
|
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||||
|
sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1`
|
||||||
|
if [ ! -z $version ]; then
|
||||||
|
if [ "$version" \< "3.0" ]; then
|
||||||
|
qcrild_status=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [ "$modem" = "JO" ]; then
|
||||||
|
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
|
||||||
|
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
|
||||||
|
sed 's/.*JO.\(.*\)/\1/g' | cut -d \- -f 1`
|
||||||
|
if [ ! -z $version ]; then
|
||||||
|
if [ "$version" \< "3.2" ]; then
|
||||||
|
qcrild_status=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [ "$modem" = "TH" ]; then
|
||||||
|
qcrild_status=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$qcrild_status" = "true" ]; then
|
||||||
|
# Make sure both rild, qcrild are not running at same time.
|
||||||
|
# This is possible with vanilla aosp system image.
|
||||||
|
stop ril-daemon
|
||||||
|
stop vendor.ril-daemon
|
||||||
|
|
||||||
|
start vendor.qcrild
|
||||||
|
else
|
||||||
|
start ril-daemon
|
||||||
|
start vendor.ril-daemon
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$baseband" in
|
||||||
|
"svlte2a" | "csfb")
|
||||||
|
start qmiproxy
|
||||||
|
;;
|
||||||
|
"sglte" | "sglte2" )
|
||||||
|
if [ "x$sgltecsfb" != "xtrue" ]; then
|
||||||
|
start qmiproxy
|
||||||
|
else
|
||||||
|
setprop persist.vendor.radio.voice.modem.index 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
multisim=`getprop persist.radio.multisim.config`
|
||||||
|
|
||||||
|
if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
|
||||||
|
if [ "$qcrild_status" = "true" ]; then
|
||||||
|
start vendor.qcrild2
|
||||||
|
else
|
||||||
|
start vendor.ril-daemon2
|
||||||
|
fi
|
||||||
|
elif [ "$multisim" = "tsts" ]; then
|
||||||
|
if [ "$qcrild_status" = "true" ]; then
|
||||||
|
start vendor.qcrild2
|
||||||
|
start vendor.qcrild3
|
||||||
|
else
|
||||||
|
start vendor.ril-daemon2
|
||||||
|
start vendor.ril-daemon3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$datamode" in
|
||||||
|
"tethered")
|
||||||
|
start vendor.dataqti
|
||||||
|
start vendor.dataadpl
|
||||||
|
;;
|
||||||
|
"concurrent")
|
||||||
|
start vendor.dataqti
|
||||||
|
start vendor.dataadpl
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Allow persistent faking of bms
|
||||||
|
# User needs to set fake bms charge in persist.vendor.bms.fake_batt_capacity
|
||||||
|
#
|
||||||
|
fake_batt_capacity=`getprop persist.vendor.bms.fake_batt_capacity`
|
||||||
|
case "$fake_batt_capacity" in
|
||||||
|
"") ;; #Do nothing here
|
||||||
|
* )
|
||||||
|
echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity
|
||||||
|
;;
|
||||||
|
esac
|
10
rootdir/etc/init.fpc.rc
Normal file
10
rootdir/etc/init.fpc.rc
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
on post-fs-data
|
||||||
|
chown system system /sys/devices/platform/soc/soc:fpc1020/wakeup_enable
|
||||||
|
chown system system /sys/devices/platform/soc/soc:fpc1020/handle_wakelock
|
||||||
|
chown system system /sys/devices/platform/soc/soc:fpc1020/device_prepare
|
||||||
|
chown system system /sys/devices/platform/soc/soc:fpc1020/hw_reset
|
||||||
|
chown system system /sys/devices/platform/soc/soc:fpc1020/irq
|
||||||
|
chown system system /sys/devices/platform/soc/soc:fpc1020/regulator_enable
|
||||||
|
chown system system /sys/devices/platform/soc/soc:fpc1020/pinctl_set
|
||||||
|
chown system system /sys/devices/platform/soc/soc:fpc1020/clk_enable
|
||||||
|
|
18
rootdir/etc/init.lenovo.common.rc
Normal file
18
rootdir/etc/init.lenovo.common.rc
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# common config for all projects.
|
||||||
|
|
||||||
|
on post-fs
|
||||||
|
# Set dm-verity property for system partition
|
||||||
|
verity_update_state
|
||||||
|
|
||||||
|
on init
|
||||||
|
chown system system /sys/class/leds/led:rgb_red/brightness
|
||||||
|
chmod 0660 /sys/class/leds/led:rgb_red/brightness
|
||||||
|
chown system system /sys/class/leds/led:rgb_green/brightness
|
||||||
|
chmod 0660 /sys/class/leds/led:rgb_green/brightness
|
||||||
|
chown system system /sys/class/leds/led:rgb_blue/brightness
|
||||||
|
chmod 0660 /sys/class/leds/led:rgb_blue/brightness
|
||||||
|
chown system system /sys/class/leds/led:rgb_blue/blink
|
||||||
|
chmod 0660 /sys/class/leds/led:rgb_blue/blink
|
||||||
|
chown system system /sys/class/leds/red/blink
|
||||||
|
chown system system /sys/class/leds/green/blink
|
||||||
|
chown system system /sys/class/leds/blue/blink
|
14
rootdir/etc/init.lenovo.rc
Normal file
14
rootdir/etc/init.lenovo.rc
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import /vendor/etc/init/hw/init.lenovo.common.rc
|
||||||
|
|
||||||
|
on init
|
||||||
|
# added touch gesture wake node permission
|
||||||
|
chown system /sys/devices/virtual/touch/tp_dev/gesture_on
|
||||||
|
chown system /sys/devices/virtual/touch/tp_dev/tp_screen_switch
|
||||||
|
|
||||||
|
on boot
|
||||||
|
chown gps gps /sys/ontim_bootinfo/gps_lna
|
||||||
|
chown gps gps /sys/ontim_bootinfo/gps_avdd_en
|
||||||
|
chown gps gps /sys/ontim_bootinfo/gps_reset
|
||||||
|
chown gps gps /sys/ontim_bootinfo/gps_prtrg
|
||||||
|
|
||||||
|
|
55
rootdir/etc/init.lenovo.usb.configfs.rc
Normal file
55
rootdir/etc/init.lenovo.usb.configfs.rc
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# Lenovo USB config compositions
|
||||||
|
|
||||||
|
on property:sys.usb.config=charge && property:sys.usb.configfs=0
|
||||||
|
write /sys/class/android_usb/android0/enable 0
|
||||||
|
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||||
|
write /sys/class/android_usb/android0/idVendor 17EF
|
||||||
|
write /sys/class/android_usb/android0/idProduct 7B8F
|
||||||
|
write /sys/class/android_usb/android0/functions mass_storage
|
||||||
|
write /sys/class/android_usb/android0/enable 1
|
||||||
|
setprop sys.usb.state ${sys.usb.config}
|
||||||
|
|
||||||
|
on property:sys.usb.config=charge && property:sys.usb.configfs=1
|
||||||
|
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Lenovo Charger Only"
|
||||||
|
write /config/usb_gadget/g1/idVendor 0x17EF
|
||||||
|
write /config/usb_gadget/g1/idProduct 0x7B8F
|
||||||
|
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
|
||||||
|
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||||
|
setprop sys.usb.state ${sys.usb.config}
|
||||||
|
|
||||||
|
on property:sys.usb.config=charger_storage && property:sys.usb.configfs=1
|
||||||
|
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Lenovo Charger Only"
|
||||||
|
rm /config/usb_gadget/g1/configs/b.1/f1
|
||||||
|
rm /config/usb_gadget/g1/configs/b.1/f2
|
||||||
|
rm /config/usb_gadget/g1/configs/b.1/f3
|
||||||
|
rm /config/usb_gadget/g1/configs/b.1/f4
|
||||||
|
rm /config/usb_gadget/g1/configs/b.1/f5
|
||||||
|
rm /config/usb_gadget/g1/configs/b.1/f6
|
||||||
|
rm /config/usb_gadget/g1/configs/b.1/f7
|
||||||
|
rm /config/usb_gadget/g1/configs/b.1/f8
|
||||||
|
rm /config/usb_gadget/g1/configs/b.1/f9
|
||||||
|
write /config/usb_gadget/g1/idVendor 0x17EF
|
||||||
|
write /config/usb_gadget/g1/idProduct 0x7B8F
|
||||||
|
symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f1
|
||||||
|
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||||
|
setprop sys.usb.state ${sys.usb.config}
|
||||||
|
|
||||||
|
on property:sys.usb.config=adb && property:sys.usb.configfs=1
|
||||||
|
write /config/usb_gadget/g1/idVendor 0x17EF
|
||||||
|
write /config/usb_gadget/g1/idProduct 0x7B8E
|
||||||
|
|
||||||
|
on property:sys.usb.config=mtp && property:sys.usb.configfs=1
|
||||||
|
write /config/usb_gadget/g1/idVendor 0x17EF
|
||||||
|
write /config/usb_gadget/g1/idProduct 0x7B76
|
||||||
|
|
||||||
|
on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
|
||||||
|
write /config/usb_gadget/g1/idVendor 0x17EF
|
||||||
|
write /config/usb_gadget/g1/idProduct 0x7B77
|
||||||
|
|
||||||
|
on property:sys.usb.config=ptp && property:sys.usb.configfs=1
|
||||||
|
write /config/usb_gadget/g1/idVendor 0x17EF
|
||||||
|
write /config/usb_gadget/g1/idProduct 0x7B78
|
||||||
|
|
||||||
|
on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
|
||||||
|
write /config/usb_gadget/g1/idVendor 0x17EF
|
||||||
|
write /config/usb_gadget/g1/idProduct 0x7B79
|
1393
rootdir/etc/init.msm.usb.configfs.rc
Normal file
1393
rootdir/etc/init.msm.usb.configfs.rc
Normal file
File diff suppressed because it is too large
Load diff
466
rootdir/etc/init.qcom.early_boot.sh
Executable file
466
rootdir/etc/init.qcom.early_boot.sh
Executable file
|
@ -0,0 +1,466 @@
|
||||||
|
#! /vendor/bin/sh
|
||||||
|
|
||||||
|
# Copyright (c) 2012-2013,2016,2018,2019 The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
export PATH=/vendor/bin
|
||||||
|
|
||||||
|
# Set platform variables
|
||||||
|
if [ -f /sys/devices/soc0/hw_platform ]; then
|
||||||
|
soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
|
||||||
|
else
|
||||||
|
soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
|
||||||
|
fi
|
||||||
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
|
soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
|
||||||
|
else
|
||||||
|
soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
|
||||||
|
fi
|
||||||
|
if [ -f /sys/devices/soc0/platform_version ]; then
|
||||||
|
soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
|
||||||
|
else
|
||||||
|
soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /sys/class/drm/card0-DSI-1/modes ]; then
|
||||||
|
echo "detect" > /sys/class/drm/card0-DSI-1/status
|
||||||
|
mode_file=/sys/class/drm/card0-DSI-1/modes
|
||||||
|
while read line; do
|
||||||
|
fb_width=${line%%x*};
|
||||||
|
break;
|
||||||
|
done < $mode_file
|
||||||
|
elif [ -f /sys/class/graphics/fb0/virtual_size ]; then
|
||||||
|
res=`cat /sys/class/graphics/fb0/virtual_size` 2> /dev/null
|
||||||
|
fb_width=${res%,*}
|
||||||
|
fi
|
||||||
|
|
||||||
|
log -t BOOT -p i "MSM target '$1', SoC '$soc_hwplatform', HwID '$soc_hwid', SoC ver '$soc_hwver'"
|
||||||
|
|
||||||
|
#For drm based display driver
|
||||||
|
vbfile=/sys/module/drm/parameters/vblankoffdelay
|
||||||
|
if [ -w $vbfile ]; then
|
||||||
|
echo -1 > $vbfile
|
||||||
|
else
|
||||||
|
log -t DRM_BOOT -p w "file: '$vbfile' or perms doesn't exist"
|
||||||
|
fi
|
||||||
|
|
||||||
|
function set_density_by_fb() {
|
||||||
|
#put default density based on width
|
||||||
|
if [ -z $fb_width ]; then
|
||||||
|
setprop vendor.display.lcd_density 320
|
||||||
|
else
|
||||||
|
if [ $fb_width -ge 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
elif [ $fb_width -ge 1440 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
elif [ $fb_width -ge 1080 ]; then
|
||||||
|
setprop vendor.display.lcd_density 480
|
||||||
|
elif [ $fb_width -ge 720 ]; then
|
||||||
|
setprop vendor.display.lcd_density 320 #for 720X1280 resolution
|
||||||
|
elif [ $fb_width -ge 480 ]; then
|
||||||
|
setprop vendor.display.lcd_density 240 #for 480X854 QRD resolution
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
target=`getprop ro.board.platform`
|
||||||
|
case "$target" in
|
||||||
|
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"FFA" | "SVLTE_FFA")
|
||||||
|
# linking to surf_keypad_qwerty.kcm.bin instead of surf_keypad_numeric.kcm.bin so that
|
||||||
|
# the UI keyboard works fine.
|
||||||
|
ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
|
||||||
|
;;
|
||||||
|
"Fluid")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
setprop qcom.bt.dev_power_class 2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"sm6150")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"ADP")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$soc_hwid" in
|
||||||
|
365|366)
|
||||||
|
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
if [ $sku_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
355|369|377|384)
|
||||||
|
setprop vendor.chre.enabled 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8660")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Fluid")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
"Dragon")
|
||||||
|
setprop ro.sound.alsa "WM8903"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
"msm8960")
|
||||||
|
# lcd density is write-once. Hence the separate switch case
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Liquid")
|
||||||
|
if [ "$soc_hwver" == "196608" ]; then # version 0x30000 is 3D sku
|
||||||
|
setprop ro.sf.hwrotation 90
|
||||||
|
fi
|
||||||
|
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
"MTP")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case "$soc_hwid" in
|
||||||
|
"109")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#Set up composition type based on the target
|
||||||
|
case "$soc_hwid" in
|
||||||
|
87)
|
||||||
|
#8960
|
||||||
|
setprop debug.composition.type dyn
|
||||||
|
;;
|
||||||
|
153|154|155|156|157|138)
|
||||||
|
#8064 V2 PRIME | 8930AB | 8630AB | 8230AB | 8030AB | 8960AB
|
||||||
|
setprop debug.composition.type c2d
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
"msm8974")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Liquid")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
# Liquid do not have hardware navigation keys, so enable
|
||||||
|
# Android sw navigation bar
|
||||||
|
setprop ro.hw.nav_keys 0
|
||||||
|
;;
|
||||||
|
"Dragon")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 320
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
"msm8226")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 320
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
"msm8610" | "apq8084" | "mpq8092")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"apq8084")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Liquid")
|
||||||
|
setprop vendor.display.lcd_density 320
|
||||||
|
# Liquid do not have hardware navigation keys, so enable
|
||||||
|
# Android sw navigation bar
|
||||||
|
setprop ro.hw.nav_keys 0
|
||||||
|
;;
|
||||||
|
"SBC")
|
||||||
|
setprop vendor.display.lcd_density 200
|
||||||
|
# SBC do not have hardware navigation keys, so enable
|
||||||
|
# Android sw navigation bar
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 480
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8996")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Dragon")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"ADP")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
"SBC")
|
||||||
|
setprop vendor.display.lcd_density 240
|
||||||
|
setprop qemu.hw.mainkeys 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8937" | "msm8940")
|
||||||
|
# Set vendor.opengles.version based on chip id.
|
||||||
|
# MSM8937 and MSM8940 variants supports OpenGLES 3.1
|
||||||
|
# 196608 is decimal for 0x30000 to report version 3.0
|
||||||
|
# 196609 is decimal for 0x30001 to report version 3.1
|
||||||
|
# 196610 is decimal for 0x30002 to report version 3.2
|
||||||
|
case "$soc_hwid" in
|
||||||
|
294|295|296|297|298|313|353|354|363|364)
|
||||||
|
setprop vendor.opengles.version 196610
|
||||||
|
if [ $soc_hwid = 354 ]
|
||||||
|
then
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
log -t BOOT -p i "SDM429 early_boot prop set for: HwID '$soc_hwid'"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
303|307|308|309|320)
|
||||||
|
# Vulkan is not supported for 8917 variants
|
||||||
|
setprop vendor.opengles.version 196608
|
||||||
|
setprop persist.graphics.vulkan.disable true
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop vendor.opengles.version 196608
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8909")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
setprop persist.graphics.vulkan.disable true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8998" | "apq8098_latv")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"sdm845")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
if [ $fb_width -le 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msmnile")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
if [ $fb_width -le 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"kona")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
if [ $fb_width -le 1600 ]; then
|
||||||
|
setprop vendor.display.lcd_density 560
|
||||||
|
else
|
||||||
|
setprop vendor.display.lcd_density 640
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"lito")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
|
||||||
|
if [ $sku_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"sdm710" | "msmpeafowl")
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
*)
|
||||||
|
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
|
||||||
|
if [ $sku_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"msm8953")
|
||||||
|
cap_ver = 1
|
||||||
|
if [ -e "/sys/devices/platform/soc/1d00000.qcom,vidc/capability_version" ]; then
|
||||||
|
cap_ver=`cat /sys/devices/platform/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
|
||||||
|
else
|
||||||
|
cap_ver=`cat /sys/devices/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $cap_ver -eq 1 ]; then
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
#Set property to differentiate SDM660 & SDM455
|
||||||
|
#SOC ID for SDM455 is 385
|
||||||
|
"sdm660")
|
||||||
|
case "$soc_hwid" in
|
||||||
|
385)
|
||||||
|
setprop vendor.media.target.version 1
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
baseband=`getprop ro.baseband`
|
||||||
|
#enable atfwd daemon all targets except sda, apq, qcs
|
||||||
|
case "$baseband" in
|
||||||
|
"apq" | "sda" | "qcs" )
|
||||||
|
setprop persist.vendor.radio.atfwd.start false;;
|
||||||
|
*)
|
||||||
|
setprop persist.vendor.radio.atfwd.start true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#set default lcd density
|
||||||
|
#Since lcd density has read only
|
||||||
|
#property, it will not overwrite previous set
|
||||||
|
#property if any target is setting forcefully.
|
||||||
|
set_density_by_fb
|
||||||
|
|
||||||
|
|
||||||
|
# set Lilliput LCD density for ADP
|
||||||
|
product=`getprop ro.build.product`
|
||||||
|
|
||||||
|
case "$product" in
|
||||||
|
"msmnile_au")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
echo 902400000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq
|
||||||
|
echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/max_freq
|
||||||
|
echo 902400000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/min_freq
|
||||||
|
echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/max_freq
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$product" in
|
||||||
|
"sm6150_au")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$product" in
|
||||||
|
"sdmshrike_au")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
echo 940800000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq
|
||||||
|
echo 940800000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/min_freq
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$product" in
|
||||||
|
"msmnile_gvmq")
|
||||||
|
setprop vendor.display.lcd_density 160
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# Setup display nodes & permissions
|
||||||
|
# HDMI can be fb1 or fb2
|
||||||
|
# Loop through the sysfs nodes and determine
|
||||||
|
# the HDMI(dtv panel)
|
||||||
|
|
||||||
|
function set_perms() {
|
||||||
|
#Usage set_perms <filename> <ownership> <permission>
|
||||||
|
chown -h $2 $1
|
||||||
|
chmod $3 $1
|
||||||
|
}
|
||||||
|
|
||||||
|
# check for the type of driver FB or DRM
|
||||||
|
fb_driver=/sys/class/graphics/fb0
|
||||||
|
if [ -e "$fb_driver" ]
|
||||||
|
then
|
||||||
|
# check for mdp caps
|
||||||
|
file=/sys/class/graphics/fb0/mdp/caps
|
||||||
|
if [ -f "$file" ]
|
||||||
|
then
|
||||||
|
setprop vendor.gralloc.disable_ubwc 1
|
||||||
|
cat $file | while read line; do
|
||||||
|
case "$line" in
|
||||||
|
*"ubwc"*)
|
||||||
|
setprop vendor.gralloc.enable_fb_ubwc 1
|
||||||
|
setprop vendor.gralloc.disable_ubwc 0
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
set_perms /sys/devices/virtual/hdcp/msm_hdcp/min_level_change system.graphics 0660
|
||||||
|
fi
|
||||||
|
|
||||||
|
# allow system_graphics group to access pmic secure_mode node
|
||||||
|
set_perms /sys/class/lcd_bias/secure_mode system.graphics 0660
|
||||||
|
set_perms /sys/class/leds/wled/secure_mode system.graphics 0660
|
||||||
|
|
||||||
|
boot_reason=`cat /proc/sys/kernel/boot_reason`
|
||||||
|
reboot_reason=`getprop ro.boot.alarmboot`
|
||||||
|
if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then
|
||||||
|
setprop ro.vendor.alarm_boot true
|
||||||
|
else
|
||||||
|
setprop ro.vendor.alarm_boot false
|
||||||
|
fi
|
||||||
|
|
||||||
|
# copy GPU frequencies to vendor property
|
||||||
|
if [ -f /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies ]; then
|
||||||
|
gpu_freq=`cat /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies` 2> /dev/null
|
||||||
|
setprop vendor.gpu.available_frequencies "$gpu_freq"
|
||||||
|
fi
|
5259
rootdir/etc/init.qcom.post_boot.sh
Executable file
5259
rootdir/etc/init.qcom.post_boot.sh
Executable file
File diff suppressed because it is too large
Load diff
1167
rootdir/etc/init.qcom.rc
Normal file
1167
rootdir/etc/init.qcom.rc
Normal file
File diff suppressed because it is too large
Load diff
45
rootdir/etc/init.qcom.sensors.sh
Executable file
45
rootdir/etc/init.qcom.sensors.sh
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/vendor/bin/sh
|
||||||
|
# Copyright (c) 2015,2018 The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Function to start sensors for SSC enabled platforms
|
||||||
|
#
|
||||||
|
start_sensors()
|
||||||
|
{
|
||||||
|
|
||||||
|
chmod -h 664 /persist/sensors/sensors_settings
|
||||||
|
chown -h -R system.system /persist/sensors
|
||||||
|
start vendor.sensors.qti
|
||||||
|
|
||||||
|
# Only for SLPI
|
||||||
|
if [ -c /dev/msm_dsps -o -c /dev/sensors ] ; then
|
||||||
|
start vendor.sensors
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_sensors
|
465
rootdir/etc/init.qcom.sh
Executable file
465
rootdir/etc/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 "6 6 1 7" > /proc/sys/kernel/printk
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
#set default loglevel to KERN_WARNING
|
||||||
|
echo "4 4 1 4" > /proc/sys/kernel/printk
|
||||||
|
;;
|
||||||
|
esac
|
1670
rootdir/etc/init.qcom.usb.rc
Normal file
1670
rootdir/etc/init.qcom.usb.rc
Normal file
File diff suppressed because it is too large
Load diff
244
rootdir/etc/init.qcom.usb.sh
Executable file
244
rootdir/etc/init.qcom.usb.sh
Executable file
|
@ -0,0 +1,244 @@
|
||||||
|
#!/vendor/bin/sh
|
||||||
|
# Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are
|
||||||
|
# met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived
|
||||||
|
# from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||||
|
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||||
|
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||||
|
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set platform variables
|
||||||
|
soc_hwplatform=`cat /sys/devices/soc0/hw_platform 2> /dev/null`
|
||||||
|
soc_machine=`cat /sys/devices/soc0/machine 2> /dev/null`
|
||||||
|
soc_machine=${soc_machine:0:2}
|
||||||
|
soc_id=`cat /sys/devices/soc0/soc_id 2> /dev/null`
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check ESOC for external modem
|
||||||
|
#
|
||||||
|
# Note: currently only a single MDM/SDX is supported
|
||||||
|
#
|
||||||
|
esoc_name=`cat /sys/bus/esoc/devices/esoc0/esoc_name 2> /dev/null`
|
||||||
|
|
||||||
|
target=`getprop ro.board.platform`
|
||||||
|
|
||||||
|
if [ -f /sys/class/android_usb/f_mass_storage/lun/nofua ]; then
|
||||||
|
echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Override USB default composition
|
||||||
|
#
|
||||||
|
# If USB persist config not set, set default configuration
|
||||||
|
build_type=`getprop ro.build.type`
|
||||||
|
if [ "$(getprop persist.vendor.usb.config)" == "" -a \
|
||||||
|
"$(getprop init.svc.vendor.usb-gadget-hal-1-0)" != "running" ]; then
|
||||||
|
if [ "$esoc_name" != "" ]; then
|
||||||
|
setprop persist.vendor.usb.config diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb
|
||||||
|
else
|
||||||
|
case "$(getprop ro.baseband)" in
|
||||||
|
"apq")
|
||||||
|
setprop persist.vendor.usb.config diag,adb
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case "$soc_hwplatform" in
|
||||||
|
"Dragon" | "SBC")
|
||||||
|
setprop persist.vendor.usb.config diag,adb
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case "$soc_machine" in
|
||||||
|
"SA")
|
||||||
|
setprop persist.vendor.usb.config diag,adb
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case "$target" in
|
||||||
|
"msm8996")
|
||||||
|
setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
|
||||||
|
;;
|
||||||
|
"msm8909")
|
||||||
|
setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
|
||||||
|
;;
|
||||||
|
"msm8937")
|
||||||
|
if [ -d /config/usb_gadget ]; then
|
||||||
|
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
|
||||||
|
else
|
||||||
|
case "$soc_id" in
|
||||||
|
"313" | "320")
|
||||||
|
setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"msm8953")
|
||||||
|
if [ -d /config/usb_gadget ]; then
|
||||||
|
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
|
||||||
|
else
|
||||||
|
setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"msm8998" | "sdm660" | "apq8098_latv")
|
||||||
|
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb
|
||||||
|
;;
|
||||||
|
"sdm845" | "sdm710")
|
||||||
|
if [ "$build_type" != "user" ]; then
|
||||||
|
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"msmnile" | "sm6150" | "trinket" | "lito" | "atoll")
|
||||||
|
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
|
||||||
|
|
||||||
|
# Start peripheral mode on primary USB controllers for Automotive platforms
|
||||||
|
case "$soc_machine" in
|
||||||
|
"SA")
|
||||||
|
if [ -f /sys/bus/platform/devices/a600000.ssusb/mode ]; then
|
||||||
|
default_mode=`cat /sys/bus/platform/devices/a600000.ssusb/mode`
|
||||||
|
case "$default_mode" in
|
||||||
|
"none")
|
||||||
|
echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# set rndis transport to BAM2BAM_IPA for 8920 and 8940
|
||||||
|
if [ "$target" == "msm8937" ]; then
|
||||||
|
if [ ! -d /config/usb_gadget ]; then
|
||||||
|
case "$soc_id" in
|
||||||
|
"313" | "320")
|
||||||
|
echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check configfs is mounted or not
|
||||||
|
if [ -d /config/usb_gadget ]; then
|
||||||
|
# Chip-serial is used for unique MSM identification in Product string
|
||||||
|
product_usb=`cat /config/usb_gadget/g1/strings/0x409/product` 2> /dev/null
|
||||||
|
if [ "$product_usb" == "" ]; then
|
||||||
|
msm_serial=`cat /sys/devices/soc0/serial_number`;
|
||||||
|
msm_serial_hex=`printf %08X $msm_serial`
|
||||||
|
machine_type=`cat /sys/devices/soc0/machine`
|
||||||
|
product_string="$machine_type-$soc_hwplatform _SN:$msm_serial_hex"
|
||||||
|
echo "$product_string" > /config/usb_gadget/g1/strings/0x409/product
|
||||||
|
fi
|
||||||
|
# ADB requires valid iSerialNumber; if ro.serialno is missing, use dummy
|
||||||
|
serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber 2> /dev/null`
|
||||||
|
if [ "$serialnumber" == "" ]; then
|
||||||
|
serialno=1234567
|
||||||
|
echo $serialno > /config/usb_gadget/g1/strings/0x409/serialnumber
|
||||||
|
fi
|
||||||
|
setprop vendor.usb.configfs 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Initialize RNDIS Diag option. If unset, set it to 'none'.
|
||||||
|
#
|
||||||
|
diag_extra=`getprop persist.vendor.usb.config.extra`
|
||||||
|
if [ "$diag_extra" == "" ]; then
|
||||||
|
setprop persist.vendor.usb.config.extra none
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable rps cpus on msm8937 target
|
||||||
|
setprop vendor.usb.rps_mask 0
|
||||||
|
case "$soc_id" in
|
||||||
|
"294" | "295" | "353" | "354")
|
||||||
|
setprop vendor.usb.rps_mask 40
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Initialize UVC conifguration.
|
||||||
|
#
|
||||||
|
if [ -d /config/usb_gadget/g1/functions/uvc.0 ]; then
|
||||||
|
cd /config/usb_gadget/g1/functions/uvc.0
|
||||||
|
|
||||||
|
echo 3072 > streaming_maxpacket
|
||||||
|
echo 1 > streaming_maxburst
|
||||||
|
mkdir control/header/h
|
||||||
|
ln -s control/header/h control/class/fs/
|
||||||
|
ln -s control/header/h control/class/ss
|
||||||
|
|
||||||
|
mkdir -p streaming/uncompressed/u/360p
|
||||||
|
echo "666666\n1000000\n5000000\n" > streaming/uncompressed/u/360p/dwFrameInterval
|
||||||
|
|
||||||
|
mkdir -p streaming/uncompressed/u/720p
|
||||||
|
echo 1280 > streaming/uncompressed/u/720p/wWidth
|
||||||
|
echo 720 > streaming/uncompressed/u/720p/wWidth
|
||||||
|
echo 29491200 > streaming/uncompressed/u/720p/dwMinBitRate
|
||||||
|
echo 29491200 > streaming/uncompressed/u/720p/dwMaxBitRate
|
||||||
|
echo 1843200 > streaming/uncompressed/u/720p/dwMaxVideoFrameBufferSize
|
||||||
|
echo 5000000 > streaming/uncompressed/u/720p/dwDefaultFrameInterval
|
||||||
|
echo "5000000\n" > streaming/uncompressed/u/720p/dwFrameInterval
|
||||||
|
|
||||||
|
mkdir -p streaming/mjpeg/m/360p
|
||||||
|
echo "666666\n1000000\n5000000\n" > streaming/mjpeg/m/360p/dwFrameInterval
|
||||||
|
|
||||||
|
mkdir -p streaming/mjpeg/m/720p
|
||||||
|
echo 1280 > streaming/mjpeg/m/720p/wWidth
|
||||||
|
echo 720 > streaming/mjpeg/m/720p/wWidth
|
||||||
|
echo 29491200 > streaming/mjpeg/m/720p/dwMinBitRate
|
||||||
|
echo 29491200 > streaming/mjpeg/m/720p/dwMaxBitRate
|
||||||
|
echo 1843200 > streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize
|
||||||
|
echo 5000000 > streaming/mjpeg/m/720p/dwDefaultFrameInterval
|
||||||
|
echo "5000000\n" > streaming/mjpeg/m/720p/dwFrameInterval
|
||||||
|
|
||||||
|
echo 0x04 > /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmaControls
|
||||||
|
|
||||||
|
mkdir -p streaming/h264/h/960p
|
||||||
|
echo 1920 > streaming/h264/h/960p/wWidth
|
||||||
|
echo 960 > streaming/h264/h/960p/wWidth
|
||||||
|
echo 40 > streaming/h264/h/960p/bLevelIDC
|
||||||
|
echo "333667\n" > streaming/h264/h/960p/dwFrameInterval
|
||||||
|
|
||||||
|
mkdir -p streaming/h264/h/1920p
|
||||||
|
echo "333667\n" > streaming/h264/h/1920p/dwFrameInterval
|
||||||
|
|
||||||
|
mkdir streaming/header/h
|
||||||
|
ln -s streaming/uncompressed/u streaming/header/h
|
||||||
|
ln -s streaming/mjpeg/m streaming/header/h
|
||||||
|
ln -s streaming/h264/h streaming/header/h
|
||||||
|
ln -s streaming/header/h streaming/class/fs/
|
||||||
|
ln -s streaming/header/h streaming/class/hs/
|
||||||
|
ln -s streaming/header/h streaming/class/ss/
|
||||||
|
fi
|
446
rootdir/etc/init.target.rc
Normal file
446
rootdir/etc/init.target.rc
Normal file
|
@ -0,0 +1,446 @@
|
||||||
|
# Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are
|
||||||
|
# met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived
|
||||||
|
# from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||||
|
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||||
|
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||||
|
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
import /vendor/etc/init/hw/init.fpc.rc
|
||||||
|
|
||||||
|
on early-init
|
||||||
|
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules audio_apr audio_wglink audio_adsp_loader audio_q6_pdr audio_q6_notifier audio_q6 audio_usf audio_native audio_pinctrl_wcd audio_pinctrl_lpi audio_swr audio_tfa9874 audio_igo1201 audio_cs35l41 audio_platform audio_hdmi audio_wcd_spi audio_stub audio_digital_cdc audio_analog_cdc audio_msm_sdw audio_wcd_cpe audio_cpe_lsm audio_wcd9335 audio_machine_sdm710
|
||||||
|
write /proc/sys/kernel/sched_boost 1
|
||||||
|
mkdir /firmware 0771 system system
|
||||||
|
mkdir /bt_firmware 0771 system system
|
||||||
|
mkdir /dsp 0771 media media
|
||||||
|
symlink /data/tombstones /tombstones
|
||||||
|
|
||||||
|
on init
|
||||||
|
write /dev/stune/foreground/schedtune.sched_boost_no_override 1
|
||||||
|
write /dev/stune/top-app/schedtune.sched_boost_no_override 1
|
||||||
|
write /dev/stune/schedtune.colocate 0
|
||||||
|
write /dev/stune/background/schedtune.colocate 0
|
||||||
|
write /dev/stune/system-background/schedtune.colocate 0
|
||||||
|
write /dev/stune/foreground/schedtune.colocate 0
|
||||||
|
write /dev/stune/top-app/schedtune.colocate 1
|
||||||
|
write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
|
||||||
|
|
||||||
|
on fs
|
||||||
|
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
||||||
|
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
|
||||||
|
mount_all /vendor/etc/fstab.qcom --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
|
||||||
|
|
||||||
|
write /dev/ipa 1
|
||||||
|
|
||||||
|
service sec_nvm /vendor/bin/sec_nvm
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
|
||||||
|
on late-fs
|
||||||
|
mount_all /vendor/etc/fstab.qcom --late
|
||||||
|
|
||||||
|
on post-fs-data
|
||||||
|
mkdir /data/tombstones 0771 system system
|
||||||
|
mkdir /tombstones/modem 0771 system system
|
||||||
|
mkdir /tombstones/lpass 0771 system system
|
||||||
|
mkdir /tombstones/wcnss 0771 system system
|
||||||
|
mkdir /tombstones/dsps 0771 system system
|
||||||
|
mkdir /data/vendor/hbtp 0750 system system
|
||||||
|
mkdir /data/vendor/nnhal 0700 system system
|
||||||
|
|
||||||
|
# For cpusets initialize for Silver Only first and then Silver + Gold
|
||||||
|
# Silver Only configuration cannot work with 0-7
|
||||||
|
on boot
|
||||||
|
chown system system /sys/kernel/hbtp/display_pwr
|
||||||
|
start rmt_storage
|
||||||
|
start rfs_access
|
||||||
|
write /dev/cpuset/top-app/cpus 0-7
|
||||||
|
write /dev/cpuset/foreground/cpus 0-7
|
||||||
|
write /dev/cpuset/foreground/boost/cpus 0-7
|
||||||
|
write /dev/cpuset/background/cpus 0-7
|
||||||
|
write /dev/cpuset/system-background/cpus 0-7
|
||||||
|
|
||||||
|
# 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/mems 0
|
||||||
|
chown cameraserver cameraserver /dev/cpuset/camera-daemon
|
||||||
|
chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks
|
||||||
|
chmod 0660 /dev/cpuset/camera-daemon/tasks
|
||||||
|
|
||||||
|
#Load WLAN driver
|
||||||
|
insmod /vendor/lib/modules/qca_cld3_wlan.ko
|
||||||
|
|
||||||
|
####Regionalization config and prop files####
|
||||||
|
chmod 0644 /persist/speccfg/spec
|
||||||
|
chmod 0644 /persist/speccfg/devicetype
|
||||||
|
chmod 0644 /persist/speccfg/mbnversion
|
||||||
|
chmod 0644 /persist/speccfg/.not_triggered
|
||||||
|
chmod 0644 /persist/speccfg/vendor_ro.prop
|
||||||
|
chmod 0644 /persist/speccfg/vendor_persist.prop
|
||||||
|
chmod 0644 /persist/speccfg/submask
|
||||||
|
chmod 0644 /persist/speccfg/partition
|
||||||
|
chown system system /persist/speccfg/spec
|
||||||
|
chown system system /persist/speccfg/devicetype
|
||||||
|
chown system system /persist/speccfg/mbnversion
|
||||||
|
chown system system /persist/speccfg/.not_triggered
|
||||||
|
chown system system /persist/speccfg/vendor_ro.prop
|
||||||
|
chown system system /persist/speccfg/vendor_persist.prop
|
||||||
|
chown system system /persist/speccfg/submask
|
||||||
|
chown system system /persist/speccfg/partition
|
||||||
|
|
||||||
|
#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 sys.usb.configfs 1
|
||||||
|
|
||||||
|
#start camera server as daemon
|
||||||
|
#service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||||
|
# class late_start
|
||||||
|
# user camera
|
||||||
|
# group camera system inet input graphics
|
||||||
|
#pd-mapper
|
||||||
|
service vendor.pd_mapper /vendor/bin/pd-mapper
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
|
||||||
|
#Peripheral manager
|
||||||
|
service vendor.per_mgr /vendor/bin/pm-service
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
ioprio rt 4
|
||||||
|
|
||||||
|
service vendor.per_proxy /vendor/bin/pm-proxy
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:init.svc.vendor.per_mgr=running
|
||||||
|
start vendor.per_proxy
|
||||||
|
|
||||||
|
on property:sys.shutdown.requested=*
|
||||||
|
stop vendor.per_proxy
|
||||||
|
|
||||||
|
on boot
|
||||||
|
chown system system /sys/class/leds/red/blink
|
||||||
|
chown system system /sys/class/leds/green/blink
|
||||||
|
chown system system /sys/class/leds/blue/blink
|
||||||
|
|
||||||
|
on charger
|
||||||
|
setprop sys.usb.configfs 1
|
||||||
|
|
||||||
|
## import cne init file
|
||||||
|
#on post-fs
|
||||||
|
# export LD_PRELOAD /vendor/lib/libNimsWrap.so
|
||||||
|
#
|
||||||
|
## Allow usb charging to be disabled peristently
|
||||||
|
#on property:persist.usb.chgdisabled=1
|
||||||
|
# write /sys/class/power_supply/battery/charging_enabled 0
|
||||||
|
#
|
||||||
|
#on property:persist.usb.chgdisabled=0
|
||||||
|
# write /sys/class/power_supply/battery/charging_enabled 1
|
||||||
|
|
||||||
|
service spdaemon /vendor/bin/spdaemon
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
|
||||||
|
#service qosmgrd /system/bin/qosmgr /system/etc/qosmgr_rules.xml
|
||||||
|
# user system
|
||||||
|
# group system
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
service thermal-engine /system/vendor/bin/thermal-engine
|
||||||
|
class main
|
||||||
|
user root
|
||||||
|
socket thermal-send-client stream 0666 system system
|
||||||
|
socket thermal-recv-client stream 0660 system system
|
||||||
|
socket thermal-recv-passive-client stream 0666 system system
|
||||||
|
socket thermal-send-rule stream 0660 system system
|
||||||
|
group root
|
||||||
|
|
||||||
|
#service security-check1 /sbin/security_boot_check system
|
||||||
|
# class core
|
||||||
|
# oneshot
|
||||||
|
#
|
||||||
|
#service security-check2 /sbin/security_boot_check recovery
|
||||||
|
# class core
|
||||||
|
# oneshot
|
||||||
|
#
|
||||||
|
#service time_daemon /system/vendor/bin/time_daemon
|
||||||
|
# class late_start
|
||||||
|
# user root
|
||||||
|
# group root
|
||||||
|
|
||||||
|
service adsprpcd /vendor/bin/adsprpcd rootpd
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
|
||||||
|
service adsprpcd_audiopd /vendor/bin/adsprpcd audiopd
|
||||||
|
class main
|
||||||
|
user media
|
||||||
|
group media
|
||||||
|
|
||||||
|
service adsprpcd_sensorspd /vendor/bin/adsprpcd sensorspd
|
||||||
|
class core
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
|
||||||
|
service cdsprpcd /vendor/bin/cdsprpcd
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
|
||||||
|
#service audiod /vendor/bin/audiod
|
||||||
|
# class late_start
|
||||||
|
# user system
|
||||||
|
# group system
|
||||||
|
#
|
||||||
|
#service usf_tester /vendor/bin/usf_tester
|
||||||
|
# user system
|
||||||
|
# group system inet
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
#service usf_epos /vendor/bin/usf_epos
|
||||||
|
# user system
|
||||||
|
# group system inet
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
#service usf_gesture /vendor/bin/usf_gesture
|
||||||
|
# user system
|
||||||
|
# group system inet
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
|
||||||
|
#service usf_sync_gesture /system/bin/usf_sync_gesture
|
||||||
|
# user system
|
||||||
|
# group system inet
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
|
||||||
|
#service usf_p2p /system/bin/usf_p2p
|
||||||
|
# user system
|
||||||
|
# group system inet
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
#service usf_hovering /vendor/bin/usf_hovering
|
||||||
|
# user system
|
||||||
|
# group system inet
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
#service usf_proximity /system/bin/usf_proximity
|
||||||
|
# user system
|
||||||
|
# group system inet
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
#service usf-post-boot /system/vendor/bin/sh /system/etc/usf_post_boot.sh
|
||||||
|
# class late_start
|
||||||
|
# user root
|
||||||
|
# disabled
|
||||||
|
# oneshot
|
||||||
|
#
|
||||||
|
#on property:init.svc.bootanim=stopped
|
||||||
|
# start usf-post-boot
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#on boot
|
||||||
|
# insmod /system/lib/modules/adsprpc.ko
|
||||||
|
# insmod /system/lib/modules/mhi.ko
|
||||||
|
## access permission for secure touch
|
||||||
|
# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
|
||||||
|
# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
|
||||||
|
# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
|
||||||
|
# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
|
||||||
|
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
|
||||||
|
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
|
||||||
|
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
|
||||||
|
# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
## imsdatadaemon starts with root and UID will be downgraded to SYSTEM.
|
||||||
|
service vendor.imsqmidaemon /system/vendor/bin/imsqmidaemon
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
socket ims_qmid stream 0660 system radio
|
||||||
|
group radio log diag
|
||||||
|
|
||||||
|
# imsdatadaemon starts with root and UID will be downgraded to SYSTEM.
|
||||||
|
service vendor.imsdatadaemon /system/vendor/bin/imsdatadaemon
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
socket ims_datad stream 0660 system radio
|
||||||
|
group system wifi radio inet log diag
|
||||||
|
disabled
|
||||||
|
|
||||||
|
#service mdm_helper /system/bin/mdm_helper
|
||||||
|
# class core
|
||||||
|
# onrestart setprop ro.service.mdm_helper_restarted "true"
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
#service mdm_helper_proxy /system/bin/mdm_helper_proxy
|
||||||
|
# class core
|
||||||
|
# disabled
|
||||||
|
#
|
||||||
|
#service mdm_launcher /system/bin/sh /init.mdm.sh
|
||||||
|
# class main
|
||||||
|
# oneshot
|
||||||
|
#
|
||||||
|
#service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||||
|
# class late_start
|
||||||
|
# user camera
|
||||||
|
# group camera system inet input graphics
|
||||||
|
#
|
||||||
|
# Stop mdm_helper_proxy in case of shutdown
|
||||||
|
#on property:sys.shutdown.requested=*
|
||||||
|
# stop mdm_helper_proxy
|
||||||
|
#
|
||||||
|
# Stop mdm_helper_proxy on APQ target
|
||||||
|
#on property:ro.radio.noril=yes
|
||||||
|
# stop mdm_helper_proxy
|
||||||
|
#
|
||||||
|
#on property:persist.airplane.mode.pwr.svg=enabled
|
||||||
|
# setprop ro.mdm_helper_proxy_req false
|
||||||
|
#
|
||||||
|
#on property:init.svc.ril-daemon=running
|
||||||
|
# setprop ro.mdm_helper_proxy_req true
|
||||||
|
#
|
||||||
|
## Start mdm_helper_proxy
|
||||||
|
#on property:ro.mdm_helper_proxy_req=true
|
||||||
|
# start mdm_helper_proxy
|
||||||
|
#
|
||||||
|
## QCA1530 SoC core detect
|
||||||
|
#service gnss-detect /system/vendor/bin/gnss.qca1530.sh detect
|
||||||
|
# class core
|
||||||
|
# oneshot
|
||||||
|
#
|
||||||
|
## QCA1530 SoC late_start group trigger
|
||||||
|
#service gnss-init /system/vendor/bin/gnss.qca1530.sh init
|
||||||
|
# class late_start
|
||||||
|
# oneshot
|
||||||
|
#
|
||||||
|
## QCA1530 SoC Service Daemon
|
||||||
|
#service gnss-svcd /system/vendor/bin/gnss.qca1530.sh start
|
||||||
|
# class late_start
|
||||||
|
# user root
|
||||||
|
# group gps system qcom_diag diag log inet net_raw
|
||||||
|
# disabled
|
||||||
|
|
||||||
|
service vendor.imsrcsservice /system/vendor/bin/imsrcsd
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group radio diag inet log wakelock
|
||||||
|
|
||||||
|
on property:vendor.ims.QMI_DAEMON_STATUS=1
|
||||||
|
start vendor.imsdatadaemon
|
||||||
|
|
||||||
|
on property:vold.decrypt=trigger_restart_framework
|
||||||
|
start cnss_diag
|
||||||
|
|
||||||
|
service cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group system wifi inet sdcard_rw media_rw diag
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.ims_rtp_daemon /system/vendor/bin/ims_rtp_daemon
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group radio diag inet log
|
||||||
|
|
||||||
|
on property:vendor.ims.DATA_DAEMON_STATUS=1
|
||||||
|
restart vendor.ims_rtp_daemon
|
||||||
|
|
||||||
|
service ppd /vendor/bin/mm-pp-dpps
|
||||||
|
class late_start
|
||||||
|
user system
|
||||||
|
group system graphics
|
||||||
|
socket pps stream 0660 system system
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:init.svc.vendor.hwcomposer-2-3=stopped
|
||||||
|
stop ppd
|
||||||
|
|
||||||
|
on property:init.svc.vendor.hwcomposer-2-3=running
|
||||||
|
start ppd
|
||||||
|
|
||||||
|
on property:init.svc.vendor.hwcomposer-2-3=restarting
|
||||||
|
stop ppd
|
||||||
|
|
||||||
|
#service nqs /system/bin/nqs
|
||||||
|
# class late_start
|
||||||
|
# socket nqs_qsb_comm stream 660 system system
|
||||||
|
# user system
|
||||||
|
# group drmrpc
|
||||||
|
#
|
||||||
|
#service adsprpcd /system/vendor/bin/adsprpcd
|
||||||
|
# class main
|
||||||
|
# user media
|
||||||
|
# group media
|
||||||
|
#
|
||||||
|
##Start picture quality tuning service
|
||||||
|
#service vqttoolservice /system/bin/vqttoolservice
|
||||||
|
# class late_start
|
||||||
|
# socket vqtss stream 0660 system system
|
||||||
|
# user system
|
||||||
|
# group system
|
||||||
|
|
||||||
|
on charger
|
||||||
|
setprop sys.usb.configfs 1
|
||||||
|
|
||||||
|
service hbtp /system/vendor/bin/hbtp_daemon
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
disabled
|
||||||
|
|
||||||
|
service energy-awareness /system/vendor/bin/energy-awareness
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
oneshot
|
||||||
|
# Huaqin add SAMSUNG Remosaic for ZQL1822 by chenjun at 2018/9/18 start
|
||||||
|
service remosaic_daemon /system/vendor/bin/remosaic_daemon
|
||||||
|
class late_start
|
||||||
|
user camera
|
||||||
|
group camera
|
||||||
|
# Huaqin add SAMSUNG Remosaic for ZQL1822 by chenjun at 2018/9/18 end
|
397
rootdir/etc/ueventd.qcom.rc
Normal file
397
rootdir/etc/ueventd.qcom.rc
Normal file
|
@ -0,0 +1,397 @@
|
||||||
|
# Copyright (c) 2012-2015, 2017-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.
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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/genlock 0666 system system
|
||||||
|
/dev/wlan 0660 wifi wifi
|
||||||
|
/dev/kgsl 0666 system system
|
||||||
|
/dev/kgsl-3d0 0666 system system
|
||||||
|
/dev/kgsl-2d0 0666 root root
|
||||||
|
/dev/kgsl-2d1 0666 root root
|
||||||
|
/dev/ion 0664 system system
|
||||||
|
/dev/rtc0 0660 system system
|
||||||
|
/dev/smd0 0660 system system
|
||||||
|
/dev/smd4 0660 system system
|
||||||
|
/dev/smd_cxm_qmi 0640 radio radio
|
||||||
|
/dev/smd5 0660 system system
|
||||||
|
/dev/smd6 0660 system system
|
||||||
|
/dev/smd7 0660 bluetooth bluetooth
|
||||||
|
/dev/ccid_bridge 0660 system system
|
||||||
|
/dev/ipa 0660 radio radio
|
||||||
|
/dev/wwan_ioctl 0660 radio radio
|
||||||
|
/dev/ipaNatTable 0660 radio radio
|
||||||
|
/dev/rmnet_ctrl 0660 usb usb
|
||||||
|
/dev/dpl_ctrl 0660 usb usb
|
||||||
|
/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
|
||||||
|
|
||||||
|
#permissions for CSVT
|
||||||
|
/dev/smd11 0660 radio radio
|
||||||
|
|
||||||
|
#permsissions for BT/FM
|
||||||
|
/dev/smd2 0660 bluetooth bluetooth
|
||||||
|
/dev/smd3 0660 bluetooth bluetooth
|
||||||
|
/dev/btpower 0660 bluetooth system
|
||||||
|
|
||||||
|
#permissions for pta
|
||||||
|
/dev/pta 0660 system system
|
||||||
|
|
||||||
|
/dev/radio0 0640 system system
|
||||||
|
/dev/rfcomm0 0660 bluetooth bluetooth
|
||||||
|
/dev/ttyUSB0 0660 bluetooth bluetooth
|
||||||
|
/dev/smdcntl0 0640 radio radio
|
||||||
|
/dev/smdcntl1 0640 radio radio
|
||||||
|
/dev/smdcntl2 0640 radio radio
|
||||||
|
/dev/smdcntl3 0640 radio radio
|
||||||
|
/dev/smdcntl4 0640 radio radio
|
||||||
|
/dev/smdcntl5 0640 radio radio
|
||||||
|
/dev/smdcntl6 0640 radio radio
|
||||||
|
/dev/smdcntl7 0640 radio radio
|
||||||
|
/dev/smdcntl8 0640 radio radio
|
||||||
|
/dev/smdcnt_rev0 0640 radio radio
|
||||||
|
/dev/smdcnt_rev1 0640 radio radio
|
||||||
|
/dev/smdcnt_rev2 0640 radio radio
|
||||||
|
/dev/smdcnt_rev3 0640 radio radio
|
||||||
|
/dev/smdcnt_rev4 0640 radio radio
|
||||||
|
/dev/smdcnt_rev5 0640 radio radio
|
||||||
|
/dev/smdcnt_rev6 0640 radio radio
|
||||||
|
/dev/smdcnt_rev7 0640 radio radio
|
||||||
|
/dev/smdcnt_rev8 0640 radio radio
|
||||||
|
/dev/smuxctl32 0640 radio radio
|
||||||
|
/dev/sdioctl0 0640 radio radio
|
||||||
|
/dev/sdioctl1 0640 radio radio
|
||||||
|
/dev/sdioctl2 0640 radio radio
|
||||||
|
/dev/sdioctl3 0640 radio radio
|
||||||
|
/dev/sdioctl4 0640 radio radio
|
||||||
|
/dev/sdioctl5 0640 radio radio
|
||||||
|
/dev/sdioctl6 0640 radio radio
|
||||||
|
/dev/sdioctl7 0640 radio radio
|
||||||
|
/dev/sdioctl8 0640 radio radio
|
||||||
|
/dev/rmnet_mux_ctrl 0640 radio radio
|
||||||
|
/dev/hsicctl0 0640 radio radio
|
||||||
|
/dev/hsicctl1 0640 radio radio
|
||||||
|
/dev/hsicctl2 0640 radio radio
|
||||||
|
/dev/hsicctl3 0640 radio radio
|
||||||
|
/dev/hsicctl4 0640 radio radio
|
||||||
|
/dev/hsicctl5 0640 radio radio
|
||||||
|
/dev/hsicctl6 0640 radio radio
|
||||||
|
/dev/hsicctl7 0640 radio radio
|
||||||
|
/dev/hsicctl8 0640 radio radio
|
||||||
|
/dev/hsicctl9 0640 radio radio
|
||||||
|
/dev/hsicctl10 0640 radio radio
|
||||||
|
/dev/hsicctl11 0640 radio radio
|
||||||
|
/dev/hsicctl12 0640 radio radio
|
||||||
|
/dev/hsicctl13 0640 radio radio
|
||||||
|
/dev/hsicctl14 0640 radio radio
|
||||||
|
/dev/hsicctl15 0640 radio radio
|
||||||
|
/dev/hsicctl16 0640 radio radio
|
||||||
|
/dev/mhi_*_pipe_14 0640 radio radio
|
||||||
|
/dev/mhi_*_pipe_16 0640 radio radio
|
||||||
|
/dev/mhi_*_pipe_32 0640 radio radio
|
||||||
|
/dev/at_usb0 0640 radio radio
|
||||||
|
/dev/at_mdm0 0640 radio radio
|
||||||
|
/dev/video* 0660 system camera
|
||||||
|
/dev/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_ssr 0660 system system
|
||||||
|
/dev/sp_keymaster 0660 system system
|
||||||
|
/dev/sec_nvm_* 0660 system system
|
||||||
|
/dev/cryptoapp 0660 system system
|
||||||
|
/dev/spdaemon_ssr 0660 system system
|
||||||
|
/dev/iuicc 0660 system system
|
||||||
|
/dev/iuicc0 0660 system system
|
||||||
|
/dev/iuicc1 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
|
||||||
|
/sys/kernel/qvr_external_sensor/fd 0660 system system
|
||||||
|
|
||||||
|
# wlan
|
||||||
|
/dev/wcnss_wlan 0660 system system
|
||||||
|
/dev/wcnss_ctrl 0660 system system
|
||||||
|
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/wlan0/queues/rx-* rps_cpus 0660 system system
|
||||||
|
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/p2p0/queues/rx-* rps_cpus 0660 system system
|
||||||
|
/dev/spidev0.0 0660 system audio
|
||||||
|
/dev/msm_camera/* 0660 system camera
|
||||||
|
/dev/gemini/ 0660 system camera
|
||||||
|
/dev/mercury0 0660 system camera
|
||||||
|
/dev/msm_vidc_reg 0660 system audio
|
||||||
|
/dev/msm_vidc_dec 0660 system audio
|
||||||
|
/dev/msm_vidc_dec_sec 0660 system audio
|
||||||
|
/dev/msm_vidc_enc 0660 system audio
|
||||||
|
/dev/msm_rotator 0660 system system
|
||||||
|
/dev/hw_random 0600 root root
|
||||||
|
/dev/sdsprpc-smd 0660 system system
|
||||||
|
|
||||||
|
#permissions for audio
|
||||||
|
/dev/wcd_dsp0_control 0660 system audio
|
||||||
|
/dev/wcd-dsp-glink 0660 system audio
|
||||||
|
/dev/audio_slimslave 0660 system audio
|
||||||
|
/dev/msm_qcelp 0660 system audio
|
||||||
|
/dev/msm_evrc 0660 system audio
|
||||||
|
/dev/msm_wma 0660 system audio
|
||||||
|
/dev/msm_wmapro 0660 system audio
|
||||||
|
/dev/msm_alac 0660 system audio
|
||||||
|
/dev/msm_ape 0660 system audio
|
||||||
|
/dev/msm_amrnb 0660 system audio
|
||||||
|
/dev/msm_amrwb 0660 system audio
|
||||||
|
/dev/msm_amrwbplus 0660 system audio
|
||||||
|
/dev/msm_aac 0660 system audio
|
||||||
|
/dev/msm_multi_aac 0660 system audio
|
||||||
|
/dev/msm_aac_in 0660 system audio
|
||||||
|
/dev/msm_qcelp_in 0660 system audio
|
||||||
|
/dev/msm_evrc_in 0660 system audio
|
||||||
|
/dev/msm_amrnb_in 0660 system audio
|
||||||
|
/dev/msm_amrwb_in 0660 system audio
|
||||||
|
/dev/msm_a2dp_in 0660 system audio
|
||||||
|
/dev/msm_ac3 0660 system audio
|
||||||
|
/dev/msm_audio_cal 0660 system audio
|
||||||
|
/dev/msm_hweffects 0660 system audio
|
||||||
|
/dev/msm_cad 0660 system audio
|
||||||
|
/dev/msm_fm 0660 system audio
|
||||||
|
/dev/msm_mvs 0660 system audio
|
||||||
|
/dev/msm_pcm_lp_dec 0660 system audio
|
||||||
|
/dev/msm_preproc_ctl 0660 system audio
|
||||||
|
/dev/msm_rtac 0660 system audio
|
||||||
|
/dev/msm_voicememo 0660 system audio
|
||||||
|
/dev/ttyHSL1 0660 system system
|
||||||
|
/dev/ttyHS1 0660 system system
|
||||||
|
/dev/mdm 0660 system radio
|
||||||
|
/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio
|
||||||
|
/dev/sdio_tty_ciq_00 0660 system system
|
||||||
|
/dev/tty_sdio_00 0660 system system
|
||||||
|
/dev/ttyGS0 0660 system system
|
||||||
|
/dev/i2c-5 0660 media media
|
||||||
|
/dev/avtimer 0660 system audio
|
||||||
|
/dev/spidev2.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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# 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/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/blue delay_on 0640 system system
|
||||||
|
/sys/class/leds/blue delay_off 0640 system system
|
||||||
|
/sys/class/leds/blue breath 0640 system system
|
||||||
|
|
||||||
|
# NPU device
|
||||||
|
/dev/msm_npu 0644 system system
|
||||||
|
|
||||||
|
# USB role switch
|
||||||
|
/sys/class/dual_role_usb/* data_role 0660 system system
|
||||||
|
/sys/class/dual_role_usb/* power_role 0660 system system
|
||||||
|
/sys/class/dual_role_usb/* mode 0660 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
|
Loading…
Reference in a new issue