Initial Commit4
This commit is contained in:
83
rootdir/Android.mk
Normal file
83
rootdir/Android.mk
Normal file
@@ -0,0 +1,83 @@
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
# Configuration scripts
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.mmi.boot.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.mmi.boot.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.mmi.laser.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.mmi.laser.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.mmi.touch.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.mmi.touch.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.bt.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.bt.sh
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.ril.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.ril.sh
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
# Init scripts
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := fstab.qcom
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/fstab.qcom
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.mmi.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.mmi.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.mmi.usb.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.mmi.usb.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ueventd.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/ueventd.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
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 /system ext4 ro,barrier=1,discard wait
|
||||
/dev/block/bootdevice/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,nobarrier,inline_xattr,inline_data wait,check,formattable,encryptable=/dev/block/bootdevice/by-name/metadata
|
||||
/dev/block/bootdevice/by-name/cache /cache ext4 rw,noatime,nosuid,nodev,barrier=1,data=ordered wait,check,formattable
|
||||
/dev/block/bootdevice/by-name/modem /firmware ext4 ro,nosuid,nodev,barrier=0,context=u:object_r:firmware_file:s0 wait
|
||||
/dev/block/bootdevice/by-name/fsg /fsg ext4 ro,nosuid,nodev,context=u:object_r:fsg_file:s0 wait
|
||||
/dev/block/bootdevice/by-name/dsp /dsp ext4 ro,nosuid,nodev,barrier=1 wait
|
||||
/dev/block/bootdevice/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noatime,noauto_da_alloc,context=u:object_r:persist_file:s0 wait
|
||||
/dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly
|
||||
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly
|
||||
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
|
||||
|
||||
/devices/soc/7864900.sdhci/mmc_host* auto auto nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=userdata
|
||||
/devices/*/xhci-hcd.*.auto/usb* auto auto defaults voldmanaged=usb:auto
|
||||
/dev/block/zram0 none swap defaults zramsize=536870912
|
||||
71
rootdir/etc/init.mmi.boot.sh
Normal file
71
rootdir/etc/init.mmi.boot.sh
Normal file
@@ -0,0 +1,71 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
PATH=/sbin:/system/sbin:/system/bin:/system/xbin
|
||||
export PATH
|
||||
|
||||
scriptname=${0##*/}
|
||||
|
||||
notice()
|
||||
{
|
||||
echo "$*"
|
||||
echo "$scriptname: $*" > /dev/kmsg
|
||||
}
|
||||
|
||||
|
||||
start_copying_prebuilt_qcril_db()
|
||||
{
|
||||
if [ -f /system/vendor/qcril.db -a ! -f /data/misc/radio/qcril.db ]; then
|
||||
cp /system/vendor/qcril.db /data/misc/radio/qcril.db
|
||||
chown -h radio.radio /data/misc/radio/qcril.db
|
||||
else
|
||||
# [MOTO] if qcril.db's owner is not radio (e.g. root),
|
||||
# reset it for the recovery
|
||||
qcril_db_owner=`stat -c %U /data/misc/radio/qcril.db`
|
||||
echo "qcril.db's owner is $qcril_db_owner"
|
||||
if [ $qcril_db_owner != "radio" ]; then
|
||||
echo "reset owner to radio for qcril.db"
|
||||
chown -h radio.radio /data/misc/radio/qcril.db
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# We take this from cpuinfo because hex "letters" are lowercase there
|
||||
set -A cinfo `cat /proc/cpuinfo | /system/bin/grep Revision`
|
||||
hw=${cinfo[2]#?}
|
||||
|
||||
# Now "cook" the value so it can be matched against devtree names
|
||||
m2=${hw%?}
|
||||
minor2=${hw#$m2}
|
||||
m1=${m2%?}
|
||||
minor1=${m2#$m1}
|
||||
if [ "$minor2" == "0" ]; then
|
||||
minor2=""
|
||||
if [ "$minor1" == "0" ]; then
|
||||
minor1=""
|
||||
fi
|
||||
fi
|
||||
setprop ro.hw.revision p${hw%??}$minor1$minor2
|
||||
unset hw cinfo m1 m2 minor1 minor2
|
||||
|
||||
# Let kernel know our image version/variant/crm_version
|
||||
if [ -f /sys/devices/soc0/select_image ]; then
|
||||
image_version="10:"
|
||||
image_version+=`getprop ro.build.id`
|
||||
image_version+=":"
|
||||
image_version+=`getprop ro.build.version.incremental`
|
||||
image_variant=`getprop ro.product.name`
|
||||
image_variant+="-"
|
||||
image_variant+=`getprop ro.build.type`
|
||||
oem_version=`getprop ro.build.version.codename`
|
||||
echo 10 > /sys/devices/soc0/select_image
|
||||
echo $image_version > /sys/devices/soc0/image_version
|
||||
echo $image_variant > /sys/devices/soc0/image_variant
|
||||
echo $oem_version > /sys/devices/soc0/image_crm_version
|
||||
fi
|
||||
|
||||
#
|
||||
# Copy qcril.db if needed for RIL
|
||||
#
|
||||
start_copying_prebuilt_qcril_db
|
||||
echo 1 > /data/misc/radio/db_check_done
|
||||
|
||||
48
rootdir/etc/init.mmi.laser.sh
Normal file
48
rootdir/etc/init.mmi.laser.sh
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/system/bin/sh
|
||||
scriptname=${0##*/}
|
||||
dbg_on=1
|
||||
debug()
|
||||
{
|
||||
[ $dbg_on ] && echo "Debug: $*"
|
||||
}
|
||||
|
||||
notice()
|
||||
{
|
||||
echo "$*"
|
||||
echo "$scriptname: $*" > /dev/kmsg
|
||||
}
|
||||
|
||||
error_and_leave()
|
||||
{
|
||||
local err_msg
|
||||
local err_code=$1
|
||||
case $err_code in
|
||||
1) err_msg="Error: No response";;
|
||||
2) err_msg="Error: in factory mode";;
|
||||
3) err_msg="Error: calibration file not exist";;
|
||||
4) err_msg="Error: the calibration sys file not show up";;
|
||||
esac
|
||||
notice "$err_msg"
|
||||
exit $err_code
|
||||
}
|
||||
|
||||
bootmode=`getprop ro.bootmode`
|
||||
if [ $bootmode == "mot-factory" ]
|
||||
then
|
||||
error_and_leave 2
|
||||
fi
|
||||
|
||||
laser_offset_path=/sys/kernel/range/offset
|
||||
laser_offset_string=$(ls $laser_offset_path)
|
||||
[ -z "$laser_offset_string" ] && error_and_leave 4
|
||||
|
||||
cal_offset_path=/persist/camera/focus/offset_cal
|
||||
cal_offset_string=$(ls $cal_offset_path)
|
||||
[ -z "$cal_offset_string" ] && error_and_leave 3
|
||||
|
||||
offset_cal=$(cat $cal_offset_path)
|
||||
debug "offset cal value [$offset_cal]"
|
||||
|
||||
debug "set cal value to kernel"
|
||||
echo $offset_cal > $laser_offset_path
|
||||
notice "laser cal data update success"
|
||||
317
rootdir/etc/init.mmi.rc
Normal file
317
rootdir/etc/init.mmi.rc
Normal file
@@ -0,0 +1,317 @@
|
||||
# Moto USB configuration
|
||||
import init.mmi.usb.rc
|
||||
|
||||
on early-boot
|
||||
write /sys/module/subsystem_restart/parameters/disable_restart_work 0x0
|
||||
write /proc/sys/kernel/poweroff_cmd "/system/bin/reboot -p"
|
||||
|
||||
on init
|
||||
chown system log /sys/fs/pstore/console-ramoops-0
|
||||
chmod 0440 /sys/fs/pstore/console-ramoops-0
|
||||
chown system log /sys/fs/pstore/annotate-ramoops-0
|
||||
chmod 0640 /sys/fs/pstore/annotate-ramoops-0
|
||||
chown system log /sys/fs/pstore/dmesg-ramoops-0
|
||||
chmod 0640 /sys/fs/pstore/dmesg-ramoops-0
|
||||
|
||||
# Setup kernel dropbox permissions so that dropboxd can utilize it
|
||||
chown root diag /sys/kernel/dropbox/event
|
||||
chown root diag /sys/kernel/dropbox/data
|
||||
|
||||
on fs
|
||||
# use /persist as phony PDS partition
|
||||
symlink /persist /pds
|
||||
|
||||
on post-fs
|
||||
mkdir /persist/camera 0755 mot_tcmd mot_tcmd
|
||||
mkdir /persist/camera/focus 0775 camera mot_tcmd
|
||||
mkdir /persist/camera/ledcal 0775 camera mot_tcmd
|
||||
mkdir /persist/batt_health 0755 mot_pwric mot_pwric
|
||||
mkdir /persist/mdm 0770 radio radio
|
||||
mkdir /persist/factory 0755 mot_tcmd mot_tcmd
|
||||
mkdir /persist/factory/audio 0755 mot_tcmd system
|
||||
mkdir /persist/factory/wlan 0755 mot_tcmd mot_tcmd
|
||||
mkdir /persist/factory/regulatory 0755 mot_tcmd system
|
||||
mkdir /persist/public 0755 mot_tcmd mot_tcmd
|
||||
mkdir /persist/public/atvc 0770 mot_atvc shell
|
||||
mkdir /persist/public/battd 0755 mot_accy mot_tcmd
|
||||
mkdir /persist/public/hiddenmenu 0755 radio radio
|
||||
mkdir /persist/public/hiddenmenu/data 0775 system mot_tcmd
|
||||
mkdir /persist/public/locale 0700 system system
|
||||
mkdir /persist/public/omadm 0700 radio radio
|
||||
mkdir /persist/public/svcs 0770 system system
|
||||
mkdir /persist/wifi 0755 mot_tcmd mot_tcmd
|
||||
mkdir /persist/bt 0755 mot_tcmd bluetooth
|
||||
mkdir /persist/wmdrm 0775 mot_drm mot_drm
|
||||
|
||||
chown mot_tcmd mot_tcmd /persist/factory/fti
|
||||
chmod 0660 /persist/factory/fti
|
||||
chown mot_tcmd mot_tcmd /persist/factory/byte
|
||||
chmod 0660 /persist/factory/byte
|
||||
chmod 0660 /persist/wifi/wlan_mac.bin
|
||||
chown mot_tcmd mot_tcmd /persist/bt/bt_bdaddr
|
||||
chmod 0664 /persist/bt/bt_bdaddr
|
||||
|
||||
swapon_all fstab.qcom
|
||||
write /proc/sys/vm/page-cluster 0
|
||||
|
||||
on post-fs-data
|
||||
|
||||
# Setup folders for security
|
||||
mkdir /persist/security 02770 mot_tpapi mot_tpapi
|
||||
mkdir /data/local/dbvc 0750 mot_tcmd shell
|
||||
|
||||
# Create directory used by power_supply_logger
|
||||
mkdir /data/power_supply_logger 0750 mot_pwric log
|
||||
|
||||
# Create moodle directory that MOT_MOODLE can write to
|
||||
mkdir /data/local/moodle 0770 graphics mot_tcmd
|
||||
|
||||
# Permissions for Factory Test of Charging Paths
|
||||
chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_auto_enable
|
||||
chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_ibatt
|
||||
chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_itrick
|
||||
chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_iusb
|
||||
chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_usb_suspend
|
||||
chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_fail_clear
|
||||
chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_usb_otg_ctl
|
||||
|
||||
chown root mot_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_rechrg_start_soc
|
||||
chown root mot_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_rechrg_stop_soc
|
||||
chown root mot_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_attach_start_soc
|
||||
chown root mot_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_attach_stop_soc
|
||||
chown root mot_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_low_start_soc
|
||||
chown root mot_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_low_stop_soc
|
||||
chown root mot_mod /sys/module/qpnp_smbcharger_mmi/parameters/eb_on_sw
|
||||
|
||||
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_rechrg_start_soc
|
||||
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_rechrg_stop_soc
|
||||
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_attach_start_soc
|
||||
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_attach_stop_soc
|
||||
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_low_start_soc
|
||||
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_low_stop_soc
|
||||
chmod 0664 /sys/module/qpnp_smbcharger_mmi/parameters/eb_on_sw
|
||||
|
||||
chown root mot_mod /sys/class/power_supply/usb/usb_priority
|
||||
chmod 0660 /sys/class/power_supply/usb/usb_priority
|
||||
|
||||
# Sensor Hub calibration data directory
|
||||
mkdir /data/misc/sensorhub 0770 system compass
|
||||
|
||||
# Setup folder for native to transfer data to NativeDropBoxAgent
|
||||
mkdir /data/system/dropbox-add 0730 system diag
|
||||
|
||||
# Create directory for cutback
|
||||
mkdir /data/misc/cutback 0770 radio wifi
|
||||
|
||||
#setup folder for WLAN WAPI
|
||||
mkdir /data/wapi_certificate 0750 system wifi
|
||||
chown system wifi /data/wapi_certificate
|
||||
|
||||
# Create greybus firmware folder
|
||||
mkdir /data/gbfirmware 0770 mot_mod mot_mod
|
||||
|
||||
# Create bug2go folder
|
||||
mkdir /data/bug2go 0770 log log
|
||||
|
||||
# Permissions for phone power off log
|
||||
mkdir /data/power_log 0750 root log
|
||||
chmod 0660 /sys/module/power_supply_log/parameters/log_file
|
||||
write /sys/module/power_supply_log/parameters/log_file /data/power_log/power_off.log
|
||||
|
||||
# Subsystem RAM-dumps
|
||||
mkdir /data/ss-ram-dumps 0750 system log
|
||||
mkdir /data/ss-ram-dumps/bp-dumps 0750 system log
|
||||
mkdir /data/ss-ram-dumps/riva-dumps 0750 system log
|
||||
|
||||
# folder for Blueooth ramdump
|
||||
mkdir /data/bt-ram-dumps 0750 bluetooth log
|
||||
|
||||
# SD card encryption metadata
|
||||
mkdir /data/misc/sds 0750 root root
|
||||
|
||||
# Required by FingerPrint Cards (FPC) via init so we don't need to give qseecomd or fingerprintd permissions to create them
|
||||
mkdir /data/fpc 0700 system system
|
||||
mkdir /data/.fps 0770 system input
|
||||
|
||||
#Folder for hardware properties
|
||||
mkdir /data/hardware_revisions 0755 system system
|
||||
|
||||
#Create directory for adspd
|
||||
mkdir /data/adspd 0770 audio diag
|
||||
|
||||
# Setup folder for camera dump subsystem
|
||||
mkdir /data/camera_dump 0750 media media
|
||||
|
||||
# Imager tuning data for camera subsystem
|
||||
mkdir /data/misc/imager 0770 camera camera
|
||||
|
||||
#setup folder for WLAN WAPI
|
||||
chmod 0770 /data/wapi_certificate
|
||||
|
||||
on boot
|
||||
# restore default console_loglevel to KERN_DEBUG
|
||||
# restore default_message_loglevel to KERN_WARNING
|
||||
write /proc/sys/kernel/printk "7 4 1 7"
|
||||
|
||||
# Change ownership and permission for backlight
|
||||
chown system system /sys/class/backlight/lcd-backlight:0/brightness
|
||||
chmod 0664 /sys/class/backlight/lcd-backlight:0/brightness
|
||||
chown system system /sys/class/backlight/lcd-backlight:0/max_brightness
|
||||
chmod 0664 /sys/class/backlight/lcd-backlight:0/max_brightness
|
||||
chmod 0664 /sys/class/leds/lcd-backlight/brightness
|
||||
chown system system /sys/class/leds/white/brightness
|
||||
chmod 0664 /sys/class/leds/white/brightness
|
||||
|
||||
# Change ownership for Dynamic-CABC feature
|
||||
chown system system /sys/class/graphics/fb0/cabc_mode
|
||||
# Change ownership for for ACL feature
|
||||
chown system system /sys/class/graphics/fb0/acl_mode
|
||||
|
||||
# Change ownership and permission for vibrator
|
||||
chown system system /sys/class/timed_output/vibrator/enable
|
||||
chmod 0660 /sys/class/timed_output/vibrator/enable
|
||||
|
||||
# Change ownership and permission for laser_sensor
|
||||
chown system system /sys/kernel/range/enable_sar
|
||||
chmod 0660 /sys/kernel/range/enable_sar
|
||||
chown system system /sys/kernel/range/set_delay_ms
|
||||
chmod 0660 /sys/kernel/range/set_delay_ms
|
||||
chown system system /sys/kernel/range/near
|
||||
chmod 0660 /sys/kernel/range/near
|
||||
|
||||
# Change the ownership of display TE files for tcmds
|
||||
chown root mot_tcmd /sys/class/graphics/fb0/te_enable
|
||||
chown root mot_tcmd /sys/class/graphics/fb0/frame_counter
|
||||
|
||||
# Change ownership of aov related sysfs entries
|
||||
wait /sys/kernel/aov/event
|
||||
chown audio audio /sys/kernel/aov/trigger
|
||||
chown audio audio /sys/kernel/aov/register
|
||||
chown audio audio /sys/kernel/aov/event
|
||||
|
||||
# Change permission for type C params
|
||||
chown root mot_tcmd /sys/devices/soc/78b6000.i2c/i2c-2/2-0022/CC_state
|
||||
chown root mot_tcmd /sys/devices/soc/78b6000.i2c/i2c-2/2-0022/enable_vconn
|
||||
# Change ownership and permission for AMPS factory testing
|
||||
chown root mot_tcmd /sys/class/i2c-adapter/i2c-2/2-002d/enable
|
||||
chmod 0660 /sys/class/i2c-adapter/i2c-2/2-002d/enable
|
||||
chown root mot_tcmd /sys/class/i2c-adapter/i2c-2/2-002d/hsic_vdd
|
||||
chmod 0660 /sys/class/i2c-adapter/i2c-2/2-002d/hsic_vdd
|
||||
|
||||
# Change permission for fingerprint sensor
|
||||
chown system mot_tcmd /sys/bus/spi/devices/spi8.0/nav
|
||||
chown system mot_tcmd /sys/bus/spi/devices/spi8.0/clk_enable
|
||||
chown system mot_tcmd /sys/bus/spi/devices/spi8.0/dev_enable
|
||||
chown system mot_tcmd /sys/bus/spi/devices/spi8.0/irq
|
||||
chown system mot_tcmd /sys/bus/spi/devices/spi8.0/irq_cnt
|
||||
chmod 0440 /sys/bus/spi/devices/spi8.0/irq_cnt
|
||||
|
||||
# STML4 driver parameter permissions
|
||||
chown root mot_tcmd /sys/module/motosh/parameters/irq_disable
|
||||
chmod 0660 /sys/module/motosh/parameters/irq_disable
|
||||
|
||||
#STML4 device permissions
|
||||
chown system compass /dev/motosh
|
||||
chmod 0660 /dev/motosh
|
||||
chown compass compass /dev/motosh_as
|
||||
chmod 0660 /dev/motosh_as
|
||||
chown compass compass /dev/motosh_ms
|
||||
chmod 0660 /dev/motosh_ms
|
||||
chown compass compass /sys/devices/virtual/motosh/motosh_as/timestamp_time_ns
|
||||
chmod 0440 /sys/devices/virtual/motosh/motosh_as/timestamp_time_ns
|
||||
chown compass compass /sys/devices/virtual/motosh/motosh_as/rv_6axis_update_rate
|
||||
chmod 0660 /sys/devices/virtual/motosh/motosh_as/rv_6axis_update_rate
|
||||
chown compass compass /sys/devices/virtual/motosh/motosh_as/rv_9axis_update_rate
|
||||
chmod 0660 /sys/devices/virtual/motosh/motosh_as/rv_9axis_update_rate
|
||||
chown compass compass /sys/devices/virtual/motosh/motosh_as/game_rv_update_rate
|
||||
chmod 0660 /sys/devices/virtual/motosh/motosh_as/game_rv_update_rate
|
||||
chown compass compass /sys/devices/virtual/motosh/motosh_as/gravity_update_rate
|
||||
chmod 0660 /sys/devices/virtual/motosh/motosh_as/gravity_update_rate
|
||||
chown compass compass /sys/devices/virtual/motosh/motosh_as/linear_accel_update_rate
|
||||
chmod 0660 /sys/devices/virtual/motosh/motosh_as/linear_accel_update_rate
|
||||
|
||||
# Quiet binder logs
|
||||
write /sys/module/binder/parameters/debug_mask 0x5
|
||||
|
||||
on charger
|
||||
trigger early-fs
|
||||
trigger fs
|
||||
trigger post-fs
|
||||
trigger post-fs-data
|
||||
trigger moto-charger
|
||||
class_stop main
|
||||
class_stop late_start
|
||||
|
||||
on moto-charger
|
||||
setprop ro.board.platform msm8953
|
||||
trigger firmware_mounts_complete
|
||||
start batt_health
|
||||
start thermal-com
|
||||
|
||||
on property:ro.boot.dualsim=true
|
||||
setprop persist.radio.multisim.config dsds
|
||||
setprop ro.telephony.default_network 10,10
|
||||
|
||||
on property:ro.boot.dualsim=false
|
||||
setprop persist.radio.multisim.config ""
|
||||
setprop ro.telephony.default_network 10
|
||||
|
||||
service adspd /system/bin/adspd
|
||||
seclabel u:r:adspd:s0
|
||||
class main
|
||||
socket adspdsock stream 0660 system audio
|
||||
user audio
|
||||
group audio input diag
|
||||
|
||||
service batt_health /system/bin/batt_health
|
||||
class late_start
|
||||
user mot_pwric
|
||||
group mot_pwric cache net_admin log
|
||||
disabled
|
||||
|
||||
on property:sys.boot_completed=1 && property:ro.boot.secure_hardware=0
|
||||
start batt_health
|
||||
|
||||
service fingerprintd /system/bin/fingerprintd
|
||||
class late_start
|
||||
user system
|
||||
group input
|
||||
|
||||
service mmi-boot-sh /system/bin/init.mmi.boot.sh
|
||||
class core
|
||||
user root
|
||||
oneshot
|
||||
|
||||
service mmi-laser-sh /system/bin/init.mmi.laser.sh
|
||||
class core
|
||||
user root
|
||||
oneshot
|
||||
|
||||
service mmi-touch-sh /system/bin/init.mmi.touch.sh
|
||||
class core
|
||||
user root
|
||||
oneshot
|
||||
|
||||
# Start Sensor daemon
|
||||
service motosh /system/bin/motosh boot
|
||||
class late_start
|
||||
user compass
|
||||
group compass misc input
|
||||
oneshot
|
||||
seclabel u:r:sensor_hub:s0
|
||||
|
||||
service thermal-com /system/vendor/bin/thermal-engine --minimode
|
||||
class main
|
||||
user root
|
||||
disabled
|
||||
|
||||
# Set RPS Mask for Wifi Hotspot
|
||||
on property:sys.wifi.tethering=true
|
||||
write /sys/class/net/rmnet_data0/queues/rx-0/rps_cpus ${sys.usb.rps_mask}
|
||||
write /sys/class/net/wlan0/queues/rx-0/rps_cpus ${sys.usb.rps_mask}
|
||||
write /sys/class/net/wlan0/queues/rx-1/rps_cpus ${sys.usb.rps_mask}
|
||||
write /sys/class/net/wlan0/queues/rx-2/rps_cpus ${sys.usb.rps_mask}
|
||||
write /sys/class/net/wlan0/queues/rx-3/rps_cpus ${sys.usb.rps_mask}
|
||||
|
||||
on property:sys.wifi.tethering=false
|
||||
write /sys/class/net/rmnet_data0/queues/rx-0/rps_cpus ${sys.rmnet_vnd.rps_mask}
|
||||
349
rootdir/etc/init.mmi.touch.sh
Normal file
349
rootdir/etc/init.mmi.touch.sh
Normal file
@@ -0,0 +1,349 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
PATH=/sbin:/system/sbin:/system/bin:/system/xbin
|
||||
export PATH
|
||||
|
||||
while getopts ds op;
|
||||
do
|
||||
case $op in
|
||||
d) dbg_on=1;;
|
||||
s) dump_statistics=1;;
|
||||
esac
|
||||
done
|
||||
shift $(($OPTIND-1))
|
||||
|
||||
scriptname=${0##*/}
|
||||
touch_class_path=/sys/class/touchscreen
|
||||
touch_product_string=$(ls $touch_class_path)
|
||||
touch_status_prop=hw.touch.status
|
||||
|
||||
debug()
|
||||
{
|
||||
[ $dbg_on ] && echo "Debug: $*"
|
||||
}
|
||||
|
||||
notice()
|
||||
{
|
||||
echo "$*"
|
||||
echo "$scriptname: $*" > /dev/kmsg
|
||||
}
|
||||
|
||||
sanity_check()
|
||||
{
|
||||
read_touch_property flashprog || return 1
|
||||
[[ ( -z "$property" ) || ( "$property" == "1" ) ]] && return 1
|
||||
read_touch_property productinfo || return 1
|
||||
[[ ( -z "$property" ) || ( "$property" == "0" ) ]] && return 1
|
||||
read_touch_property buildid || return 1
|
||||
config_id=${property#*-}
|
||||
[[ ( -z "$config_id" ) || ( "$config_id" == "0" ) ]] && return 1
|
||||
build_id=${property%-*}
|
||||
[[ ( -z "$build_id" ) || ( "$build_id" == "0" ) ]] && return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
error_and_leave()
|
||||
{
|
||||
local err_msg
|
||||
local err_code=$1
|
||||
local touch_status="unknown"
|
||||
case $err_code in
|
||||
1) err_msg="Error: No response from touch IC"
|
||||
touch_status="dead";;
|
||||
2) err_msg="Error: Cannot read property $2";;
|
||||
3) err_msg="Error: No matching firmware file found";;
|
||||
4) err_msg="Error: Touch IC is in bootloader mode"
|
||||
touch_status="dead";;
|
||||
5) err_msg="Error: Touch provides no reflash interface"
|
||||
touch_status="dead";;
|
||||
6) err_msg="Error: Touch driver is not running"
|
||||
touch_status="absent";;
|
||||
7) err_msg="Warning: Touch firmware is not the latest";;
|
||||
esac
|
||||
notice "$err_msg"
|
||||
|
||||
# perform sanity check and declare touch ready if error is not fatal
|
||||
if [ "$touch_status" == "unknown" ]; then
|
||||
touch_status="ready"
|
||||
sanity_check
|
||||
[ "$?" == "1" ] && touch_status="dead"
|
||||
fi
|
||||
|
||||
# perform recovery if touch is declared dead
|
||||
if [ "$touch_status" == "dead" ]; then
|
||||
notice "Touch needs to go through recovery!!!"
|
||||
reboot_cnt=$(getprop $touch_status_prop 2>/dev/null)
|
||||
[ -z "$reboot_cnt" ] && reboot_cnt=0
|
||||
debug "current reboot counter [$reboot_cnt]"
|
||||
fi
|
||||
|
||||
setprop $touch_status_prop $touch_status
|
||||
notice "property [$touch_status_prop] set to [`getprop $touch_status_prop`]"
|
||||
|
||||
if [ "$touch_status" == "dead" ]; then
|
||||
if [ $((reboot_cnt)) -lt 2 ]; then
|
||||
notice "Touch is not working; rebooting..."
|
||||
debug "sleep 3s to allow touch-dead-sh service to run"
|
||||
sleep 3
|
||||
[ -z "$dbg_on" ] && reboot
|
||||
else
|
||||
notice "Although touch is not working, no more reboots"
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $err_code
|
||||
}
|
||||
|
||||
[ -z "$touch_product_string" ] && error_and_leave 6
|
||||
|
||||
touch_vendor=$(cat $touch_class_path/$touch_product_string/vendor)
|
||||
debug "touch vendor [$touch_vendor]"
|
||||
touch_path=/sys$(cat $touch_class_path/$touch_product_string/path)
|
||||
debug "sysfs touch path: $touch_path"
|
||||
panel_path=/sys/devices/virtual/graphics/fb0
|
||||
debug "sysfs panel path: $panel_path"
|
||||
|
||||
if [ $dump_statistics ]; then
|
||||
debug "dumping touch statistics"
|
||||
cat $touch_path/ic_ver
|
||||
[ -f $touch_path/stats ] && cat $touch_path/stats
|
||||
return 0
|
||||
fi
|
||||
|
||||
[ -f $touch_path/doreflash ] || error_and_leave 5
|
||||
[ -f $touch_path/poweron ] || error_and_leave 5
|
||||
|
||||
selinux=$(getprop ro.boot.selinux 2> /dev/null)
|
||||
|
||||
if [ "$selinux" == "permissive" ]; then
|
||||
debug "loosen permissions to touch report sysfs entries"
|
||||
touch_report_files="reporting query stats"
|
||||
for entry in $touch_report_files; do
|
||||
chmod 0666 $touch_path/$entry
|
||||
debug "change permissions of $touch_path/$entry"
|
||||
done
|
||||
for entry in $(ls $touch_path/f54/ 2>/dev/null); do
|
||||
chmod 0666 $touch_path/f54/$entry
|
||||
debug "change permissions of $touch_path/f54/$entry"
|
||||
done
|
||||
unset touch_report_files
|
||||
fi
|
||||
|
||||
# Set permissions to enable factory touch tests
|
||||
chown root:mot_tcmd $touch_path/drv_irq
|
||||
chown root:mot_tcmd $touch_path/hw_irqstat
|
||||
chown root:mot_tcmd $touch_path/reset
|
||||
# Set permissions to allow Bug2Go access to touch statistics
|
||||
chown root:log $touch_path/stats
|
||||
|
||||
debug "wait until driver reports <ready to flash>..."
|
||||
while true; do
|
||||
readiness=$(cat $touch_path/poweron)
|
||||
if [ "$readiness" == "1" ]; then
|
||||
debug "ready to flash!!!"
|
||||
break;
|
||||
fi
|
||||
sleep 1
|
||||
debug "not ready; keep waiting..."
|
||||
done
|
||||
unset readiness
|
||||
|
||||
device_property=ro.hw.device
|
||||
hwrev_property=ro.hw.revision
|
||||
firmware_path=/system/etc/firmware
|
||||
|
||||
let dec_cfg_id_boot=0; dec_cfg_id_latest=0;
|
||||
|
||||
read_touch_property()
|
||||
{
|
||||
property=""
|
||||
debug "retrieving property: [$touch_path/$1]"
|
||||
property=$(cat $touch_path/$1 2> /dev/null)
|
||||
debug "touch property [$1] is: [$property]"
|
||||
[ -z "$property" ] && return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
read_panel_property()
|
||||
{
|
||||
property=""
|
||||
debug "retrieving panel property: [$panel_path/$1]"
|
||||
property=$(cat $panel_path/$1 2> /dev/null)
|
||||
debug "panel property [$1] is: [$property]"
|
||||
[ -z "$property" ] && return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
find_latest_config_id()
|
||||
{
|
||||
local fw_mask=$1
|
||||
local skip_fields=$2
|
||||
local dec max z str_hex i
|
||||
|
||||
str_cfg_id_latest=""
|
||||
|
||||
debug "scanning dir for files matching [$fw_mask]"
|
||||
let dec=0; max=0;
|
||||
for file in $(ls $fw_mask 2>/dev/null);
|
||||
do
|
||||
z=$file
|
||||
i=0
|
||||
while [ ! $i -eq $skip_fields ];
|
||||
do
|
||||
z=${z#*-}
|
||||
i=$((i+1))
|
||||
done
|
||||
|
||||
str_hex=${z%%-*};
|
||||
|
||||
let dec=0x$str_hex
|
||||
if [ $dec -gt $max ];
|
||||
then
|
||||
let max=$dec; dec_cfg_id_latest=$dec;
|
||||
str_cfg_id_latest=$str_hex
|
||||
fi
|
||||
done
|
||||
|
||||
[ -z "$str_cfg_id_latest" ] && return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
read_touch_property flashprog || error_and_leave 1
|
||||
bl_mode=$property
|
||||
debug "bl mode: $bl_mode"
|
||||
|
||||
read_touch_property productinfo || error_and_leave 1
|
||||
touch_product_id=$property
|
||||
if [ -z "$touch_product_id" ] || [ "$touch_product_id" == "0" ];
|
||||
then
|
||||
debug "touch ic reports invalid product id"
|
||||
error_and_leave 1
|
||||
fi
|
||||
debug "touch product id: $touch_product_id"
|
||||
|
||||
read_touch_property buildid || error_and_leave 1
|
||||
str_cfg_id_boot=${property#*-}
|
||||
let dec_cfg_id_boot=0x$str_cfg_id_boot
|
||||
debug "touch config id: $str_cfg_id_boot"
|
||||
|
||||
build_id_boot=${property%-*}
|
||||
debug "touch build id: $build_id_boot"
|
||||
|
||||
typeset -l product_id
|
||||
product_id=$(getprop $device_property 2> /dev/null)
|
||||
[ -z "$product_id" ] && error_and_leave 2 $device_property
|
||||
product_id=${product_id%-*}
|
||||
product_id=${product_id%_*}
|
||||
debug "product id: $product_id"
|
||||
|
||||
hwrev_id=$(getprop $hwrev_property 2> /dev/null)
|
||||
[ -z "$hwrev_id" ] && notice "hw revision undefined"
|
||||
debug "hw revision: $hwrev_id"
|
||||
|
||||
read_panel_property "panel_supplier"
|
||||
supplier=$property
|
||||
[ -z "$supplier" ] && debug "driver does not report panel supplier"
|
||||
debug "panel supplier: $supplier"
|
||||
|
||||
cd $firmware_path
|
||||
|
||||
find_best_match()
|
||||
{
|
||||
local hw_mask=$1
|
||||
local panel_supplier=$2
|
||||
local skip_fields fw_mask
|
||||
|
||||
while [ ! -z "$hw_mask" ]; do
|
||||
if [ "$hw_mask" == "-" ]; then
|
||||
hw_mask=""
|
||||
fi
|
||||
|
||||
if [ ! -z "$panel_supplier" ];
|
||||
then
|
||||
skip_fields=3
|
||||
fw_mask="$touch_vendor-$panel_supplier-$touch_product_id-*-$product_id$hw_mask.*"
|
||||
else
|
||||
skip_fields=2
|
||||
fw_mask="$touch_vendor-$touch_product_id-*-$product_id$hw_mask.*"
|
||||
fi
|
||||
|
||||
find_latest_config_id "$fw_mask" "$skip_fields" && break
|
||||
|
||||
hw_mask=${hw_mask%?}
|
||||
done
|
||||
|
||||
[ -z "$str_cfg_id_latest" ] && return 1
|
||||
|
||||
if [ -z "$panel_supplier" ]; then
|
||||
firmware_file=$(ls $touch_vendor-$touch_product_id-$str_cfg_id_latest-*-$product_id$hw_mask.*)
|
||||
else
|
||||
firmware_file=$(ls $touch_vendor-$panel_supplier-$touch_product_id-$str_cfg_id_latest-*-$product_id$hw_mask.*)
|
||||
fi
|
||||
notice "Firmware file for upgrade $firmware_file"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
hw_mask="-$hwrev_id"
|
||||
debug "hw_mask=$hw_mask"
|
||||
|
||||
match_not_found=1
|
||||
if [ ! -z "$supplier" ];
|
||||
then
|
||||
debug "search for best hw revision match with supplier"
|
||||
find_best_match "-$hwrev_id" "$supplier"
|
||||
match_not_found=$?
|
||||
fi
|
||||
|
||||
if [ "$match_not_found" -ne "0" ];
|
||||
then
|
||||
debug "search for best hw revision match without supplier"
|
||||
find_best_match "-$hwrev_id" || error_and_leave 3
|
||||
fi
|
||||
|
||||
recovery=0
|
||||
if [ "$bl_mode" == "1" ] || [ "$build_id_boot" == "0" ];
|
||||
then
|
||||
recovery=1
|
||||
notice "Initiating touch firmware recovery"
|
||||
notice " bl mode = $bl_mode"
|
||||
notice " build id = $build_id_boot"
|
||||
fi
|
||||
|
||||
if [ $dec_cfg_id_boot -ne $dec_cfg_id_latest ] || [ "$recovery" == "1" ];
|
||||
then
|
||||
debug "forcing firmware upgrade"
|
||||
echo 1 > $touch_path/forcereflash
|
||||
debug "sending reflash command"
|
||||
echo $firmware_file > $touch_path/doreflash
|
||||
read_touch_property flashprog || error_and_leave 1
|
||||
bl_mode=$property
|
||||
[ "$bl_mode" == "1" ] && error_and_leave 4
|
||||
read_touch_property buildid || error_and_leave 1
|
||||
str_cfg_id_new=${property#*-}
|
||||
build_id_new=${property%-*}
|
||||
|
||||
notice "Touch firmware config id at boot time $str_cfg_id_boot"
|
||||
notice "Touch firmware config id in the file $str_cfg_id_latest"
|
||||
notice "Touch firmware config id currently programmed $str_cfg_id_new"
|
||||
|
||||
[ "$str_cfg_id_latest" != "$str_cfg_id_new" ] && error_and_leave 7
|
||||
|
||||
if [ -f $touch_path/f54/force_update ]; then
|
||||
notice "forcing F54 registers update"
|
||||
echo 1 > $touch_path/f54/force_update
|
||||
fi
|
||||
fi
|
||||
|
||||
notice "Touch firmware is up to date"
|
||||
setprop $touch_status_prop "ready"
|
||||
notice "property [$touch_status_prop] set to [`getprop $touch_status_prop`]"
|
||||
|
||||
unset device_property hwrev_property supplier
|
||||
unset str_cfg_id_boot str_cfg_id_latest str_cfg_id_new
|
||||
unset dec_cfg_id_boot dec_cfg_id_latest match_not_found
|
||||
unset hwrev_id product_id touch_product_id scriptname
|
||||
unset synaptics_link firmware_path touch_path
|
||||
unset bl_mode dbg_on hw_mask firmware_file property
|
||||
|
||||
return 0
|
||||
446
rootdir/etc/init.mmi.usb.rc
Normal file
446
rootdir/etc/init.mmi.usb.rc
Normal file
@@ -0,0 +1,446 @@
|
||||
# Copyright (c) 2011, Code Aurora Forum. 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 Code Aurora 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.
|
||||
#
|
||||
|
||||
on init
|
||||
write /sys/class/android_usb/android0/f_rndis/wceis 1
|
||||
|
||||
on boot
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
|
||||
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
|
||||
mkdir /dev/bus 0755 root root
|
||||
mkdir /dev/bus/usb 0755 root root
|
||||
chown system system /sys/class/android_usb/android0/secure
|
||||
chmod 0660 /sys/class/android_usb/android0/secure
|
||||
# Configure BAM2BAM_IPA for RNDIS
|
||||
write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports BAM2BAM_IPA
|
||||
# Disable RNDIS UL aggregation
|
||||
write /sys/class/android_usb/android0/f_rndis_qc/max_pkt_per_xfer 1
|
||||
write /sys/module/g_android/parameters/mtp_rx_req_len 524288
|
||||
write /sys/module/g_android/parameters/mtp_tx_req_len 524288
|
||||
|
||||
chown root system /sys/module/uvcvideo/parameters/quirks
|
||||
chmod 0660 /sys/module/uvcvideo/parameters/quirks
|
||||
|
||||
on charger
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 22B8
|
||||
write /sys/class/android_usb/android0/idProduct 2EB7
|
||||
write /sys/class/android_usb/android0/functions mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
|
||||
on fs
|
||||
mkdir /dev/usb-ffs 0770 shell shell
|
||||
mkdir /dev/usb-ffs/adb 0770 shell shell
|
||||
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
|
||||
write /sys/class/android_usb/android0/f_ffs/aliases adb
|
||||
|
||||
# Disable USB-SS in bp-tools
|
||||
on property:ro.bootmode=bp-tools
|
||||
write /sys/module/fusb302/parameters/disable_ss_switch 1
|
||||
|
||||
# USB compositions
|
||||
# QC compositions for msm8953
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9026
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# QC compositions for MSM8996
|
||||
on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_bam,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_bam,mass_storage
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9026
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# QC compositions for MSM8937
|
||||
on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9091
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9092
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,rmnet_ipa,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9091
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,rmnet_ipa
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9092
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# QDSS - Qualcomm Debug Subsystem
|
||||
on property:sys.usb.config=diag,qdss,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9060
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/functions diag,qdss,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Motorola Compositions for msm8953 bp-tools mode
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt_adb}
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Motorola Compositions for msm8937 bp-tools mode
|
||||
on property:sys.usb.config=diag,serial_smd,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt_adb}
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,rmnet
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt}
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,rmnet_bam_ipa,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt_adb}
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,rmnet_bam_ipa
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt}
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt}
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,serial_smd,serial_tty,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpteth_adb}
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,serial,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,serial_smd,serial_tty
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpteth}
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,serial
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Motorola Compositions for MSM8996 bp-tools mode
|
||||
on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt_adb}
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt}
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,serial_cdev,serial_tty,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpteth_adb}
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,serial,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,serial_cdev,serial_tty
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.bpteth}
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,serial
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#Factory mode Compositions
|
||||
on property:sys.usb.config=usbnet,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct 2e2d
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/functions usbnet,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=usbnet
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idProduct 2e2c
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/functions usbnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Standard AOSP Compositions
|
||||
on property:sys.usb.config=rndis
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct 2e24
|
||||
write /sys/class/android_usb/android0/functions rndis
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct 2e25
|
||||
write /sys/class/android_usb/android0/functions rndis,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceSubClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceProtocol 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.mtp}
|
||||
write /sys/class/android_usb/android0/functions mtp
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,cdrom
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/f_mass_storage/lun/file ""
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceSubClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceProtocol 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.mtp_cdrom}
|
||||
write /sys/class/android_usb/android0/f_mass_storage/cdrom 1
|
||||
write /sys/class/android_usb/android0/functions mtp,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
write /sys/class/android_usb/android0/f_mass_storage/lun/file "/system/etc/cdrom"
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceSubClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceProtocol 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.mtp_adb}
|
||||
write /sys/class/android_usb/android0/functions mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ptp
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceSubClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceProtocol 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.ptp}
|
||||
write /sys/class/android_usb/android0/functions ptp
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ptp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceSubClass 0
|
||||
write /sys/class/android_usb/android0/bDeviceProtocol 0
|
||||
write /sys/class/android_usb/android0/idVendor 22b8
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.ptp_adb}
|
||||
write /sys/class/android_usb/android0/functions ptp,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB midi configuration
|
||||
on property:sys.usb.config=midi
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18D1
|
||||
write /sys/class/android_usb/android0/idProduct 4EE8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB midi configuration, with adb
|
||||
on property:sys.usb.config=midi,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18D1
|
||||
write /sys/class/android_usb/android0/idProduct 4EE9
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Set RPS Mask for USB tethering
|
||||
on property:sys.usb.tethering=true
|
||||
write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${sys.usb.rps_mask}
|
||||
write /sys/class/net/rmnet_data0/queues/rx-0/rps_cpus ${sys.usb.rps_mask}
|
||||
|
||||
on property:sys.usb.tethering=false
|
||||
write /sys/class/net/rmnet_data0/queues/rx-0/rps_cpus ${sys.rmnet_vnd.rps_mask}
|
||||
90
rootdir/etc/init.qcom.bt.sh
Normal file
90
rootdir/etc/init.qcom.bt.sh
Normal file
@@ -0,0 +1,90 @@
|
||||
#!/system/bin/sh
|
||||
# Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
LOG_TAG="qcom-bluetooth"
|
||||
LOG_NAME="${0}:"
|
||||
|
||||
loge ()
|
||||
{
|
||||
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
logi ()
|
||||
{
|
||||
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
failed ()
|
||||
{
|
||||
loge "$1: exit code $2"
|
||||
exit $2
|
||||
}
|
||||
|
||||
POWER_CLASS=`getprop qcom.bt.dev_power_class`
|
||||
LE_POWER_CLASS=`getprop qcom.bt.le_dev_pwr_class`
|
||||
|
||||
setprop bluetooth.status off
|
||||
|
||||
case $POWER_CLASS in
|
||||
1) PWR_CLASS="-p 0" ;
|
||||
logi "Power Class: 1";;
|
||||
2) PWR_CLASS="-p 1" ;
|
||||
logi "Power Class: 2";;
|
||||
3) PWR_CLASS="-p 2" ;
|
||||
logi "Power Class: CUSTOM";;
|
||||
*) PWR_CLASS="";
|
||||
logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)";
|
||||
logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";;
|
||||
esac
|
||||
|
||||
case $LE_POWER_CLASS in
|
||||
1) LE_PWR_CLASS="-P 0" ;
|
||||
logi "LE Power Class: 1";;
|
||||
2) LE_PWR_CLASS="-P 1" ;
|
||||
logi "LE Power Class: 2";;
|
||||
3) LE_PWR_CLASS="-P 2" ;
|
||||
logi "LE Power Class: CUSTOM";;
|
||||
*) LE_PWR_CLASS="-P 1";
|
||||
logi "LE Power Class: Ignored. Default(2) used (1-CLASS1/2-CLASS2/3-CUSTOM)";
|
||||
logi "LE Power Class: To override, Before turning BT ON; setprop qcom.bt.le_dev_pwr_class <1 or 2 or 3>";;
|
||||
esac
|
||||
|
||||
eval $(/system/bin/hci_qcomm_init -e $PWR_CLASS $LE_PWR_CLASS && echo "exit_code_hci_qcomm_init=0" || echo "exit_code_hci_qcomm_init=1")
|
||||
|
||||
case $exit_code_hci_qcomm_init in
|
||||
0) logi "Bluetooth QSoC firmware download succeeded, $BTS_DEVICE $BTS_TYPE $BTS_BAUD $BTS_ADDRESS";;
|
||||
*) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init;
|
||||
|
||||
setprop bluetooth.status off
|
||||
|
||||
exit $exit_code_hci_qcomm_init;;
|
||||
esac
|
||||
|
||||
setprop bluetooth.status on
|
||||
|
||||
exit 0
|
||||
721
rootdir/etc/init.qcom.rc
Normal file
721
rootdir/etc/init.qcom.rc
Normal file
@@ -0,0 +1,721 @@
|
||||
# Copyright (c) 2009-2012, 2014-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.
|
||||
#
|
||||
|
||||
import init.mmi.rc
|
||||
|
||||
on early-init
|
||||
mount debugfs debugfs /sys/kernel/debug
|
||||
chmod 0755 /sys/kernel/debug
|
||||
mkdir /firmware 0771 system system
|
||||
mkdir /system 0777 root root
|
||||
symlink /data/tombstones /tombstones
|
||||
mkdir /dsp 0771 media media
|
||||
|
||||
on fs
|
||||
wait /dev/block/bootdevice
|
||||
mount_all fstab.qcom
|
||||
write /proc/sys/vm/swappiness 100
|
||||
|
||||
# Keeping following partitions outside fstab file. As user may not have
|
||||
# these partition flashed on the device. Failure to mount any partition in fstab file
|
||||
# results in failure to launch late-start class.
|
||||
|
||||
wait /dev/block/bootdevice/by-name/persist
|
||||
mkdir /persist/data 0700 system system
|
||||
restorecon_recursive /persist
|
||||
|
||||
wait /dev/block/bootdevice/by-name/dsp
|
||||
restorecon_recursive /dsp
|
||||
|
||||
on init
|
||||
# Symbols required for motorola blobs
|
||||
export LD_SHIM_LIBS /system/vendor/lib/libmot_gpu_mapper.so|libshim_camera.so:/system/vendor/lib/lib-imsvt.so|libshim_ims.so:/system/bin/adspd|libshim_adsp.so
|
||||
|
||||
write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
|
||||
|
||||
# Set permissions for persist partition
|
||||
mkdir /persist 0771 system system
|
||||
|
||||
# Create cgroup mount point for memory
|
||||
mkdir /sys/fs/cgroup/memory/bg 0750 root system
|
||||
write /sys/fs/cgroup/memory/bg/memory.swappiness 140
|
||||
write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1
|
||||
chown root system /sys/fs/cgroup/memory/bg/tasks
|
||||
chmod 0660 /sys/fs/cgroup/memory/bg/tasks
|
||||
|
||||
on early-boot
|
||||
# set RLIMIT_MEMLOCK to 64MB
|
||||
setrlimit 8 67108864 67108864
|
||||
# Allow subsystem (modem etc) debugging
|
||||
write /sys/kernel/boot_adsp/boot 1
|
||||
# Motorola uses external sensorhub, do not boot the slpi
|
||||
# write /sys/kernel/boot_slpi/boot 1
|
||||
|
||||
on boot
|
||||
insmod /system/lib/modules/adsprpc.ko
|
||||
# access permission for secure touch
|
||||
chmod 0660 /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch_enable
|
||||
chmod 0440 /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch
|
||||
chown system drmrpc /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch_enable
|
||||
chown system drmrpc /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch
|
||||
|
||||
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
|
||||
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
|
||||
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
|
||||
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
|
||||
chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
|
||||
chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
|
||||
chown system system /sys/module/sco/parameters/disable_esco
|
||||
chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
|
||||
chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
|
||||
chmod 0660 /sys/module/bluetooth_power/parameters/power
|
||||
chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
|
||||
chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set
|
||||
chmod 0660 /sys/class/rfkill/rfkill0/state
|
||||
chmod 0660 /proc/bluetooth/sleep/proto
|
||||
chown bluetooth net_bt /dev/ttyHS0
|
||||
chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
|
||||
chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
|
||||
chmod 0660 /dev/ttyHS0
|
||||
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
|
||||
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
|
||||
|
||||
chmod 0660 /dev/ttyHS2
|
||||
chown bluetooth bluetooth /dev/ttyHS2
|
||||
|
||||
chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
|
||||
chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
|
||||
|
||||
# Mark the copy complete flag to not completed
|
||||
write /data/misc/radio/copy_complete 0
|
||||
chown radio radio /data/misc/radio/copy_complete
|
||||
chmod 0660 /data/misc/radio/copy_complete
|
||||
|
||||
# File flags for prebuilt ril db file
|
||||
write /data/misc/radio/prebuilt_db_support 1
|
||||
chown radio radio /data/misc/radio/prebuilt_db_support
|
||||
chmod 0400 /data/misc/radio/prebuilt_db_support
|
||||
write /data/misc/radio/db_check_done 0
|
||||
chown radio radio /data/misc/radio/db_check_done
|
||||
chmod 0660 /data/misc/radio/db_check_done
|
||||
|
||||
start rmt_storage
|
||||
|
||||
#Create QMUX deamon socket area
|
||||
mkdir /dev/socket/qmux_radio 0770 radio radio
|
||||
chmod 2770 /dev/socket/qmux_radio
|
||||
mkdir /dev/socket/qmux_audio 0770 media audio
|
||||
chmod 2770 /dev/socket/qmux_audio
|
||||
mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
|
||||
chmod 2770 /dev/socket/qmux_bluetooth
|
||||
mkdir /dev/socket/qmux_gps 0770 gps gps
|
||||
chmod 2770 /dev/socket/qmux_gps
|
||||
|
||||
mkdir /persist/drm 0770 system system
|
||||
mkdir /persist/bluetooth 0770 bluetooth bluetooth
|
||||
mkdir /persist/misc 0770 system system
|
||||
|
||||
#Create NETMGR daemon socket area
|
||||
mkdir /dev/socket/netmgr 0750 radio radio
|
||||
|
||||
setprop wifi.interface wlan0
|
||||
|
||||
setprop ro.telephony.call_ring.multiple false
|
||||
|
||||
#enable camera read sensors data
|
||||
setprop persist.camera.gyro.disable 0
|
||||
|
||||
chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
|
||||
|
||||
#For bridgemgr daemon to inform the USB driver of the correct transport
|
||||
chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
|
||||
|
||||
setprop net.tcp.2g_init_rwnd 10
|
||||
|
||||
# Assign TCP buffer thresholds to be ceiling value of technology maximums
|
||||
# Increased technology maximums should be reflected here.
|
||||
write /proc/sys/net/core/rmem_max 8388608
|
||||
write /proc/sys/net/core/wmem_max 8388608
|
||||
|
||||
#To allow interfaces to get v6 address when tethering is enabled
|
||||
write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
|
||||
|
||||
# To prevent out of order acknowledgements from making
|
||||
# connection tracking to treat them as not belonging to
|
||||
# the connection they belong to.
|
||||
# Otherwise, a weird issue happens in which some long
|
||||
# connections on high-throughput links get dropped when
|
||||
# an ack packet comes out of order
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
|
||||
|
||||
# Allow access for CCID command/response timeout configuration
|
||||
chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
|
||||
|
||||
# bond0 used by FST Manager
|
||||
chown wifi wifi /sys/class/net/bond0/bonding/queue_id
|
||||
|
||||
# FPC home button permissions
|
||||
chown system system /sys/homebutton/enable
|
||||
|
||||
# Display
|
||||
chown system graphics /sys/class/graphics/fb1/hpd
|
||||
chmod 0664 /sys/class/graphics/fb1/hpd
|
||||
chown system graphics /sys/class/graphics/fb1/res_info
|
||||
chmod 0664 /sys/class/graphics/fb1/res_info
|
||||
chown system graphics /sys/class/graphics/fb1/video_mode
|
||||
chmod 0664 /sys/class/graphics/fb1/video_mode
|
||||
chown system graphics /sys/class/graphics/fb1/cec/enable
|
||||
chmod 0664 /sys/class/graphics/fb1/cec/enable
|
||||
chown system graphics /sys/class/graphics/fb1/cec/logical_addr
|
||||
chmod 0664 /sys/class/graphics/fb1/cec/logical_addr
|
||||
chown system graphics /sys/class/graphics/fb1/cec/rd_msg
|
||||
chmod 0664 /sys/class/graphics/fb1/cec/rd_msg
|
||||
chown system graphics /sys/class/graphics/fb1/cec/wr_msg
|
||||
chmod 0600 /sys/class/graphics/fb1/cec/wr_msg
|
||||
|
||||
chown system graphics /sys/class/graphics/fb0/idle_time
|
||||
chmod 0664 /sys/class/graphics/fb0/idle_time
|
||||
chown system graphics /sys/class/graphics/fb0/dyn_pu
|
||||
chmod 0664 /sys/class/graphics/fb0/dyn_pu
|
||||
chown system graphics /sys/class/graphics/fb0/modes
|
||||
chmod 0664 /sys/class/graphics/fb0/modes
|
||||
chown system graphics /sys/class/graphics/fb0/mode
|
||||
chmod 0664 /sys/class/graphics/fb0/mode
|
||||
chown system graphics /sys/class/graphics/fb0/msm_cmd_autorefresh_en
|
||||
chmod 0664 /sys/class/graphics/fb0/msm_cmd_autorefresh_en
|
||||
|
||||
setprop debug.gralloc.enable_fb_ubwc 1
|
||||
setprop debug.gralloc.gfx_ubwc_disable 0
|
||||
|
||||
# msm specific files that need to be created on /data
|
||||
on post-fs-data
|
||||
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 /persist/data/sfs 0700 system system
|
||||
mkdir /persist/data/tz 0700 system system
|
||||
mkdir /data/misc/dts 0770 media audio
|
||||
mkdir /data/misc/hbtp 0750 system system
|
||||
|
||||
#Create directories for Fingerprint
|
||||
mkdir /data/misc/stargate 0770 system system
|
||||
mkdir /data/misc/stargate/bg_estimation 0770 system system
|
||||
mkdir /data/misc/stargate/calib_test 0770 system system
|
||||
mkdir /data/misc/stargate/database 0770 system system
|
||||
|
||||
# Create directory for TZ Apps
|
||||
mkdir /data/misc/qsee 0770 system system
|
||||
|
||||
#Create folder for mm-qcamera-daemon
|
||||
mkdir /data/misc/camera 0770 camera camera
|
||||
|
||||
mkdir /data/media 0770 media_rw media_rw
|
||||
chown media_rw media_rw /data/media
|
||||
|
||||
mkdir /data/misc/ipa 0700 net_admin net_admin
|
||||
|
||||
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
|
||||
|
||||
# Create the directories used by the Wireless subsystem
|
||||
mkdir /data/misc/wifi 0770 wifi wifi
|
||||
mkdir /data/misc/wifi/sockets 0770 wifi wifi
|
||||
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
|
||||
mkdir /data/misc/dhcp 0750 dhcp system
|
||||
|
||||
#create port-bridge log dir
|
||||
mkdir /data/misc/port_bridge 0770 radio radio
|
||||
chmod 0770 /data/misc/port_bridge
|
||||
|
||||
#create netmgr log dir
|
||||
mkdir /data/misc/netmgr 0770 radio radio
|
||||
chmod 0770 /data/misc/netmgr
|
||||
|
||||
# Create the directories used by CnE subsystem
|
||||
mkdir /data/connectivity 0771 system system
|
||||
chown system system /data/connectivity
|
||||
|
||||
# Create the directories used by DPM subsystem
|
||||
mkdir /data/dpm 0771 system system
|
||||
chown system system /data/dpm
|
||||
|
||||
mkdir /data/dpm/nsrm 0771 system system
|
||||
chown system system /data/dpm/nsrm
|
||||
|
||||
# Create directory used by audio subsystem
|
||||
mkdir /data/misc/audio 0770 audio audio
|
||||
|
||||
# Create directory for audio delta files
|
||||
mkdir /data/misc/audio/acdbdata 0770 media audio
|
||||
mkdir /data/misc/audio/acdbdata/delta 0770 media audio
|
||||
|
||||
# Create directory used by the DASH client
|
||||
mkdir /data/misc/dash 0770 media audio
|
||||
|
||||
# Create directory used by display clients
|
||||
mkdir /data/misc/display 0770 system graphics
|
||||
|
||||
# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
|
||||
# We chown/chmod /persist again so because mount is run as root + defaults
|
||||
chown system system /persist
|
||||
chmod 0771 /persist
|
||||
chown system system /persist/WCNSS_qcom_wlan_nv.bin
|
||||
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
|
||||
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
|
||||
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
|
||||
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
|
||||
|
||||
# Chown polling nodes as needed from UI running on system server
|
||||
chown system system /sys/devices/platform/msm_sdcc.1/polling
|
||||
chown system system /sys/devices/platform/msm_sdcc.2/polling
|
||||
chown system system /sys/devices/platform/msm_sdcc.3/polling
|
||||
chown system system /sys/devices/platform/msm_sdcc.4/polling
|
||||
|
||||
#Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
|
||||
mkdir /data/system 0775 system system
|
||||
#symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
|
||||
|
||||
#Create directories for Location services
|
||||
mkdir /data/misc/location 0770 gps gps
|
||||
mkdir /data/misc/location/mq 0770 gps gps
|
||||
mkdir /data/misc/location/xtwifi 0770 gps gps
|
||||
mkdir /data/misc/location/gpsone_d 0770 system gps
|
||||
mkdir /data/misc/location/quipc 0770 gps system
|
||||
mkdir /data/misc/location/gsiff 0770 gps gps
|
||||
|
||||
#Create directory from IMS services
|
||||
mkdir /data/shared 0755
|
||||
chown system system /data/shared
|
||||
|
||||
#Create directory for FOTA
|
||||
mkdir /data/fota 0771
|
||||
chown system system /data/fota
|
||||
|
||||
#Create directory for hostapd
|
||||
mkdir /data/hostapd 0770 system wifi
|
||||
|
||||
# Create /data/time folder for time-services
|
||||
mkdir /data/time/ 0700 system system
|
||||
|
||||
mkdir /data/audio/ 0770 media audio
|
||||
|
||||
# Create a folder for audio delta files
|
||||
mkdir /data/audio/acdbdata 0770 media audio
|
||||
mkdir /data/audio/acdbdata/delta 0770 media audio
|
||||
|
||||
#Create a folder for SRS to be able to create a usercfg file
|
||||
mkdir /data/data/media 0770 media media
|
||||
|
||||
#Create FM dir for patchdownloader
|
||||
mkdir /data/misc/fm 0770 system system
|
||||
chmod 0770 /data/misc/fm
|
||||
|
||||
# RIDL data
|
||||
mkdir /data/misc/SelfHost/ 0710 system shell
|
||||
mkdir /data/misc/SelfHost/QCLogs/ 2750 system shell
|
||||
mkdir /data/misc/SelfHost/QCLogs/temp/ 0700 system shell
|
||||
mkdir /data/misc/SelfHost/storage/ 0700 system shell
|
||||
mkdir /data/misc/SelfHost/Running/ 2750 system shell
|
||||
mkdir /data/misc/SelfHost/socket/ 2770 system system
|
||||
|
||||
#Create PERFD deamon related dirs
|
||||
mkdir /data/system/perfd 0770 root system
|
||||
chmod 2770 /data/system/perfd
|
||||
|
||||
# NFC local data and nfcee xml storage
|
||||
mkdir /data/nfc 0770 nfc nfc
|
||||
mkdir /data/nfc/param 0770 nfc nfc
|
||||
|
||||
#Create IOP deamon related dirs
|
||||
mkdir /data/misc/iop 0770 root system
|
||||
|
||||
#Create SWAP related dirs
|
||||
mkdir /data/system/swap 0770 root system
|
||||
chmod 2770 /data/system/swap
|
||||
|
||||
# Force all SSR systems to 'related' so they attempt
|
||||
# self-recovery without rebooting the device
|
||||
write /sys/bus/msm_subsys/devices/subsys0/restart_level related
|
||||
write /sys/bus/msm_subsys/devices/subsys1/restart_level related
|
||||
write /sys/bus/msm_subsys/devices/subsys2/restart_level related
|
||||
write /sys/bus/msm_subsys/devices/subsys3/restart_level related
|
||||
write /sys/bus/msm_subsys/devices/subsys4/restart_level related
|
||||
|
||||
setprop vold.post_fs_data_done 1
|
||||
|
||||
service charger /charger
|
||||
class charger
|
||||
group log
|
||||
seclabel u:r:healthd:s0
|
||||
|
||||
# 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 perfd /system/vendor/bin/perfd
|
||||
class main
|
||||
user root
|
||||
group root readproc
|
||||
disabled
|
||||
socket perfd seqpacket 0666 root system
|
||||
writepid /dev/cpuset/system-background/tasks
|
||||
|
||||
service qseecomd /system/bin/qseecomd
|
||||
class core
|
||||
user root
|
||||
group root
|
||||
|
||||
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
|
||||
group root
|
||||
|
||||
service time_daemon /system/bin/time_daemon
|
||||
class late_start
|
||||
user root
|
||||
group root
|
||||
|
||||
service audiod /system/bin/audiod
|
||||
class late_start
|
||||
user system
|
||||
group system
|
||||
|
||||
on property:vold.decrypt=trigger_restart_framework
|
||||
start config_bt_addr
|
||||
|
||||
on property:persist.env.fastdorm.enabled=true
|
||||
setprop persist.radio.data_no_toggle 1
|
||||
|
||||
#start camera server as daemon
|
||||
service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||
class late_start
|
||||
user camera
|
||||
group camera system inet input graphics
|
||||
|
||||
service cnd /system/bin/cnd
|
||||
class main
|
||||
socket cnd stream 660 root inet
|
||||
|
||||
service wcnss-service /system/bin/wcnss_service
|
||||
class main
|
||||
user system
|
||||
group system wifi radio
|
||||
oneshot
|
||||
|
||||
service adsprpcd /system/bin/adsprpcd
|
||||
class main
|
||||
user media
|
||||
group media
|
||||
|
||||
service irsc_util /system/bin/irsc_util "/etc/sec_config"
|
||||
class core
|
||||
user root
|
||||
oneshot
|
||||
|
||||
service ims_rtp_daemon /system/bin/ims_rtp_daemon
|
||||
class main
|
||||
user system
|
||||
socket ims_rtpd stream 0660 system radio
|
||||
group radio diag diag inet log
|
||||
disabled
|
||||
|
||||
on property:sys.ims.DATA_DAEMON_STATUS=1
|
||||
start ims_rtp_daemon
|
||||
|
||||
service imscmservice /system/bin/imscmservice
|
||||
class main
|
||||
user system
|
||||
group radio diag diag log
|
||||
disabled
|
||||
|
||||
on property:sys.ims.DATA_DAEMON_STATUS=1
|
||||
start imscmservice
|
||||
|
||||
service imsdatadaemon /system/bin/imsdatadaemon
|
||||
class main
|
||||
user system
|
||||
socket ims_datad stream 0660 system radio
|
||||
group system wifi radio inet log diag
|
||||
disabled
|
||||
|
||||
on property:sys.ims.QMI_DAEMON_STATUS=1
|
||||
start imsdatadaemon
|
||||
|
||||
service imsqmidaemon /system/bin/imsqmidaemon
|
||||
class main
|
||||
user system
|
||||
socket ims_qmid stream 0660 system radio
|
||||
group radio log diag
|
||||
|
||||
service rmt_storage /system/bin/rmt_storage
|
||||
class core
|
||||
user root
|
||||
|
||||
service tftp_server /system/bin/tftp_server
|
||||
class core
|
||||
user root
|
||||
|
||||
service per_mgr /system/bin/pm-service
|
||||
class core
|
||||
user system
|
||||
group system net_raw
|
||||
|
||||
service per_proxy /system/bin/pm-proxy
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
|
||||
on property:init.svc.per_mgr=running
|
||||
start per_proxy
|
||||
|
||||
on property:sys.shutdown.requested=*
|
||||
stop per_proxy
|
||||
|
||||
service config_bt_addr /system/bin/btnvtool -O
|
||||
class core
|
||||
user bluetooth
|
||||
group bluetooth radio
|
||||
oneshot
|
||||
|
||||
service netmgrd /system/bin/netmgrd
|
||||
class main
|
||||
|
||||
service ipacm-diag /system/bin/ipacm-diag
|
||||
class main
|
||||
user system
|
||||
socket ipacm_log_file dgram 660 system net_admin
|
||||
group net_admin qcom_diag
|
||||
|
||||
service ipacm /system/bin/ipacm
|
||||
class main
|
||||
user net_admin
|
||||
group net_admin inet
|
||||
|
||||
service qti /system/vendor/bin/qti
|
||||
class main
|
||||
user radio
|
||||
group radio net_raw qcom_diag usb net_admin
|
||||
|
||||
on property:ro.use_data_netmgrd=false
|
||||
# netmgr not supported on specific target
|
||||
stop netmgrd
|
||||
|
||||
# Adjust socket buffer to enlarge TCP receive window for high bandwidth
|
||||
# but only if ro.data.large_tcp_window_size property is set.
|
||||
on property:ro.data.large_tcp_window_size=true
|
||||
write /proc/sys/net/ipv4/tcp_adv_win_scale 2
|
||||
|
||||
on property:sys.sysctl.tcp_adv_win_scale=*
|
||||
write /proc/sys/net/ipv4/tcp_adv_win_scale ${sys.sysctl.tcp_adv_win_scale}
|
||||
|
||||
service p2p_supplicant /system/bin/wpa_supplicant \
|
||||
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
|
||||
-I/system/etc/wifi/p2p_supplicant_overlay.conf -N \
|
||||
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
||||
-I/system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
-O/data/misc/wifi/sockets -puse_p2p_group_interface=1 -dd \
|
||||
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
|
||||
# we will start as root and wpa_supplicant will switch to user wifi
|
||||
# after setting up the capabilities required for WEXT
|
||||
# user wifi
|
||||
# group wifi inet keystore
|
||||
class main
|
||||
socket wpa_wlan0 dgram 660 wifi wifi
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service wpa_supplicant /system/bin/wpa_supplicant \
|
||||
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
||||
-I/system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
-O/data/misc/wifi/sockets -dd \
|
||||
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
|
||||
# we will start as root and wpa_supplicant will switch to user wifi
|
||||
# after setting up the capabilities required for WEXT
|
||||
# user wifi
|
||||
# group wifi inet keystore
|
||||
class main
|
||||
socket wpa_wlan0 dgram 660 wifi wifi
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service hostapd /system/bin/hostapd -dd /data/misc/wifi/hostapd.conf
|
||||
class late_start
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
service ril-daemon /system/bin/rild
|
||||
class main
|
||||
socket rild stream 660 root radio
|
||||
socket sap_uim_socket1 stream 660 bluetooth bluetooth
|
||||
socket rild-debug stream 660 radio system
|
||||
socket cutback stream 660 media radio
|
||||
socket wpa_wlan0 dgram 660 wifi wifi
|
||||
user root
|
||||
group radio cache inet misc audio log diag qcom_diag net_raw wifi compass
|
||||
writepid /dev/cpuset/system-background/tasks
|
||||
|
||||
service ril-daemon2 /system/bin/rild -c 2
|
||||
class main
|
||||
socket rild2 stream 660 root radio
|
||||
socket rild-debug2 stream 660 radio system
|
||||
user root
|
||||
group radio cache inet misc audio sdcard_r sdcard_rw qcom_diag diag log
|
||||
|
||||
service rild2-wrapper /system/bin/sh /system/etc/init.qcom.ril.sh
|
||||
class late_start
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
|
||||
service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
|
||||
class core
|
||||
user root
|
||||
group root
|
||||
|
||||
on charger
|
||||
wait /dev/block/bootdevice/by-name/system
|
||||
mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1
|
||||
load_all_props
|
||||
setprop sys.usb.configfs 0
|
||||
setprop persist.sys.usb.config mass_storage
|
||||
write /sys/class/leds/white/trigger "battery-full"
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
write /dev/kmsg "Boot completed "
|
||||
setprop sys.io.scheduler bfq
|
||||
|
||||
# scheduler settings
|
||||
write /proc/sys/kernel/sched_window_stats_policy 3
|
||||
write /proc/sys/kernel/sched_ravg_hist_size 3
|
||||
|
||||
# task packing settings
|
||||
write /sys/devices/system/cpu/cpu0/sched_static_cpu_pwr_cost 0
|
||||
write /sys/devices/system/cpu/cpu1/sched_static_cpu_pwr_cost 0
|
||||
write /sys/devices/system/cpu/cpu2/sched_static_cpu_pwr_cost 0
|
||||
write /sys/devices/system/cpu/cpu3/sched_static_cpu_pwr_cost 0
|
||||
write /sys/devices/system/cpu/cpu4/sched_static_cpu_pwr_cost 0
|
||||
write /sys/devices/system/cpu/cpu5/sched_static_cpu_pwr_cost 0
|
||||
write /sys/devices/system/cpu/cpu6/sched_static_cpu_pwr_cost 0
|
||||
write /sys/devices/system/cpu/cpu7/sched_static_cpu_pwr_cost 0
|
||||
|
||||
# init task load, restrict wakeups to preferred cluster
|
||||
write /proc/sys/kernel/sched_init_task_load 15
|
||||
|
||||
# spill load is set to 100% by default in the kernel
|
||||
write /proc/sys/kernel/sched_spill_nr_run 3
|
||||
|
||||
# Apply inter-cluster load balancer restrictions
|
||||
write /proc/sys/kernel/sched_restrict_cluster_spill 1
|
||||
|
||||
write /sys/class/devfreq/qcom,mincpubw/governor "cpufreq"
|
||||
|
||||
# disable thermal & BCL core_control to update interactive gov settings
|
||||
write /sys/module/msm_thermal/core_control/enabled 0
|
||||
|
||||
# governor settings
|
||||
write /sys/devices/system/cpu/cpu0/online 1
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "19000 1401600:39000"
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 85
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1401600
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/target_loads "85 1401600:80"
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 39000
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 652800
|
||||
|
||||
# re-enable thermal & BCL core_control now
|
||||
write /sys/module/msm_thermal/core_control/enabled 1
|
||||
|
||||
# Bring up all cores online
|
||||
write /sys/devices/system/cpu/cpu1/online 1
|
||||
write /sys/devices/system/cpu/cpu2/online 1
|
||||
write /sys/devices/system/cpu/cpu3/online 1
|
||||
write /sys/devices/system/cpu/cpu4/online 1
|
||||
write /sys/devices/system/cpu/cpu5/online 1
|
||||
write /sys/devices/system/cpu/cpu6/online 1
|
||||
write /sys/devices/system/cpu/cpu7/online 1
|
||||
|
||||
# Enable low power modes
|
||||
write /sys/module/lpm_levels/parameters/sleep_disabled 0
|
||||
|
||||
# SMP scheduler
|
||||
write /proc/sys/kernel/sched_upmigrate 100
|
||||
write /proc/sys/kernel/sched_downmigrate 100
|
||||
|
||||
# Enable sched guided freq control
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/use_sched_load 1
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif 1
|
||||
write /proc/sys/kernel/sched_freq_inc_notify 200000
|
||||
write /proc/sys/kernel/sched_freq_dec_notify 200000
|
||||
|
||||
# Log kernel wake-up source
|
||||
write /sys/module/msm_show_resume_irq/parameters/debug_mask 1
|
||||
|
||||
#Reset read ahead for dm-1 to 128KB
|
||||
write /sys/block/dm-1/queue/read_ahead_kb 128
|
||||
#Reset the "read ahead" setting for system patition
|
||||
# result: ext4: 32KB, dm_verity:64KB, block layer: 128KB
|
||||
write /sys/fs/ext4/dm-0/inode_readahead_blks 8
|
||||
write /sys/module/dm_verity/parameters/prefetch_cluster 65536
|
||||
|
||||
write /sys/block/mmcblk0/bdi/read_ahead_kb 128
|
||||
write /sys/block/mmcblk0/queue/read_ahead_kb 128
|
||||
write /sys/block/dm-0/queue/read_ahead_kb 128
|
||||
write /sys/block/dm-1/queue/read_ahead_kb 128
|
||||
#WDSP FW boot sysfs node used by STHAL
|
||||
chown media audio /sys/kernel/wdsp0/boot
|
||||
rm /data/system/perfd/default_values
|
||||
start perfd
|
||||
8
rootdir/etc/init.qcom.ril.sh
Normal file
8
rootdir/etc/init.qcom.ril.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/system/bin/sh
|
||||
export PATH=/system/xbin:$PATH
|
||||
|
||||
multisim=`getprop persist.radio.multisim.config`
|
||||
|
||||
if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
|
||||
start ril-daemon2
|
||||
fi
|
||||
359
rootdir/etc/ueventd.qcom.rc
Normal file
359
rootdir/etc/ueventd.qcom.rc
Normal file
@@ -0,0 +1,359 @@
|
||||
# Copyright (c) 2012-2015, 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.
|
||||
#
|
||||
|
||||
/dev/null 0666 root root
|
||||
/dev/zero 0666 root root
|
||||
/dev/full 0666 root root
|
||||
/dev/ptmx 0666 root root
|
||||
/dev/tty 0666 root root
|
||||
/dev/random 0666 root root
|
||||
/dev/urandom 0666 root root
|
||||
|
||||
/dev/ashmem 0666 root root
|
||||
/dev/binder 0666 root root
|
||||
/dev/tspdrv 0666 root root
|
||||
/dev/ttyHSL0 0660 radio system
|
||||
# logger should be world writable (for logging) but not readable
|
||||
/dev/log/* 0666 root log
|
||||
|
||||
# the DIAG device node is not world writable/readable.
|
||||
/dev/diag 0660 system qcom_diag
|
||||
/dev/ttydiag0 0660 system qcom_diag
|
||||
/dev/ttydiag1 0660 system qcom_diag
|
||||
/dev/ttydiag2 0660 system qcom_diag
|
||||
|
||||
/dev/genlock 0666 system system
|
||||
/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 system net_admin
|
||||
/dev/wwan_ioctl 0660 system net_admin
|
||||
/dev/ipaNatTable 0660 net_admin net_admin
|
||||
/dev/rmnet_ctrl 0660 usb usb
|
||||
/dev/dpl_ctrl 0660 usb usb
|
||||
|
||||
#permissions for CSVT
|
||||
/dev/smd11 0660 radio radio
|
||||
|
||||
/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/v4l2-hal-ctrl 0660 system camera
|
||||
/dev/media* 0660 system camera
|
||||
/dev/v4l-subdev* 0660 system camera
|
||||
/dev/qseecom 0660 system drmrpc
|
||||
/dev/qsee_ipc_irq_spss 0660 system drmrpc
|
||||
/dev/seemplog 0660 system system
|
||||
/dev/pft 0660 system drmrpc
|
||||
/dev/spcom 0660 system system
|
||||
/dev/sp_kernel 0660 system system
|
||||
/dev/sp_ssr 0660 system system
|
||||
/dev/sp_keymaster 0660 system system
|
||||
/dev/cryptoapp 0660 system system
|
||||
/dev/gemini0 0660 system camera
|
||||
/dev/jpeg0 0660 system camera
|
||||
/dev/jpeg1 0660 system camera
|
||||
/dev/jpeg2 0660 system camera
|
||||
/dev/jpeg3 0660 system camera
|
||||
/dev/adsprpc-smd 0664 system system
|
||||
/dev/system_health_monitor 0644 radio system
|
||||
/dev/mdss_rotator 0664 system system
|
||||
# wlan
|
||||
/dev/wcnss_wlan 0660 system system
|
||||
/dev/wcnss_ctrl 0660 system system
|
||||
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/wlan0/queues/rx-* rps_cpus 0660 system system
|
||||
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/p2p0/queues/rx-* rps_cpus 0660 system system
|
||||
/dev/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
|
||||
|
||||
#permissions for 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 0640 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/smd3 0660 bluetooth net_bt_stack
|
||||
/dev/smd2 0660 bluetooth net_bt_stack
|
||||
/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/voice_svc 0660 system audio
|
||||
/dev/avtimer 0660 system audio
|
||||
|
||||
# DVB devices
|
||||
/dev/dvb/adapter0/demux* 0440 media media
|
||||
/dev/dvb/adapter0/dvr* 0660 media media
|
||||
/dev/dvb/adapter0/video* 0660 media media
|
||||
|
||||
# Block devices
|
||||
/dev/block/bootdevice/by-name/hob 0660 radio radio
|
||||
/dev/block/bootdevice/by-name/dhob 0660 radio radio
|
||||
/dev/block/bootdevice/by-name/clogo 0660 root mot_tcmd
|
||||
/dev/block/bootdevice/by-name/cid 0660 root mot_tcmd
|
||||
/dev/block/bootdevice/by-name/logs 0640 root log
|
||||
/dev/block/bootdevice/by-name/utags 0660 mot_tcmd system
|
||||
/dev/block/bootdevice/by-name/utagsBackup 0660 mot_tcmd system
|
||||
|
||||
# Broadcast devices
|
||||
/dev/tsc_mux0 0660 media media
|
||||
/dev/tsc_ci0 0660 media media
|
||||
|
||||
# sensors
|
||||
/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
|
||||
/sys/devices/soc/78b6000.i2c/i2c-0/0-* enable 0660 input system
|
||||
/sys/devices/soc/78b6000.i2c/i2c-0/0-* poll_delay 0660 input system
|
||||
/sys/devices/soc/78b6000.i2c/i2c-0/0-* enable_wakeup 0660 input system
|
||||
/sys/devices/soc/78b6000.i2c/i2c-0/0-* max_latency 0660 input system
|
||||
/sys/devices/soc/78b6000.i2c/i2c-0/0-* flush 0660 input system
|
||||
/sys/devices/soc/78b6000.i2c/i2c-0/0-* calibrate 0660 input system
|
||||
/sys/devices/soc/78b5000.i2c/i2c-1/1-* enable 0660 input system
|
||||
/sys/devices/soc/78b5000.i2c/i2c-1/1-* poll_delay 0660 input system
|
||||
/sys/devices/soc/78b5000.i2c/i2c-1/1-* enable_wakeup 0660 input system
|
||||
/sys/devices/soc/78b5000.i2c/i2c-1/1-* max_latency 0660 input system
|
||||
/sys/devices/soc/78b5000.i2c/i2c-1/1-* flush 0660 input system
|
||||
/sys/devices/soc/78b5000.i2c/i2c-1/1-* calibrate 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/proximity ps_adc 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system
|
||||
/sys/devices/virtual/input/input* poll 0660 input system
|
||||
/sys/devices/virtual/input/input* pollrate_ms 0660 input system
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch 0440 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch_enable 0660 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch 0440 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch_enable 0660 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch 0440 system drmrpc
|
||||
/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch_enable 0660 system drmrpc
|
||||
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch 0440 system drmrpc
|
||||
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch_enable 0660 system drmrpc
|
||||
|
||||
# laser sensor access
|
||||
/sys/devices/virtual/input/input* enable_ps_sensor 0660 system system
|
||||
/sys/devices/virtual/input/input* set_delay_ms 0660 system system
|
||||
|
||||
# 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
|
||||
|
||||
#nfc permissions
|
||||
/dev/nfc-nci 0660 nfc nfc
|
||||
/dev/nq-nci 0660 nfc nfc
|
||||
/dev/assd 0660 nfc nfc
|
||||
/dev/bcm2079x-i2c 0660 nfc nfc
|
||||
/dev/pn544 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
|
||||
|
||||
# Add device block for FRP
|
||||
/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/bootdevice/by-name/frp 0600 system system
|
||||
|
||||
# Ultrasound device
|
||||
/dev/usf1 0660 system system
|
||||
|
||||
# Ramdump devices
|
||||
/dev/ramdump* 0640 system system
|
||||
|
||||
# Fingerprint device
|
||||
/dev/qbt1000 0660 system system
|
||||
|
||||
#ImproveTouch device
|
||||
/dev/hbtp_input 0660 system system
|
||||
/dev/hbtp_vm 0660 system system
|
||||
|
||||
# Add device block for FRP
|
||||
/dev/block/bootdevice/by-name/frp 0600 system system
|
||||
|
||||
# I2C
|
||||
/dev/i2c-* 0660 system system
|
||||
|
||||
#JOT fixture devices for AMPS factory testing
|
||||
/dev/hidraw0 0660 root mot_tcmd
|
||||
/dev/hidraw1 0660 root mot_tcmd
|
||||
|
||||
# MOD device
|
||||
/sys/devices/soc/75b5000.i2c/i2c-7/7-0072 irq_enable 0660 mot_tcmd mot_tcmd
|
||||
/sys/devices/soc/0.apba_ctrl apba_enable 0660 mot_tcmd mot_mod
|
||||
/sys/devices/soc/0.apba_ctrl apba_mode 0660 mot_tcmd mot_mod
|
||||
/sys/devices/soc/0.apba_ctrl flash_partition 0220 mot_tcmd mot_mod
|
||||
/sys/devices/soc/0.apba_ctrl unipro_mid 0440 root mot_mod
|
||||
/sys/devices/soc/0.apba_ctrl unipro_pid 0440 root mot_mod
|
||||
/sys/devices/soc/0.apba_ctrl vid 0440 root mot_mod
|
||||
/sys/devices/soc/0.apba_ctrl pid 0440 root mot_mod
|
||||
/sys/devices/soc/0.apba_ctrl fw_version 0440 root mot_mod
|
||||
/sys/devices/soc/0.apba_ctrl fw_version_str 0440 root mot_mod
|
||||
/sys/devices/soc/soc:muc_svc@0/mods_interfaces/* hotplug 0660 root mot_mod
|
||||
/sys/devices/soc/soc:muc_svc@0/mods_interfaces/* uevent 0660 root mot_mod
|
||||
/sys/devices/soc/soc:muc_svc@0/mods_interfaces/* current_limit 0220 root mot_mod
|
||||
/sys/devices/soc/soc:muc_svc@0/mods_interfaces/* rtc_sync 0220 root mot_mod
|
||||
/sys/devices/soc/soc:muc_svc@0 flashmode 0660 root mot_mod
|
||||
/sys/devices/soc/soc:muc_svc@0 reset 0660 root mot_mod
|
||||
/sys/devices/soc/0.muc/0.muc:muc_svc@0/mods_interfaces/* hotplug 0660 root mot_mod
|
||||
/sys/devices/soc/0.muc/0.muc:muc_svc@0/mods_interfaces/* uevent 0660 root mot_mod
|
||||
/sys/devices/soc/0.muc/0.muc:muc_svc@0 flashmode 0660 root mot_mod
|
||||
/sys/devices/platform/mods_ap uevent 0660 root mot_mod
|
||||
/sys/devices/platform/mods_ap/* uevent 0660 root mot_mod
|
||||
/sys/devices/platform/mods_ap/greybus1 uevent 0664 root mot_mod
|
||||
|
||||
# MOD display device
|
||||
/sys/devices/platform/mods_ap/greybus1/*/*/display/display* state 0660 root mot_mod
|
||||
/sys/devices/platform/mods_ap/greybus1/*/*/display/display* config 0444 root mot_mod
|
||||
/sys/devices/platform/mods_ap/greybus1/*/*/display/display* notification 0660 root mot_mod
|
||||
|
||||
# MOD light device
|
||||
/sys/devices/platform/mods_ap/greybus1/*/*/leds/mod_light*::backlight brightness 0660 root mot_mod
|
||||
|
||||
# RAW device
|
||||
/dev/gbraw* 0660 root mot_mod
|
||||
# Audio device
|
||||
/sys/devices/platform/mods_codec.0 uevent 0660 root mot_mod
|
||||
/sys/devices/platform/mods_codec.0/* uevent 0660 root mot_mod
|
||||
|
||||
# MOD camera device
|
||||
/dev/mot_camera_ext* 0660 system camera
|
||||
/sys/devices/virtual/video4linux/mot_camera_ext* open_mode 0660 system camera
|
||||
/sys/devices/virtual/video4linux/mot_camera_ext* uevent 0660 root mot_mod
|
||||
/sys/devices/virtual/video4linux/video* open_mode 0660 system camera
|
||||
/sys/devices/virtual/video4linux/video* uevent 0660 root mot_mod
|
||||
|
||||
# Laser device
|
||||
/dev/laser 0660 system camera
|
||||
|
||||
#DTV
|
||||
/dev/isdbt 0660 mot_dtv mot_dtv
|
||||
Reference in New Issue
Block a user