Added WORKING gprimeltecan device tree.
diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom
new file mode 100644
index 0000000..e5e2425
--- /dev/null
+++ b/rootdir/etc/fstab.qcom
@@ -0,0 +1,17 @@
+# 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
+
+/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1,discard wait
+/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,check,encryptable=footer
+/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,check
+/dev/block/bootdevice/by-name/persist /persist ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait
+/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults
+/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults
+/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
+/dev/block/bootdevice/by-name/modem /firmware-modem vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337 wait
+/dev/block/bootdevice/by-name/apnhlos /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337 wait
+
+/devices/soc.0/7864900.sdhci/mmc_host/mmc* /storage/sdcard1 vfat nosuid,node wait,voldmanaged=sdcard1:auto,noemulatedsd
+/devices/platform/msm_hsusb /storage/usbdisk auto nosuid,nodev wait,voldmanaged=usbdisk:auto
+/dev/block/zram0 none swap defaults zramsize=536870912
diff --git a/rootdir/etc/init.carrier.rc b/rootdir/etc/init.carrier.rc
new file mode 100644
index 0000000..3c9f7ff
--- /dev/null
+++ b/rootdir/etc/init.carrier.rc
@@ -0,0 +1,93 @@
+# Copyright (C) 2012 The Android Open Source Project
+#
+# IMPORTANT: Do not create world writable files or directories.
+# This is a common source of Android security bugs.
+#
+
+on early-boot
+ chown bluetooth net_bt_stack /dev/ttyHS0
+ chmod 0660 /dev/ttyHS0
+
+on boot
+# permissions for bluetooth.
+ setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
+ chown bluetooth net_bt_stack ro.bt.bdaddr_path
+ chown radio net_bt_stack /efs/bluetooth/bt_addr
+ chmod 0644 /efs/bluetooth/bt_addr
+ chmod 0660 /sys/class/rfkill/rfkill0/state
+ chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
+ chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
+
+on fs
+
+# Support Preload install apks
+ mkdir /preload 0771 system system
+
+# efs
+ mkdir /efs/drm 0700 system system
+ mkdir /efs/imei 0775 radio radio
+ restorecon -R /efs
+
+#For Absolute Persistence Partition
+
+ mkdir /persdata 0755 system system
+ mkdir /persdata/absolute 0750 system system
+
+ wait /dev/block/bootdevice/by-name/persdata
+ check_fs /dev/block/bootdevice/by-name/persdata ext4
+ mount ext4 /dev/block/bootdevice/by-name/persdata /persdata/absolute nosuid nodev barrier=1
+
+ chown system system /persdata
+ chmod 0755 /persdata
+ chown system system /persdata/absolute
+ chmod 0750 /persdata/absolute
+
+# Permissions for svc led
+ chown system system /sys/class/sec/led/led_r
+ chown system system /sys/class/sec/led/led_g
+ chown system system /sys/class/sec/led/led_b
+ chown system system /sys/class/sec/led/led_pattern
+ chown system system /sys/class/sec/led/led_blink
+ chown system system /sys/class/sec/led/led_lowpower
+
+# permissons for uartsel & usbsel sysfs
+ chmod 0660 /sys/class/sec/switch/uart_en
+ chmod 0660 /sys/class/sec/switch/uart_sel
+ chmod 0660 /sys/class/sec/switch/usb_sel
+ chown system system /sys/class/sec/switch/uart_en
+ chown system system /sys/class/sec/switch/uart_sel
+ chown system system /sys/class/sec/switch/usb_sel
+
+# RIL for multi rild
+on property:ro.multisim.simslotcount=2
+service ril-daemon2 /system/bin/rild -l /system/lib/libsec-ril-dsds.so -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 log qcom_diag sdcard_r shell sdcard_rw system drmrpc
+
+# fm_radio
+ chmod 0640 /dev/radio0
+ chown system system /dev/radio0
+
+# Kickstart the Wireless subsystem
+write /dev/wcnss_wlan 1
+write /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr 1
+service ftm_ptt /system/bin/ftm_ptt -d
+ user root
+ group radio system
+ disabled
+
+# umount service
+service umount_service /system/bin/umount /preload
+ disabled
+ oneshot
+
+# Support Preload install apks
+on property:persist.sys.storage_preload=1
+ mount ext4 /dev/block/bootdevice/by-name/hidden /preload nosuid nodev ro barrier=1
+ setprop storage.preload.complete 1
+
+on property:persist.sys.storage_preload=0
+ start umount_service
diff --git a/rootdir/etc/init.class_main.sh b/rootdir/etc/init.class_main.sh
new file mode 100644
index 0000000..b7d975a
--- /dev/null
+++ b/rootdir/etc/init.class_main.sh
@@ -0,0 +1,98 @@
+#!/system/bin/sh
+# Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# start ril-daemon only for targets on which radio is present
+#
+baseband=`getprop ro.baseband`
+sgltecsfb=`getprop persist.radio.sglte_csfb`
+datamode=`getprop persist.data.mode`
+
+case "$baseband" in
+ "apq")
+ setprop ro.radio.noril yes
+ stop ril-daemon
+esac
+
+case "$baseband" in
+ "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3")
+ start qmuxd
+ start ipacm-diag
+ start ipacm
+ case "$baseband" in
+ "svlte2a" | "csfb")
+ start qmiproxy
+ ;;
+ "sglte" | "sglte2" )
+ if [ "x$sgltecsfb" != "xtrue" ]; then
+ start qmiproxy
+ else
+ setprop persist.radio.voice.modem.index 0
+ fi
+ ;;
+ "dsda2")
+ setprop persist.radio.multisim.config dsda
+ esac
+
+ multisim=`getprop persist.radio.multisim.config`
+
+ if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
+ start ril-daemon2
+ elif [ "$multisim" = "tsts" ]; then
+ start ril-daemon2
+ start ril-daemon3
+ fi
+
+ case "$datamode" in
+ "tethered")
+ start qti
+ start port-bridge
+ ;;
+ "concurrent")
+ start qti
+ start netmgrd
+ ;;
+ *)
+ #< RNTFIX:: Temporary block for data issue
+ # start netmgrd
+ #> RNTFIX
+ ;;
+ esac
+esac
+
+#
+# Allow persistent faking of bms
+# User needs to set fake bms charge in persist.bms.fake_batt_capacity
+#
+fake_batt_capacity=`getprop persist.bms.fake_batt_capacity`
+case "$fake_batt_capacity" in
+ "") ;; #Do nothing here
+ * )
+ echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity
+ ;;
+esac
diff --git a/rootdir/etc/init.mdm.sh b/rootdir/etc/init.mdm.sh
new file mode 100644
index 0000000..67e4667
--- /dev/null
+++ b/rootdir/etc/init.mdm.sh
@@ -0,0 +1,33 @@
+#!/system/bin/sh
+# Copyright (c) 2013, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+baseband=`getprop ro.baseband`
+if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then
+ start mdm_helper
+fi
+
diff --git a/rootdir/etc/init.qcom.bms.sh b/rootdir/etc/init.qcom.bms.sh
new file mode 100644
index 0000000..b849375
--- /dev/null
+++ b/rootdir/etc/init.qcom.bms.sh
@@ -0,0 +1,49 @@
+#!/system/bin/sh
+# Copyright (c) 2009-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.
+#
+
+target=`getprop ro.board.platform`
+
+start_vm_bms()
+{
+ if [ -e /dev/vm_bms ]; then
+ chown -h root.system /sys/class/power_supply/bms/current_now
+ chown -h root.system /sys/class/power_supply/bms/voltage_ocv
+ chmod 0664 /sys/class/power_supply/bms/current_now
+ chmod 0664 /sys/class/power_supply/bms/voltage_ocv
+ start vm_bms
+ fi
+}
+
+case "$target" in
+ "msm8916")
+ start_vm_bms
+ ;;
+ "msm8909")
+ start_vm_bms
+ ;;
+esac
diff --git a/rootdir/etc/init.qcom.class_core.sh b/rootdir/etc/init.qcom.class_core.sh
new file mode 100644
index 0000000..bc89e86
--- /dev/null
+++ b/rootdir/etc/init.qcom.class_core.sh
@@ -0,0 +1,215 @@
+#!/system/bin/sh
+# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# Set platform variables
+target=`getprop ro.board.platform`
+if [ -f /sys/devices/soc0/hw_platform ]; then
+ soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
+else
+ soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
+else
+ soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/platform_version ]; then
+ soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
+else
+ soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
+fi
+
+
+# Dynamic Memory Managment (DMM) provides a sys file system to the userspace
+# that can be used to plug in/out memory that has been configured as unstable.
+# This unstable memory can be in Active or In-Active State.
+# Each of which the userspace can request by writing to a sys file.
+#
+# ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This
+# property is set in the Android system properties file.
+#
+# If ro.dev.dmm.dpd.start_address is set here then the target has a memory
+# configuration that supports DynamicMemoryManagement.
+init_DMM()
+{
+ block=-1
+
+ case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm8960")
+ ;;
+ *)
+ return
+ ;;
+ esac
+
+ mem="/sys/devices/system/memory"
+ op=`cat $mem/movable_start_bytes`
+ case "$op" in
+ "0")
+ log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op
+ ;;
+
+ "$mem/movable_start_bytes: No such file or directory ")
+ log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op
+ ;;
+
+ *)
+ log -p i -t DMM DMM available. movable_start_bytes at $op
+ movable_start_bytes=0x`cat $mem/movable_start_bytes`
+ block_size_bytes=0x`cat $mem/block_size_bytes`
+ block=$((#${movable_start_bytes}/${block_size_bytes}))
+
+ chown -h system.system $mem/memory$block/state
+ chown -h system.system $mem/probe
+ chown -h system.system $mem/active
+ chown -h system.system $mem/remove
+
+ case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ echo $movable_start_bytes > $mem/probe
+ case "$?" in
+ "0")
+ log -p i -t DMM $movable_start_bytes to physical hotplug succeeded.
+ ;;
+ *)
+ log -p e -t DMM $movable_start_bytes to physical hotplug failed.
+ return
+ ;;
+ esac
+
+ echo online > $mem/memory$block/state
+ case "$?" in
+ "0")
+ log -p i -t DMM \'echo online\' to logical hotplug succeeded.
+ ;;
+ *)
+ log -p e -t DMM \'echo online\' to logical hotplug failed.
+ return
+ ;;
+ esac
+ ;;
+ esac
+
+ setprop ro.dev.dmm.dpd.start_address $movable_start_bytes
+ setprop ro.dev.dmm.dpd.block $block
+ ;;
+ esac
+
+ case "$target" in
+ "msm8960")
+ return
+ ;;
+ esac
+
+ # For 7X30 targets:
+ # ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory
+ # configuration. This is also used to indicate that the target is capable of
+ # setting EBI-1 to Deep Power Down or Self Refresh.
+ op=`cat $mem/low_power_memory_start_bytes`
+ case "$op" in
+ "0")
+ log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op
+ ;;
+ "$mem/low_power_memory_start_bytes No such file or directory ")
+ log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op
+ ;;
+ *)
+ log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op
+ ;;
+ esac
+}
+
+#
+# For controlling console and shell on console on 8960 - perist.serial.enable 8960
+# On other target use default ro.debuggable property.
+#
+serial=`getprop persist.serial.enable`
+dserial=`getprop ro.debuggable`
+case "$target" in
+ "msm8960")
+ case "$serial" in
+ "0")
+ echo 0 > /sys/devices/platform/msm_serial_hsl.0/console
+ ;;
+ "1")
+ echo 1 > /sys/devices/platform/msm_serial_hsl.0/console
+ start console
+ ;;
+ *)
+ case "$dserial" in
+ "1")
+ start console
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ "msm8610" | "msm8974" | "msm8226")
+ case "$serial" in
+ "0")
+ echo 0 > /sys/devices/f991f000.serial/console
+ ;;
+ "1")
+ echo 1 > /sys/devices/f991f000.serial/console
+ start console
+ ;;
+ *)
+ case "$dserial" in
+ "1")
+ start console
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ case "$dserial" in
+ "1")
+ start console
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ insmod /system/lib/modules/ss_mfcinit.ko
+ insmod /system/lib/modules/ss_vencoder.ko
+ insmod /system/lib/modules/ss_vdecoder.ko
+ chmod -h 0666 /dev/ss_mfc_reg
+ chmod -h 0666 /dev/ss_vdec
+ chmod -h 0666 /dev/ss_venc
+
+ init_DMM
+ ;;
+
+ "msm8960")
+ init_DMM
+ ;;
+esac
diff --git a/rootdir/etc/init.qcom.early_boot.sh b/rootdir/etc/init.qcom.early_boot.sh
new file mode 100644
index 0000000..a8bcf09
--- /dev/null
+++ b/rootdir/etc/init.qcom.early_boot.sh
@@ -0,0 +1,200 @@
+#!/system/bin/sh
+# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+export PATH=/system/bin
+
+# Set platform variables
+if [ -f /sys/devices/soc0/hw_platform ]; then
+ soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
+else
+ soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
+else
+ soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/platform_version ]; then
+ soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
+else
+ soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
+fi
+
+log -t BOOT -p i "MSM target '$1', SoC '$soc_hwplatform', HwID '$soc_hwid', SoC ver '$soc_hwver'"
+
+case "$1" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ case "$soc_hwplatform" in
+ "FFA" | "SVLTE_FFA")
+ # linking to surf_keypad_qwerty.kcm.bin instead of surf_keypad_numeric.kcm.bin so that
+ # the UI keyboard works fine.
+ ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
+ ;;
+ "Fluid")
+ setprop ro.sf.lcd_density 240
+ setprop qcom.bt.dev_power_class 2
+ ;;
+ *)
+ ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
+ ;;
+ esac
+ ;;
+
+ "msm8660")
+ case "$soc_hwplatform" in
+ "Fluid")
+ setprop ro.sf.lcd_density 240
+ ;;
+ "Dragon")
+ setprop ro.sound.alsa "WM8903"
+ ;;
+ esac
+ ;;
+
+ "msm8960")
+ # lcd density is write-once. Hence the separate switch case
+ case "$soc_hwplatform" in
+ "Liquid")
+ if [ "$soc_hwver" == "196608" ]; then # version 0x30000 is 3D sku
+ setprop ro.sf.hwrotation 90
+ fi
+
+ setprop ro.sf.lcd_density 160
+ ;;
+ "MTP")
+ setprop ro.sf.lcd_density 240
+ ;;
+ *)
+ case "$soc_hwid" in
+ "109")
+ setprop ro.sf.lcd_density 160
+ ;;
+ *)
+ setprop ro.sf.lcd_density 240
+ ;;
+ esac
+ ;;
+ esac
+
+ #Set up composition type based on the target
+ case "$soc_hwid" in
+ 87)
+ #8960
+ setprop debug.composition.type dyn
+ ;;
+ 153|154|155|156|157|138)
+ #8064 V2 PRIME | 8930AB | 8630AB | 8230AB | 8030AB | 8960AB
+ setprop debug.composition.type c2d
+ ;;
+ *)
+ esac
+ ;;
+
+ "msm8974")
+ case "$soc_hwplatform" in
+ "Liquid")
+ setprop ro.sf.lcd_density 160
+ # Liquid do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop ro.hw.nav_keys 0
+ ;;
+ "Dragon")
+ setprop ro.sf.lcd_density 240
+ ;;
+ *)
+ setprop ro.sf.lcd_density 320
+ ;;
+ esac
+ ;;
+
+ "msm8226")
+ case "$soc_hwplatform" in
+ *)
+ setprop ro.sf.lcd_density 320
+ ;;
+ esac
+ ;;
+
+ "msm8610" | "apq8084" | "mpq8092")
+ case "$soc_hwplatform" in
+ *)
+ setprop ro.sf.lcd_density 240
+ ;;
+ esac
+ ;;
+ "apq8084")
+ case "$soc_hwplatform" in
+ "Liquid")
+ setprop ro.sf.lcd_density 320
+ # Liquid do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop ro.hw.nav_keys 0
+ ;;
+ "SBC")
+ setprop ro.sf.lcd_density 200
+ # SBC do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop qemu.hw.mainkeys 0
+ ;;
+ *)
+ setprop ro.sf.lcd_density 480
+ ;;
+ esac
+ ;;
+esac
+
+# Setup HDMI related nodes & permissions
+# HDMI can be fb1 or fb2
+# Loop through the sysfs nodes and determine
+# the HDMI(dtv panel)
+for fb_cnt in 0 1 2
+do
+file=/sys/class/graphics/fb$fb_cnt
+dev_file=/dev/graphics/fb$fb_cnt
+ if [ -d "$file" ]
+ then
+ value=`cat $file/msm_fb_type`
+ case "$value" in
+ "dtv panel")
+ chown -h system.graphics $file/hpd
+ chown -h system.system $file/hdcp/tp
+ chown -h system.graphics $file/vendor_name
+ chown -h system.graphics $file/product_description
+ chmod -h 0664 $file/hpd
+ chmod -h 0664 $file/hdcp/tp
+ chmod -h 0664 $file/vendor_name
+ chmod -h 0664 $file/product_description
+ chmod -h 0664 $file/video_mode
+ chmod -h 0664 $file/format_3d
+ # create symbolic link
+ ln -s $dev_file /dev/graphics/hdmi
+ # Change owner and group for media server and surface flinger
+ chown -h system.system $file/format_3d;;
+ esac
+ fi
+done
diff --git a/rootdir/etc/init.qcom.factory.sh b/rootdir/etc/init.qcom.factory.sh
new file mode 100644
index 0000000..9c40d94
--- /dev/null
+++ b/rootdir/etc/init.qcom.factory.sh
@@ -0,0 +1,255 @@
+#!/system/bin/sh
+# Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# Actions on fast factory test mode
+ chown -h bluetooth.bluetooth /sys/module/bluetooth_power/parameters/power
+ chown -h bluetooth.bluetooth /sys/class/rfkill/rfkill0/type
+ chown -h bluetooth.bluetooth /sys/class/rfkill/rfkill0/state
+ chown -h bluetooth.bluetooth /proc/bluetooth/sleep/proto
+ chown -h system.system /sys/module/sco/parameters/disable_esco
+ chown -h bluetooth.bluetooth /sys/module/hci_smd/parameters/hcismd_set
+ chmod -h 0660 /sys/module/bluetooth_power/parameters/power
+ chmod -h 0660 /sys/module/hci_smd/parameters/hcismd_set
+ chmod -h 0660 /sys/class/rfkill/rfkill0/state
+ chmod -h 0660 /proc/bluetooth/sleep/proto
+ chown -h bluetooth.bluetooth /dev/ttyHS0
+ chmod -h 0660 /dev/ttyHS0
+ chown -h bluetooth.bluetooth /sys/devices/platform/msm_serial_hs.0/clock
+ chmod -h 0660 /sys/devices/platform/msm_serial_hs.0/clock
+
+ chmod -h 0660 /dev/ttyHS2
+ chown -h bluetooth.bluetooth /dev/ttyHS2
+
+ #Create QMUX deamon socket area
+ mkdir -p /dev/socket/qmux_radio
+ chown -h radio.radio /dev/socket/qmux_radio
+ chmod -h 2770 /dev/socket/qmux_radio
+ mkdir -p /dev/socket/qmux_audio
+ chown -h media.audio /dev/socket/qmux_audio
+ chmod -h 2770 /dev/socket/qmux_audio
+ mkdir -p /dev/socket/qmux_bluetooth
+ chown -h bluetooth.bluetooth /dev/socket/qmux_bluetooth
+ chmod -h 2770 /dev/socket/qmux_bluetooth
+ mkdir -p /dev/socket/qmux_gps
+ chown -h gps.gps /dev/socket/qmux_gps
+ chmod -h 2770 /dev/socket/qmux_gps
+
+ # Allow QMUX daemon to assign port open wait time
+ chown -h radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
+
+ setprop wifi.interface wlan0
+
+ setprop ro.telephony.call_ring.multiple false
+
+ #Remove SUID bit for iproute2 ip tool
+ chmod -h 0755 /system/bin/ip
+
+ chmod -h 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
+
+ # setup permissions for fb1 related nodes
+ chown -h system.graphics /sys/class/graphics/fb1/hpd
+ chown -h system.system /sys/class/graphics/fb1/hdcp/tp
+ chmod -h 0664 /sys/devices/virtual/graphics/fb1/hpd
+ chmod -h 0664 /sys/devices/virtual/graphics/fb1/hdcp/tp
+ chmod -h 0664 /sys/devices/virtual/graphics/fb1/video_mode
+ chmod -h 0664 /sys/devices/virtual/graphics/fb1/format_3d
+
+ # Change owner and group for media server and surface flinger
+ chown -h system.system /sys/devices/virtual/graphics/fb1/format_3d
+
+ #For bridgemgr daemon to inform the USB driver of the correct transport
+ chown -h radio.radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
+
+ #To allow interfaces to get v6 address when tethering is enabled
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet0/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet1/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet2/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet3/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet4/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet5/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet6/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet7/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra
+ echo 2 > /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra
+
+ # 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
+ echo 1 > /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal
+
+#TODO:
+# basic network init
+# ifup lo
+# hostname localhost
+# domainname localdomain
+
+# set RLIMIT_NICE to allow priorities from 19 to -20
+# setrlimit 13 40 40
+
+# Memory management. Basic kernel parameters, and allow the high
+# level system server to be able to adjust the kernel OOM driver
+# parameters to match how it is managing things.
+ echo 1 > /proc/sys/vm/overcommit_memory
+ echo 4 > /proc/sys/vm/min_free_order_shift
+ chown -h root.system /sys/module/lowmemorykiller/parameters/adj
+ chmod -h 0664 /sys/module/lowmemorykiller/parameters/adj
+ chown -h root.system /sys/module/lowmemorykiller/parameters/minfree
+ chmod -h 0664 /sys/module/lowmemorykiller/parameters/minfree
+
+ # Tweak background writeout
+ echo 200 > /proc/sys/vm/dirty_expire_centisecs
+ echo 5 > /proc/sys/vm/dirty_background_ratio
+
+ # Permissions for System Server and daemons.
+ chown -h radio.system /sys/android_power/state
+ chown -h radio.system /sys/android_power/request_state
+ chown -h radio.system /sys/android_power/acquire_full_wake_lock
+ chown -h radio.system /sys/android_power/acquire_partial_wake_lock
+ chown -h radio.system /sys/android_power/release_wake_lock
+ chown -h system.system /sys/power/autosleep
+ chown -h system.system /sys/power/state
+ chown -h system.system /sys/power/wakeup_count
+ chown -h radio.system /sys/power/wake_lock
+ chown -h radio.system /sys/power/wake_unlock
+ chmod -h 0660 /sys/power/state
+ chmod -h 0660 /sys/power/wake_lock
+ chmod -h 0660 /sys/power/wake_unlock
+
+ chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/boost
+ chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
+ chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
+ chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+ chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+
+ # Assume SMP uses shared cpufreq policy for all CPUs
+ chown -h system.system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chmod -h 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+
+ chown -h system.system /sys/class/timed_output/vibrator/enable
+ chown -h system.system /sys/class/leds/keyboard-backlight/brightness
+ chown -h system.system /sys/class/leds/lcd-backlight/brightness
+ chown -h system.system /sys/class/leds/button-backlight/brightness
+ chown -h system.system /sys/class/leds/jogball-backlight/brightness
+ chown -h system.system /sys/class/leds/red/brightness
+ chown -h system.system /sys/class/leds/green/brightness
+ chown -h system.system /sys/class/leds/blue/brightness
+ chown -h system.system /sys/class/leds/red/device/grpfreq
+ chown -h system.system /sys/class/leds/red/device/grppwm
+ chown -h system.system /sys/class/leds/red/device/blink
+ chown -h system.system /sys/class/leds/red/brightness
+ chown -h system.system /sys/class/leds/green/brightness
+ chown -h system.system /sys/class/leds/blue/brightness
+ chown -h system.system /sys/class/leds/red/device/grpfreq
+ chown -h system.system /sys/class/leds/red/device/grppwm
+ chown -h system.system /sys/class/leds/red/device/blink
+ chown -h system.system /sys/class/timed_output/vibrator/enable
+ chown -h system.system /sys/module/sco/parameters/disable_esco
+ chown -h system.system /sys/kernel/ipv4/tcp_wmem_min
+ chown -h system.system /sys/kernel/ipv4/tcp_wmem_def
+ chown -h system.system /sys/kernel/ipv4/tcp_wmem_max
+ chown -h system.system /sys/kernel/ipv4/tcp_rmem_min
+ chown -h system.system /sys/kernel/ipv4/tcp_rmem_def
+ chown -h system.system /sys/kernel/ipv4/tcp_rmem_max
+ chown -h root radio /proc/cmdline
+
+# Define TCP buffer sizes for various networks
+# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
+ setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
+ setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
+ setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
+ setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
+ setprop net.tcp.buffersize.evdo 4094,87380,262144,4096,16384,262144
+
+# Assign TCP buffer thresholds to be ceiling value of technology maximums
+# Increased technology maximums should be reflected here.
+ echo 2097152 > /proc/sys/net/core/rmem_max
+ echo 2097152 > /proc/sys/net/core/wmem_max
+
+# Set the property to indicate type of virtual display to 0
+# 0 indicates that virtual display is not a Wifi display and that the
+# session is not exercised through RemoteDisplay in the android framework
+ setprop persist.sys.wfd.virtual 0
+
+# Set this property so surfaceflinger is not started by system_init
+ setprop system_init.startsurfaceflinger 0
+
+# Configurate USB in FFBM mode, two big change for USB.
+# 1) Using diag,adb in FFBM mode, too many interface will cause
+# problem in factory for multi-line test
+# 2) Not config usb serialnum. Using the default value:"0123456789ABCDEF"
+# Keep the USB serialnum no change for devices. this fix the problem
+# of port change for various devices.
+chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup
+chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup
+setprop persist.sys.usb.config diag,adb
+
+# Start the following services needed for fftm
+ start logd
+ start config_bluetooth
+ start media
+ start fastmmi
+ start wcnss-service
+ start qcom-post-boot
+ start rmt_storage
+ start qcom-c_main-sh
+ start irsc_util
+ start qcamerasvr
+ start qcomsysd
+ start ptt_ffbm
+ start ftm_ffbm
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
new file mode 100644
index 0000000..b6f3673
--- /dev/null
+++ b/rootdir/etc/init.qcom.rc
@@ -0,0 +1,872 @@
+# Copyright (c) 2009-2012, 2014-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.
+#
+
+import init.qcom.usb.rc
+import init.target.rc
+
+on early-init
+ mount debugfs debugfs /sys/kernel/debug
+ write /sys/block/mmcblk0/queue/scheduler noop
+# additionaly for init.trace.rc
+# Allow shell group to enable tgid prints
+ chown root shell /sys/kernel/debug/tracing/options/print-tgid
+ chmod 0664 /sys/kernel/debug/tracing/options/print-tgid
+
+on init
+ # Set permissions for persist partition
+ mkdir /persist 0771 system system
+
+ mkdir /preload 0771 system system
+ # See storage config details at http://source.android.com/tech/storage/
+ mkdir /mnt/shell/emulated 0700 shell shell
+ mkdir /storage/emulated 0555 root root
+ mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
+ mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
+ mkdir /mnt/media_rw/uicc0 0700 media_rw media_rw
+ mkdir /mnt/media_rw/uicc1 0700 media_rw media_rw
+ mkdir /storage/sdcard1 0700 root root
+ mkdir /storage/uicc0 0700 root root
+ mkdir /storage/uicc1 0700 root root
+ mkdir /storage/usbotg 0700 root root
+
+ export EXTERNAL_STORAGE /storage/emulated/legacy
+ export SECONDARY_STORAGE /storage/sdcard1
+ export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
+ export EMULATED_STORAGE_TARGET /storage/emulated
+
+ # Support legacy paths
+ symlink /storage/emulated/legacy /sdcard
+ symlink /storage/emulated/legacy /mnt/sdcard
+ symlink /storage/emulated/legacy /storage/sdcard0
+ symlink /mnt/shell/emulated/0 /storage/emulated/legacy
+
+on early-boot
+ # set RLIMIT_MEMLOCK to 64MB
+ setrlimit 8 67108864 67108864
+ # Allow subsystem (modem etc) debugging
+ write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
+ write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
+ write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
+ write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
+ write /sys/kernel/boot_adsp/boot 1
+
+on boot
+ chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
+ chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
+ chown bluetooth bluetooth /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
+ chmod 0660 /sys/module/bluetooth_power/parameters/power
+ chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
+ chmod 0660 /sys/class/rfkill/rfkill0/state
+ chmod 0660 /proc/bluetooth/sleep/proto
+ chown bluetooth net_bt_stack /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 bluetooth /sys/class/rfkill/rfkill0/device/extldo
+ chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
+
+ # for BT MAC address
+ mkdir /efs/bluetooth 0775 radio system
+ # if already exist
+ chown radio system /efs/bluetooth
+ chmod 0775 /efs/bluetooth
+
+ #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
+
+ setprop wifi.interface wlan0
+
+ chown system system /proc/sched_orig_load_balance_enable
+ chmod 0660 /proc/sched_orig_load_balance_enable
+
+# Define TCP buffer sizes for various networks
+# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
+ setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576
+
+
+ setprop ro.telephony.call_ring.multiple false
+
+ #Remove SUID bit for iproute2 ip tool
+ chmod 0755 /system/bin/ip
+
+
+ chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
+
+ #For bridgemgr daemon to inform the USB driver of the correct transport
+ chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
+
+# Define TCP buffer sizes for various networks
+# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
+ setprop net.tcp.buffersize.default 4096,87380,524288,4096,16384,110208
+ setprop net.tcp.buffersize.lte 2097152,4194304,8388608,262144,524288,1048576
+ setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
+ setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
+ setprop net.tcp.buffersize.evdo 4094,87380,524288,4096,16384,262144
+
+# 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
+
+ # Set the console loglevel to < KERN_INFO
+ # Set the default message loglevel to KERN_INFO
+ # write /proc/sys/kernel/printk "6 6 1 7"
+
+ # Allow access for CCID command/response timeout configuration
+ chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
+
+# msm specific files that need to be created on /data
+on post-fs-data
+ # Create directory for TZ Apps
+ mkdir /data/misc/qsee 0770 system system
+
+ # we will remap this as /mnt/sdcard with the sdcard fuse tool
+ 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 system
+ mkdir /data/misc/wifi/sockets 0770 wifi wifi
+ mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
+ mkdir /data/misc/dhcp 0775 dhcp dhcp
+ chown dhcp dhcp /data/misc/dhcp
+
+ # for WIFI MAC address
+ mkdir /efs/wifi 0775 radio system
+ chown system wifi /efs/wifi/.mac.info
+ chmod 0660 /efs/wifi/.mac.info
+ chmod 0660 /efs/wifi/.mac.cob
+
+ # for WIFI Version
+ write /data/.wifiver.info 0
+ chown system root /data/.wifiver.info
+ chmod 0666 /data/.wifiver.info
+ # 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/fdMgr 0771 system system
+ chown system system /data/dpm/fdMgr
+
+ 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 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
+ 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
+
+ setprop vold.post_fs_data_done 1
+
+ #Create a folder for SRS to be able to create a usercfg file
+ mkdir /data/data/media 0770 media media
+
+ #Create folder for mm-qcamera-daemon
+ mkdir /data/camera 0770 media camera
+
+ #Create PERFD deamon related dirs
+ mkdir /data/misc/perfd 0755 root system
+ chmod 2755 /data/misc/perfd
+ 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
+
+ # DCT(Display Clock Tunning) - Interface 2.0
+ chown radio system /sys/class/dct/dct_node/data
+ chown radio system /sys/class/dct/dct_node/state
+ chown radio system /sys/class/dct/dct_node/log
+ chown radio system /sys/class/dct/dct_node/enabled
+ chown radio system /sys/class/dct/dct_node/interface
+ chown radio system /sys/class/dct/dct_node/libname
+ chown radio system /sys/class/dct/dct_node/tunned
+
+#service qcomsysd /system/bin/qcom-system-daemon
+# class main
+# user root
+# group root qcom_diag
+
+service ssr_setup /system/bin/ssr_setup
+ oneshot
+ disabled
+
+service ss_ramdump /system/bin/subsystem_ramdump
+ class main
+ user system
+ group system
+ disabled
+
+on property:persist.sys.ssr.restart_level=*
+ start ssr_setup
+
+on property:persist.sys.ssr.enable_ramdumps=1
+ write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
+ start ss_ramdump
+
+on property:persist.sys.ssr.enable_ramdumps=0
+ write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
+
+on property:sys.boot_completed=1
+ write /dev/kmsg "Boot completed "
+
+on property:persist.radio.atfwd.start=false
+ stop atfwd
+
+# corefile limit and ETB enabling
+on property:persist.debug.trace=1
+ mkdir /data/core 0777 root root
+ write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
+ 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/bus/coresight/devices/coresight-etm0/enable 0
+ write /sys/bus/coresight/devices/coresight-etm1/enable 0
+ write /sys/bus/coresight/devices/coresight-etm2/enable 0
+ write /sys/bus/coresight/devices/coresight-etm3/enable 0
+ write /sys/bus/coresight/devices/coresight-etm0/reset 1
+ write /sys/bus/coresight/devices/coresight-etm1/reset 1
+ write /sys/bus/coresight/devices/coresight-etm2/reset 1
+ write /sys/bus/coresight/devices/coresight-etm3/reset 1
+ write /sys/bus/coresight/devices/coresight-etm0/enable 1
+ write /sys/bus/coresight/devices/coresight-etm1/enable 1
+ write /sys/bus/coresight/devices/coresight-etm2/enable 1
+ write /sys/bus/coresight/devices/coresight-etm3/enable 1
+ write /sys/module/coresight_event/parameters/event_abort_enable 1
+
+on property:init.svc.wpa_supplicant=stopped
+ stop dhcpcd
+
+on property:bluetooth.isEnabled=true
+ start btwlancoex
+ write /sys/class/bluetooth/hci0/idle_timeout 7000
+
+on property:bluetooth.sap.status=running
+ start bt-sap
+
+on property:bluetooth.sap.status=stopped
+ stop bt-sap
+
+on property:bluetooth.dun.status=running
+ start bt-dun
+
+on property:bluetooth.dun.status=stopped
+ stop bt-dun
+
+on property:ro.bluetooth.ftm_enabled=true
+ start ftmd
+
+on property:bluetooth.startbtsnoop=true
+ start btsnoop
+
+on property:bluetooth.startbtsnoop=false
+ stop btsnoop
+
+service qcom-c_core-sh /system/bin/sh /init.qcom.class_core.sh
+ class core
+ user root
+ oneshot
+
+service qcom-c_main-sh /system/bin/sh /init.class_main.sh
+ class main
+ user root
+ oneshot
+
+on property:vold.decrypt=trigger_restart_framework
+ start qcom-c_main-sh
+ start config_bluetooth
+ start wcnss-service
+
+on property:persist.env.fastdorm.enabled=true
+ setprop persist.radio.data_no_toggle 1
+
+service irsc_util /system/bin/irsc_util "/etc/sec_config"
+ class main
+ user root
+ oneshot
+
+service rmt_storage /system/bin/rmt_storage
+ class core
+ user root
+ disabled
+
+service rfs_access /system/bin/rfs_access
+ class core
+ user root
+ group system net_raw
+
+on property:wc_transport.start_hci=true
+ start start_hci_filter
+
+on property:wc_transport.start_hci=false
+ stop start_hci_filter
+
+service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot"
+ class core
+ user root
+ oneshot
+
+service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
+ class late_start
+ user bluetooth
+ group bluetooth net_bt_admin net_bt_stack
+ disabled
+ oneshot
+
+on property:bluetooth.hciattach=true
+ start hciattach
+
+on property:bluetooth.hciattach=false
+ setprop bluetooth.status off
+
+service hciattach_ath3k /system/bin/sh /system/etc/init.ath3k.bt.sh
+ class late_start
+ user bluetooth
+ group system bluetooth net_bt_admin misc
+ disabled
+ oneshot
+
+service bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
+ class late_start
+ user bluetooth
+ group bluetooth net_bt_admin inet
+ disabled
+ oneshot
+
+service bt-sap /system/bin/sapd 15
+ user bluetooth
+ group bluetooth net_bt_admin
+ class late_start
+ disabled
+ oneshot
+
+service ftmd /system/bin/logwrapper /system/bin/ftmdaemon
+ class late_start
+ user root
+ group bluetooth net_bt_admin misc net_bt_stack qcom_diag
+ disabled
+ oneshot
+
+service bridgemgrd /system/bin/bridgemgrd
+ class late_start
+ user radio
+ group radio qcom_diag
+ disabled
+
+service port-bridge /system/bin/port-bridge /dev/mhi_pipe_32 /dev/ttyGS0
+ class main
+ user radio system
+ group radio system inet
+ disabled
+
+service qmiproxy /system/bin/qmiproxy
+ class main
+ user radio
+ group radio qcom_diag
+ disabled
+
+# QMUX must be in multiple groups to support external process connections
+service qmuxd /system/bin/qmuxd
+ class main
+ user root
+ group radio audio bluetooth gps qcom_diag
+ disabled
+
+service netmgrd /system/bin/netmgrd
+ class main
+ disabled
+
+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
+
+service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
+ class late_start
+ user bluetooth
+ group bluetooth net_bt_admin inet net_admin net_raw
+ disabled
+ oneshot
+
+service p2p_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 -N \
+ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
+ -I/system/etc/wifi/p2p_supplicant_overlay.conf \
+ -puse_p2p_group_interface=1 -puse_multi_chan_concurrent=1 \
+ -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 -g@android:wpa_wlan0 \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
+ # 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 dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
+ class late_start
+ disabled
+ oneshot
+
+service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_wlan0 /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_p2p /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service ptt_socket_app /system/bin/ptt_socket_app -d
+ class main
+ user root
+ group root
+ disabled
+ oneshot
+
+service ptt_ffbm /system/bin/ptt_socket_app -f -d
+ user root
+ group root
+ disabled
+ oneshot
+
+service ftm_ffbm /system/bin/ftmdaemon
+ user root
+ group root
+ disabled
+ oneshot
+
+service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_bt-pan /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
+ disabled
+ oneshot
+
+service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
+ disabled
+ oneshot
+
+service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
+ disabled
+ oneshot
+
+service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
+ disabled
+ oneshot
+
+service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
+ disabled
+ oneshot
+
+#for WiFi MFG(TestMode)
+service mfgloader /system/bin/mfgloader
+ class main
+ disabled
+ oneshot
+
+service wlandutservice /system/bin/wlandutservice
+ class main
+ user system
+ group wifi net_raw net_admin system inet
+ disabled
+ oneshot
+
+service macloader /system/bin/macloader
+ class main
+ oneshot
+
+on property:init.svc.macloader=stopped
+ chown system root /data/.cid.info
+ chmod 0664 /data/.cid.info
+ chown system root /data/.rev
+ chmod 0664 /data/.rev
+# end of wifi
+
+
+service loc_launcher /system/bin/loc_launcher
+ #loc_launcher will start as root and set its uid to gps
+ class late_start
+ group gps inet net_raw qcom_diag net_admin wifi
+
+service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
+ class late_start
+ user root
+ group system
+ disabled
+ oneshot
+
+on property:crypto.driver.load=1
+ insmod /system/lib/modules/qce.ko
+ insmod /system/lib/modules/qcedev.ko
+
+service qcom-sh /system/bin/sh /init.qcom.sh
+ class late_start
+ user root
+ oneshot
+
+service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
+ class late_start
+ user root
+ disabled
+ oneshot
+
+service wifi-sdio-on /system/bin/sh /system/etc/init.qcom.sdio.sh
+ class late_start
+ group wifi inet
+ disabled
+ oneshot
+
+service wifi-crda /system/bin/sh /system/etc/init.crda.sh
+ class late_start
+ user root
+ disabled
+ oneshot
+
+service config-zram /system/bin/sh /system/etc/init.qcom.zram.sh
+ class late_start
+ user root
+ disabled
+ oneshot
+
+on property:sys.boot_completed=1
+ start qcom-post-boot
+ start config-zram
+
+service atfwd /system/bin/ATFWD-daemon
+ class late_start
+ user system
+ group system radio
+
+service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf
+ class late_start
+ user root
+ group root
+ oneshot
+ disabled
+
+on property:ro.data.large_tcp_window_size=true
+ # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
+ write /proc/sys/net/ipv4/tcp_adv_win_scale 2
+
+#
+# start multiple rilds based on multisim property
+#
+on property:ro.multisim.simslotcount=2
+ stop ril-daemon
+ start ril-daemon
+ start ril-daemon1
+
+on property:persist.radio.multisim.config=dsds
+ stop ril-daemon
+ start ril-daemon
+ start ril-daemon1
+
+on property:persist.radio.multisim.config=dsda
+ stop ril-daemon
+ start ril-daemon
+ start ril-daemon1
+
+#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
+# disabled
+# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
+
+#service ril-daemon3 /system/bin/rild -c 3
+# class main
+# socket rild3 stream 660 root radio
+# socket rild-debug3 stream 660 radio system
+# user root
+# disabled
+# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
+
+service usb_uicc_enable /system/bin/sh /system/etc/init.qcom.uicc.sh
+ class late_start
+ user root
+ disabled
+ oneshot
+
+service usb_uicc_daemon /system/bin/usb_uicc_client
+ class main
+ user system
+ group system log net_raw
+ oneshot
+
+on property:sys.usb_uicc.enabled=1
+ start usb_uicc_enable
+
+on property:sys.usb_uicc.enabled=0
+ start usb_uicc_enable
+
+# virtual sdcard daemon running as media_rw (1023)
+service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
+ class late_start
+
+service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
+ class late_start
+ disabled
+
+service fuse_uicc0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/uicc0 /storage/uicc0
+ class late_start
+
+service fuse_uicc1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/uicc1 /storage/uicc1
+ class late_start
+ disabled
+
+service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbotg /storage/usbotg
+ class late_start
+ disabled
+
+# Binding fuse mount point to /storage/emulated/legacy
+on property:init.svc.sdcard=running
+ wait /mnt/shell/emulated/0
+ mount none /mnt/shell/emulated/0 /storage/emulated/legacy bind
+
+
+service charger /charger
+ class charger
+
+service ssr_diag /system/bin/ssr_diag
+ class late_start
+ user system
+ group system
+ disabled
+
+# Define fastmmi
+service fastmmi /system/bin/mmi
+ user root
+ group root
+ disabled
+
+service fastmmisrv /system/bin/sh /init.qcom.factory.sh
+ user root
+ disabled
+ oneshot
+
+on mmi
+ start fastmmisrv
+
+on ffbm
+ trigger early-fs
+ trigger fs
+ trigger post-fs
+ trigger post-fs-data
+
+ # Load properties from /system/ + /factory after fs mount. Place
+ # this in another action so that the load will be scheduled after the prior
+ # issued fs triggers have completed.
+ trigger load_all_props_action
+
+ trigger early-boot
+ trigger mmi
+
+service qbcharger /charger -m 1
+ disabled
+ oneshot
+
+on property:sys.qbcharger.enable=true
+ start qbcharger
+
+on property:sys.qbcharger.enable=false
+ stop qbcharger
+
+service diag_mdlog_start /system/bin/diag_mdlog
+ class late_start
+ user shell
+ group system qcom_diag sdcard_rw sdcard_r media_rw
+ disabled
+ oneshot
+
+service diag_mdlog_stop /system/bin/diag_mdlog -k
+ class late_start
+ user shell
+ group system qcom_diag sdcard_rw sdcard_r media_rw
+ disabled
+ oneshot
+
+service bms-sh /system/bin/sh /init.qcom.bms.sh
+ class core
+ user root
+ oneshot
+
+service vm_bms /system/bin/vm_bms
+ user root
+ group root
+ disabled
+
+service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
+ class core
+ user root
+ group root
+ disabled
+
+# Change IO scheduler to CFQ after boot_complete
+on property:sys.boot_completed=1
+ write /sys/block/mmcblk0/queue/scheduler cfq
diff --git a/rootdir/etc/init.qcom.sh b/rootdir/etc/init.qcom.sh
new file mode 100644
index 0000000..124a692
--- /dev/null
+++ b/rootdir/etc/init.qcom.sh
@@ -0,0 +1,212 @@
+#!/system/bin/sh
+# Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+target=`getprop ro.board.platform`
+if [ -f /sys/devices/soc0/soc_id ]; then
+ platformid=`cat /sys/devices/soc0/soc_id`
+else
+ platformid=`cat /sys/devices/system/soc/soc0/id`
+fi
+#
+# Function to start sensors for DSPS enabled platforms
+#
+start_sensors()
+{
+ if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
+ chmod -h 775 /persist/sensors
+ chmod -h 664 /persist/sensors/sensors_settings
+ chown -h system.root /persist/sensors/sensors_settings
+
+ mkdir -p /data/misc/sensors
+ chmod -h 775 /data/misc/sensors
+
+ start sensors
+ fi
+}
+
+start_battery_monitor()
+{
+ if ls /sys/bus/spmi/devices/qpnp-bms-*/fcc_data ; then
+ chown -h root.system /sys/module/pm8921_bms/parameters/*
+ chown -h root.system /sys/module/qpnp_bms/parameters/*
+ chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_data
+ chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_temp
+ chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_chgcyl
+ chmod 0660 /sys/module/qpnp_bms/parameters/*
+ chmod 0660 /sys/module/pm8921_bms/parameters/*
+ mkdir -p /data/bms
+ chown -h root.system /data/bms
+ chmod 0770 /data/bms
+ start battery_monitor
+ fi
+}
+
+start_charger_monitor()
+{
+ if ls /sys/module/qpnp_charger/parameters/charger_monitor; then
+ chown -h root.system /sys/module/qpnp_charger/parameters/*
+ chown -h root.system /sys/class/power_supply/battery/input_current_max
+ chown -h root.system /sys/class/power_supply/battery/input_current_trim
+ chown -h root.system /sys/class/power_supply/battery/input_current_settled
+ chown -h root.system /sys/class/power_supply/battery/voltage_min
+ chmod 0664 /sys/class/power_supply/battery/input_current_max
+ chmod 0664 /sys/class/power_supply/battery/input_current_trim
+ chmod 0664 /sys/class/power_supply/battery/input_current_settled
+ chmod 0664 /sys/class/power_supply/battery/voltage_min
+ chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor
+ start charger_monitor
+ fi
+}
+
+start_msm_irqbalance_8939()
+{
+ if [ -f /system/bin/msm_irqbalance ]; then
+ case "$platformid" in
+ "239" | "241" | "263" | "268" | "269" | "270" | "271")
+ start msm_irqbalance;;
+ esac
+ fi
+}
+
+start_msm_irqbalance()
+{
+ if [ -f /system/bin/msm_irqbalance ]; then
+ start msm_irqbalance
+ fi
+}
+
+baseband=`getprop ro.baseband`
+#
+# Suppress default route installation during RA for IPV6; user space will take
+# care of this
+# exception default ifc
+for file in /proc/sys/net/ipv6/conf/*
+do
+ echo 0 > $file/accept_ra_defrtr
+done
+echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr
+
+case "$baseband" in
+ "svlte2a")
+ start bridgemgrd
+ ;;
+esac
+
+start_sensors
+
+case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ value=`cat /sys/devices/soc0/hw_platform`
+ else
+ value=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ case "$value" in
+ "Fluid")
+ start profiler_daemon;;
+ esac
+ ;;
+ "msm8660" )
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ platformvalue=`cat /sys/devices/soc0/hw_platform`
+ else
+ platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ case "$platformvalue" in
+ "Fluid")
+ start profiler_daemon;;
+ esac
+ ;;
+ "msm8960")
+ case "$baseband" in
+ "msm")
+ start_battery_monitor;;
+ esac
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ platformvalue=`cat /sys/devices/soc0/hw_platform`
+ else
+ platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ case "$platformvalue" in
+ "Fluid")
+ start profiler_daemon;;
+ "Liquid")
+ start profiler_daemon;;
+ esac
+ ;;
+ "msm8974")
+ platformvalue=`cat /sys/devices/soc0/hw_platform`
+ case "$platformvalue" in
+ "Fluid")
+ start profiler_daemon;;
+ "Liquid")
+ start profiler_daemon;;
+ esac
+ case "$baseband" in
+ "msm")
+ start_battery_monitor
+ ;;
+ esac
+ start_charger_monitor
+ ;;
+ "apq8084")
+ platformvalue=`cat /sys/devices/soc0/hw_platform`
+ case "$platformvalue" in
+ "Fluid")
+ start profiler_daemon;;
+ "Liquid")
+ start profiler_daemon;;
+ esac
+ ;;
+ "msm8226")
+ start_charger_monitor
+ ;;
+ "msm8610")
+ start_charger_monitor
+ ;;
+ "msm8916")
+ start_msm_irqbalance_8939
+ ;;
+ "msm8994")
+ start_msm_irqbalance
+ ;;
+ "msm8909")
+ ;;
+esac
+
+bootmode=`getprop ro.bootmode`
+emmc_boot=`getprop ro.boot.emmc`
+case "$emmc_boot"
+ in "true")
+ if [ "$bootmode" != "charger" ]; then # start rmt_storage and rfs_access
+ start rmt_storage
+ start rfs_access
+ fi
+ ;;
+esac
diff --git a/rootdir/etc/init.qcom.syspart_fixup.sh b/rootdir/etc/init.qcom.syspart_fixup.sh
new file mode 100644
index 0000000..661b635
--- /dev/null
+++ b/rootdir/etc/init.qcom.syspart_fixup.sh
@@ -0,0 +1,79 @@
+#!/system/bin/sh
+# Copyright (c) 2012, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+target="$1"
+serial="$2"
+
+# No path is set up at this point so we have to do it here.
+PATH=/sbin:/system/sbin:/system/bin:/system/xbin
+export PATH
+
+mount_needed=false;
+
+if [ ! -f /system/etc/boot_fixup ];then
+# This should be the first command
+# remount system as read-write.
+ mount -o rw,remount,barrier=1 /system
+ mount_needed=true;
+fi
+
+# **** WARNING *****
+# This runs in a single-threaded, critical path portion
+# of the Android bootup sequence. This is to guarantee
+# all necessary system partition fixups are done before
+# the rest of the system starts up. Run any non-
+# timing critical tasks in a separate process to
+# prevent slowdown at boot.
+
+# Run modem link script
+if [ -f /system/etc/init.qcom.modem_links.sh ]; then
+ /system/bin/sh /system/etc/init.qcom.modem_links.sh
+fi
+
+# Run mdm link script
+if [ -f /system/etc/init.qcom.mdm_links.sh ]; then
+ /system/bin/sh /system/etc/init.qcom.mdm_links.sh
+fi
+
+# Run wifi script
+if [ -f /system/etc/init.qcom.wifi.sh ]; then
+ /system/bin/sh /system/etc/init.qcom.wifi.sh "$target" "$serial"
+fi
+
+# Run the sensor script
+if [ -f /system/etc/init.qcom.sensor.sh ]; then
+ /system/bin/sh /system/etc/init.qcom.sensor.sh
+fi
+
+touch /system/etc/boot_fixup
+
+if $mount_needed ;then
+# This should be the last command
+# remount system as read-only.
+ mount -o ro,remount,barrier=1 /system
+fi
diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc
new file mode 100644
index 0000000..e3001ee
--- /dev/null
+++ b/rootdir/etc/init.qcom.usb.rc
@@ -0,0 +1,1372 @@
+# Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+on init
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ chown system system /sys/class/android_usb/android0/terminal_version
+ chmod 0660 /sys/class/android_usb/android0/terminal_version
+
+on charger
+ setprop sys.usb.config mass_storage
+
+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
+
+service qcom-usb-sh /system/bin/sh /init.qcom.usb.sh
+ class main
+ user root
+ oneshot
+
+# Following are the parameters required for usb functionality. They provide configurable options like
+# product_id/vendor id and allows specifying required functions:
+#
+# Required parameters:
+#
+# /sys/class/android_usb/android0/enable: Enables/disables usb composition
+# Value: 0 (disable), 1 (enable)
+#
+# /sys/class/android_usb/android0/idVendor: Stores Vendor ID
+# Value: 05c6 (Vendor id for Qualcomm Inc)
+#
+# /sys/class/android_usb/android0/idProduct: Stores Product id corresponding to usb composition
+# Value: 0x9xxx for composite interface, 0xFxxx for single interface
+#
+# /sys/class/android_usb/android0/f_diag/clients: Stores name of clients representing a diag interface.
+# Value: Passed one per interface. e.g. diag[,diag_mdm, diag_qsc, diag_mdm2]
+#
+# /sys/class/android_usb/android0/functions: Stores name of the function drivers used in usb composition.
+# Value: Passed one per function driver. e.g. diag[,adb]
+#
+#Optional parameters:
+#
+# /sys/class/android_usb/android0/f_serial/transports: Stores type of underlying transports used to
+# communicate to serial interface.
+# Value: Passed one per interface. One value represents control and data transport together.
+# e.g. smd[,sdio,tty,hsic]
+# Only required if serial interface is present.
+#
+# /sys/class/android_usb/android0/f_serial/transport_names: Stores name of the underlying transports
+# used to communicate to serial interface. This is used to distinguish between more than one interface
+# using same transport type.
+# Value: Passed one per interface. One value represents control and data transport together.
+# e.g. serial_hsic[,serial_hsusb]
+# Only required for transport type hsic, optional for other transport types.
+#
+# /sys/class/android_usb/android0/f_rmnet/transports: Stores type of underlying transports used to
+# communicate to rmnet interface.
+# Value: Passed two per interface as control, data transport type pair.
+# e.g. smd,bam[,hsuart,hsuart]
+# Only required if rmnet interface is present.
+#
+# /sys/class/android_usb/android0/f_rmnet/transport_names: Stores name of the underlying transports
+# used to communicate to rmnet interface. This is used to distinguish between more than one interface
+# using same transport type.
+# Value: Passed one per interface. One value represents control and data transport together.
+# e.g. rmnet_hsic[,rmnet_hsusb]
+# Only required for transport type hsic, optional for other transport types.
+
+
+# USB Composite for Samsung USB Driver
+
+on property:sys.usb.config=mtp,conn_gadget
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6860
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty
+ write /sys/class/android_usb/android0/functions mtp,acm,conn_gadget
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,conn_gadget,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6860
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty
+ write /sys/class/android_usb/android0/functions mtp,acm,conn_gadget,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6860
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty
+ write /sys/class/android_usb/android0/functions mtp,acm
+ write /sys/class/android_usb/android0/enable 1
+ 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/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6860
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty
+ write /sys/class/android_usb/android0/functions mtp,acm,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+
+on property:sys.usb.config=ptp
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6865
+ 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/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6866
+ 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}
+
+on property:sys.usb.config=rndis
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6863
+ 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 04E8
+ write /sys/class/android_usb/android0/idProduct 6864
+ 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=ncm
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04e8
+ write /sys/class/android_usb/android0/idProduct 685d
+ write /sys/class/android_usb/android0/functions ncm
+ write /sys/class/android_usb/android0/bDeviceClass 2
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ncm,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04e8
+ write /sys/class/android_usb/android0/idProduct 685d
+ write /sys/class/android_usb/android0/functions ncm,adb
+ write /sys/class/android_usb/android0/bDeviceClass 2
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# rndis,acm,diag and rmnet,acm,diag are used for IOT Hidden Menu
+on property:sys.usb.config=rndis,acm,diag
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6864
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty
+ write /sys/class/android_usb/android0/functions rndis,acm,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rmnet,acm,diag
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 685D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,acm,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 685D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty
+ write /sys/class/android_usb/android0/functions diag,acm,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# For CDFS composite
+on property:sys.usb.config=mass_storage
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 685B
+ write /sys/class/android_usb/android0/functions mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 685E
+# write /sys/class/android_usb/android0/f_acm/instances 1
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty
+ write /sys/class/android_usb/android0/functions mass_storage,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,mtp
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6860
+ write /sys/class/android_usb/android0/functions mtp,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,mtp,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04E8
+ write /sys/class/android_usb/android0/idProduct 6860
+ write /sys/class/android_usb/android0/functions mtp,mass_storage,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# As request from the CHINA GOVERNMENT SECURITY POLICY
+on property:sys.usb.config=askon
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=askon,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ setprop sys.usb.state ${sys.usb.config}
+
+# USB compositions
+on property:sys.usb.config=diag,serial_tty,serial_smd
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9002
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports tty,smd
+ write /sys/class/android_usb/android0/functions diag,serial
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_tty,serial_smd,adb
+ 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 9020
+ 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 diag,adb,serial
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb
+ 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 901D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 900E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag
+ 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,adb
+ 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 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 smd,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,adb
+ 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 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_bam
+ 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 smd,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_qti_bam
+ 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
+ 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_bam,mass_storage,adb
+ 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 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 smd,bam
+ 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,acm_smd,acm_tty,rmnet_bam,mass_storage,adb
+ 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 903D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,adb,acm,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 smd,bam
+ 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}
+
+on property:sys.usb.config=diag,acm_smd,acm_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 903E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ 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}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage,adb
+ 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 9037
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd_sdio,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,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage,adb
+ 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 903B
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd_sdio,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,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,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 9038
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,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 903C
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,acm,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage,adb
+ 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 9031
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_sdio,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,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage,adb
+ 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 903B
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_sdio,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,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,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 9032
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,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 903C
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,acm,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage,adb
+ 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 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ start port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage,adb
+ 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 903D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ start port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,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 tty,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,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 903E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ 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_smd,mass_storage,adb
+ 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 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/functions diag,adb,serial,rmnet_smd,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,acm_smd,acm_tty,rmnet_smd,mass_storage,adb
+ 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 903D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ start port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,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/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,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 903E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# RmNet using USB BAM to IPA BAM
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb
+ 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 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_ipa,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}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_ipa,adb
+ 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 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
+ 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}
+
+# Fusion 3 composition
+on property:sys.usb.config=diag,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
+ 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 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports hsic,tty
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 composition with diag_mdm and adb
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
+ 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 9031
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic,tty
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 composition with diag_mdm
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,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 9032
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic,tty
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA composition with adb
+on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb
+ 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 9065
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA composition without adb
+on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,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 9066
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA2 composition with adb
+on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb
+ 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 9065
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA2 composition without adb
+on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,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 9066
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion PCIe composition with diag_mdm and adb
+# Serial & RmNet bridged in userspace with tty and qti/ether
+on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,mass_storage,adb
+ 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 9035
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ 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}
+
+# Fusion PCIe composition with diag_mdm
+# Serial & RmNet bridged in userspace with tty and qti/ether
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,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 9036
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ 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}
+
+# Fusion HSIC/PCIe Hybrid composition with diag_mdm and adb
+# RmNet is bridged over PCIe using qti,ether ctrl/data transports
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_qti_ether,mass_storage,adb
+ 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 9035
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ 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}
+
+# Fusion HSIC/PCIe Hybrid composition with diag_mdm
+# RmNet is bridged over PCIe using qti,ether ctrl/data transports
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,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 9036
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ 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}
+
+# Fusion 2.2 composition with diag_qsc and adb
+on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb
+ 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 9053
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
+ 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}
+
+# Fusion 2.2 composition with diag_qsc
+on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,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 9054
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
+ 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}
+
+on property:sys.usb.tethering=true
+ write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${sys.usb.rps_mask}
+
+#on property:sys.usb.config=rndis
+# setprop sys.usb.config rndis,${persist.sys.usb.config.extra}
+
+on property:sys.usb.config=rndis,none
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct F00E
+ write /sys/class/android_usb/android0/functions rndis
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+#on property:sys.usb.config=rndis,adb
+# stop adbd
+# setprop sys.usb.config rndis,${persist.sys.usb.config.extra},adb
+
+on property:sys.usb.config=rndis,none,adb
+ 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 9024
+ write /sys/class/android_usb/android0/functions rndis,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 902C
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions rndis,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,adb
+ 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 902D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions rndis,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_smd
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B3
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_smd,adb
+ 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 90B4
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_smd,diag
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B5
+ 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/functions rndis,serial,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_smd,diag,adb
+ 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 90B6
+ 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/functions rndis,serial,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag,diag_mdm
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9041
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions rndis,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,diag_mdm,adb
+ 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 9042
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions rndis,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9086
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions rndis,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc,adb
+ 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 9087
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions rndis,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+#on property:sys.usb.config=ptp
+# write /sys/class/android_usb/android0/enable 0
+# write /sys/class/android_usb/android0/idVendor 05C6
+# write /sys/class/android_usb/android0/idProduct 904D
+# 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
+# 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 904E
+# 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}
+
+#on property:sys.usb.config=mtp
+# write /sys/class/android_usb/android0/enable 0
+# write /sys/class/android_usb/android0/idVendor 05C6
+# write /sys/class/android_usb/android0/idProduct F003
+# 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,adb
+# 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 9039
+# 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=mtp,diag
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 901B
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions mtp,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,adb
+ 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 903A
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions mtp,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9040
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions mtp,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm,adb
+ 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 903F
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions mtp,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9088
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions mtp,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc,adb
+ 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 9089
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions mtp,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,ccid
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9045
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions diag,ccid
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,ccid,adb
+ 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 9044
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions diag,adb,ccid
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+#on property:sys.usb.config=mass_storage,adb
+# 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 9015
+# write /sys/class/android_usb/android0/functions adb,mass_storage
+# write /sys/class/android_usb/android0/enable 1
+# start adbd
+# setprop sys.usb.state ${sys.usb.config}
+
+#Mass-storage only composition
+#on property:sys.usb.config=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 F000
+# write /sys/class/android_usb/android0/functions mass_storage
+# write /sys/class/android_usb/android0/enable 1
+# setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 904A
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,adb
+ 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 9060
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ 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}
+
+on property:sys.usb.config=diag,diag_mdm,qdss
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9099
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,adb
+ 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 9098
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ 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}
+
+on property:sys.usb.config=diag,qdss,rmnet_bam
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9083
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_qti_bam
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9083
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_bam,adb
+ 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 9084
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_qti_bam,adb
+ 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 9084
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_ipa
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9083
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_ipa,adb
+ 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 9084
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 909B
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic,adb
+ 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 909A
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90A3
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports bam,hsic
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic,adb
+ 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 90A2
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports bam,hsic
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9081
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss,adb
+ 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 9082
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+#on property:sys.usb.config=ncm
+# write /sys/class/android_usb/android0/enable 0
+# write /sys/class/android_usb/android0/idVendor 0525
+# write /sys/class/android_usb/android0/idProduct A4A1
+# write /sys/class/android_usb/android0/functions ncm
+# write /sys/class/android_usb/android0/enable 1
+# setprop sys.usb.state ${sys.usb.config}
+
+#on property:sys.usb.config=ncm,adb
+# 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 908C
+# write /sys/class/android_usb/android0/functions ncm,adb
+# write /sys/class/android_usb/android0/enable 1
+# start adbd
+# setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=charging
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct F006
+ write /sys/class/android_usb/android0/functions charging
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
diff --git a/rootdir/etc/init.qcom.usb.sh b/rootdir/etc/init.qcom.usb.sh
new file mode 100644
index 0000000..fa041be
--- /dev/null
+++ b/rootdir/etc/init.qcom.usb.sh
@@ -0,0 +1,249 @@
+#!/system/bin/sh
+# Copyright (c) 2012, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup
+chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup
+
+#
+# Allow persistent usb charging disabling
+# User needs to set usb charging disabled in persist.usb.chgdisabled
+#
+target=`getprop ro.board.platform`
+usbchgdisabled=`getprop persist.usb.chgdisabled`
+case "$usbchgdisabled" in
+ "") ;; #Do nothing here
+ * )
+ case $target in
+ "msm8660")
+ echo "$usbchgdisabled" > /sys/module/pmic8058_charger/parameters/disabled
+ echo "$usbchgdisabled" > /sys/module/smb137b/parameters/disabled
+ ;;
+ "msm8960")
+ echo "$usbchgdisabled" > /sys/module/pm8921_charger/parameters/disabled
+ ;;
+ esac
+esac
+
+usbcurrentlimit=`getprop persist.usb.currentlimit`
+case "$usbcurrentlimit" in
+ "") ;; #Do nothing here
+ * )
+ case $target in
+ "msm8960")
+ echo "$usbcurrentlimit" > /sys/module/pm8921_charger/parameters/usb_max_current
+ ;;
+ esac
+esac
+
+#
+# Check ESOC for external MDM
+#
+# Note: currently only a single MDM is supported
+#
+if [ -d /sys/bus/esoc/devices ]; then
+for f in /sys/bus/esoc/devices/*; do
+ if [ -d $f ]; then
+ esoc_name=`cat $f/esoc_name`
+ if [ "$esoc_name" = "MDM9x25" -o "$esoc_name" = "MDM9x35" ]; then
+ esoc_link=`cat $f/esoc_link`
+ break
+ fi
+ fi
+done
+fi
+
+target=`getprop ro.board.platform`
+
+#
+# Allow USB enumeration with default PID/VID
+#
+baseband=`getprop ro.baseband`
+echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua
+usb_config=`getprop persist.sys.usb.config`
+case "$usb_config" in
+ "" | "adb") #USB persist config not set, select default configuration
+ case "$esoc_link" in
+ "HSIC")
+ setprop persist.sys.usb.config diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
+ setprop persist.rmnet.mux enabled
+ ;;
+ "HSIC+PCIe")
+ setprop persist.sys.usb.config diag,diag_mdm,serial_hsic,rmnet_qti_ether,mass_storage,adb
+ ;;
+ "PCIe")
+ setprop persist.sys.usb.config diag,diag_mdm,serial_tty,rmnet_qti_ether,mass_storage,adb
+ ;;
+ *)
+ case "$baseband" in
+ "mdm")
+ setprop persist.sys.usb.config diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
+ ;;
+ "mdm2")
+ setprop persist.sys.usb.config diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
+ ;;
+ "sglte")
+ setprop persist.sys.usb.config diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb
+ ;;
+ "dsda" | "sglte2")
+ setprop persist.sys.usb.config diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb
+ ;;
+ "dsda2")
+ setprop persist.sys.usb.config diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb
+ ;;
+ *)
+ case "$target" in
+ "msm8916")
+ setprop persist.sys.usb.config diag,serial_smd,rmnet_bam,adb
+ ;;
+ "msm8994")
+ setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb
+ ;;
+ "msm8909")
+ setprop persist.sys.usb.config diag,serial_smd,rmnet_qti_bam,adb
+ ;;
+ *)
+ setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ * ) ;; #USB persist config exists, do nothing
+esac
+
+#
+# Do target specific things
+#
+case "$target" in
+ "msm8974")
+# Select USB BAM - 2.0 or 3.0
+ echo ssusb > /sys/bus/platform/devices/usb_bam/enable
+ ;;
+ "apq8084")
+ if [ "$baseband" == "apq" ]; then
+ echo "msm_hsic_host" > /sys/bus/platform/drivers/xhci_msm_hsic/unbind
+ fi
+ ;;
+ "msm8226")
+ if [ -e /sys/bus/platform/drivers/msm_hsic_host ]; then
+ if [ ! -L /sys/bus/usb/devices/1-1 ]; then
+ echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
+ fi
+ fi
+ ;;
+ "msm8994")
+ echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports
+ echo 1 > /sys/class/android_usb/android0/f_rndis_qc/max_pkt_per_xfer # Disable RNDIS UL aggregation
+ ;;
+esac
+
+#
+# set module params for embedded rmnet devices
+#
+rmnetmux=`getprop persist.rmnet.mux`
+case "$baseband" in
+ "mdm" | "dsda" | "sglte2")
+ case "$rmnetmux" in
+ "enabled")
+ echo 1 > /sys/module/rmnet_usb/parameters/mux_enabled
+ echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links
+ echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev
+ ;;
+ esac
+ echo 1 > /sys/module/rmnet_usb/parameters/rmnet_data_init
+ # Allow QMUX daemon to assign port open wait time
+ chown -h radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
+ ;;
+ "dsda2")
+ echo 2 > /sys/module/rmnet_usb/parameters/no_rmnet_devs
+ echo hsicctl,hsusbctl > /sys/module/rmnet_usb/parameters/rmnet_dev_names
+ case "$rmnetmux" in
+ "enabled") #mux is neabled on both mdms
+ echo 3 > /sys/module/rmnet_usb/parameters/mux_enabled
+ echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links
+ echo 17 > write /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev
+ ;;
+ "enabled_hsic") #mux is enabled on hsic mdm
+ echo 1 > /sys/module/rmnet_usb/parameters/mux_enabled
+ echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links
+ echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev
+ ;;
+ "enabled_hsusb") #mux is enabled on hsusb mdm
+ echo 2 > /sys/module/rmnet_usb/parameters/mux_enabled
+ echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links
+ echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev
+ ;;
+ esac
+ echo 1 > /sys/module/rmnet_usb/parameters/rmnet_data_init
+ # Allow QMUX daemon to assign port open wait time
+ chown -h radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
+ ;;
+esac
+
+#
+# Add support for exposing lun0 as cdrom in mass-storage
+#
+cdromname="/system/etc/cdrom_install.iso"
+platformver=`cat /sys/devices/soc0/hw_platform`
+case "$target" in
+ "msm8226" | "msm8610" | "msm8916")
+ case $platformver in
+ "QRD")
+ echo "mounting usbcdrom lun"
+ echo $cdromname > /sys/class/android_usb/android0/f_mass_storage/rom/file
+ chmod 0444 /sys/class/android_usb/android0/f_mass_storage/rom/file
+ ;;
+ esac
+ ;;
+esac
+
+#
+# Initialize RNDIS Diag option. If unset, set it to 'none'.
+#
+diag_extra=`getprop persist.sys.usb.config.extra`
+if [ "$diag_extra" == "" ]; then
+ setprop persist.sys.usb.config.extra none
+fi
+
+# soc_ids for 8916/8939 differentiation
+if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+fi
+
+# enable rps cpus on msm8939 target
+setprop sys.usb.rps_mask 0
+case "$soc_id" in
+ "239" | "241" | "263")
+ setprop sys.usb.rps_mask 10
+ ;;
+esac
diff --git a/rootdir/etc/init.rc b/rootdir/etc/init.rc
new file mode 100644
index 0000000..7baedbd
--- /dev/null
+++ b/rootdir/etc/init.rc
@@ -0,0 +1,1170 @@
+# Copyright (C) 2012 The Android Open Source Project
+#
+# IMPORTANT: Do not create world writable files or directories.
+# This is a common source of Android security bugs.
+#
+
+import /init.environ.rc
+import /init.usb.rc
+import /init.${ro.hardware}.rc
+import /init.${ro.zygote}.rc
+import /init.trace.rc
+import /init.carrier.rc
+# Include CM's extra init file
+import /init.cm.rc
+
+
+on early-init
+ # Set init and its forked children's oom_adj.
+ write /proc/1/oom_score_adj -1000
+
+ # Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
+ write /sys/fs/selinux/checkreqprot 0
+
+ # Set the security context for the init process.
+ # This should occur before anything else (e.g. ueventd) is started.
+ setcon u:r:init:s0
+
+ # Set the security context of /adb_keys if present.
+ restorecon /adb_keys
+
+ start ueventd
+
+ # create mountpoints
+ mkdir /mnt 0775 root system
+
+on init
+ sysclktz 0
+
+ loglevel 3
+
+ # SEC_SELINUX
+ # for audit message
+ chown system system /proc/avc_msg
+ chmod 0660 /proc/avc_msg
+
+ # Backward compatibility
+ symlink /system/etc /etc
+ symlink /sys/kernel/debug /d
+# permission for CHARGING
+ chown system radio /sys/class/power_supply/battery/batt_discharging_check
+ chown system radio /sys/class/power_supply/battery/batt_discharging_check_adc
+ chown system radio /sys/class/power_supply/battery/batt_discharging_ntc
+ chown system radio /sys/class/power_supply/battery/batt_discharging_ntc_adc
+ chown system radio /sys/class/power_supply/battery/batt_self_discharging_control
+
+ # Right now vendor lives on the same filesystem as system,
+ # but someday that may change.
+ symlink /system/vendor /vendor
+
+ # Create cgroup mount point for cpu accounting
+ mkdir /acct
+ mount cgroup none /acct cpuacct
+ mkdir /acct/uid
+
+ # Create cgroup mount point for memory
+ mount tmpfs none /sys/fs/cgroup mode=0750,uid=0,gid=1000
+ mkdir /sys/fs/cgroup/memory 0750 root system
+ mount cgroup none /sys/fs/cgroup/memory memory
+ write /sys/fs/cgroup/memory/memory.move_charge_at_immigrate 1
+ chown root system /sys/fs/cgroup/memory/tasks
+ chmod 0660 /sys/fs/cgroup/memory/tasks
+ mkdir /sys/fs/cgroup/memory/sw 0750 root system
+ write /sys/fs/cgroup/memory/sw/memory.swappiness 100
+ write /sys/fs/cgroup/memory/sw/memory.move_charge_at_immigrate 1
+ chown root system /sys/fs/cgroup/memory/sw/tasks
+ chmod 0660 /sys/fs/cgroup/memory/sw/tasks
+
+ mkdir /system
+ mkdir /data 0771 system system
+ mkdir /cache 0770 system cache
+ mkdir /config 0500 root root
+ mkdir /efs 0771 system radio
+
+ # See storage config details at http://source.android.com/tech/storage/
+ mkdir /mnt/shell 0700 shell shell
+ mkdir /mnt/media_rw 0700 media_rw media_rw
+ mkdir /storage 0751 root sdcard_r
+
+ # Directory for putting things only root should see.
+ mkdir /mnt/secure 0700 root root
+
+ # Directory for staging bindmounts
+ mkdir /mnt/secure/staging 0700 root root
+
+ # Directory-target for where the secure container
+ # imagefile directory will be bind-mounted
+ mkdir /mnt/secure/asec 0700 root root
+
+ # Secure container public mount points.
+ mkdir /mnt/asec 0700 root system
+ mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
+
+ # Filesystem image public mount points.
+ mkdir /mnt/obb 0700 root system
+ mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
+
+ # memory control cgroup
+ mkdir /dev/memcg 0700 root system
+ mount cgroup none /dev/memcg memory
+
+ write /proc/sys/kernel/panic_on_oops 1
+ write /proc/sys/kernel/hung_task_timeout_secs 0
+ write /proc/cpu/alignment 4
+ write /proc/sys/kernel/sched_latency_ns 10000000
+ write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
+ write /proc/sys/kernel/sched_compat_yield 1
+ write /proc/sys/kernel/sched_child_runs_first 0
+ write /proc/sys/kernel/randomize_va_space 2
+ write /proc/sys/kernel/kptr_restrict 2
+ write /proc/sys/vm/mmap_min_addr 32768
+ write /proc/sys/net/ipv4/ping_group_range "0 2147483647"
+ write /proc/sys/net/unix/max_dgram_qlen 300
+ write /proc/sys/kernel/sched_rt_runtime_us 950000
+ write /proc/sys/kernel/sched_rt_period_us 1000000
+
+ # reflect fwmark from incoming packets onto generated replies
+ write /proc/sys/net/ipv4/fwmark_reflect 1
+ write /proc/sys/net/ipv6/fwmark_reflect 1
+
+ # set fwmark on accepted sockets
+ write /proc/sys/net/ipv4/tcp_fwmark_accept 1
+
+ # Create cgroup mount points for process groups
+ mkdir /dev/cpuctl
+ mount cgroup none /dev/cpuctl cpu
+ chown system system /dev/cpuctl
+ chown system system /dev/cpuctl/tasks
+ chmod 0660 /dev/cpuctl/tasks
+ write /dev/cpuctl/cpu.shares 1024
+ write /dev/cpuctl/cpu.rt_runtime_us 950000
+ write /dev/cpuctl/cpu.rt_period_us 1000000
+
+ mkdir /dev/cpuctl/apps
+ chown system system /dev/cpuctl/apps/tasks
+ chmod 0666 /dev/cpuctl/apps/tasks
+ write /dev/cpuctl/apps/cpu.shares 1024
+ write /dev/cpuctl/apps/cpu.rt_runtime_us 800000
+ write /dev/cpuctl/apps/cpu.rt_period_us 1000000
+
+ mkdir /dev/cpuctl/apps/bg_non_interactive
+ chown system system /dev/cpuctl/apps/bg_non_interactive/tasks
+ chmod 0666 /dev/cpuctl/apps/bg_non_interactive/tasks
+ # 5.0 %
+ write /dev/cpuctl/apps/bg_non_interactive/cpu.shares 52
+ write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_runtime_us 700000
+ write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_period_us 1000000
+
+ # qtaguid will limit access to specific data based on group memberships.
+ # net_bw_acct grants impersonation of socket owners.
+ # net_bw_stats grants access to other apps' detailed tagged-socket stats.
+ chown root net_bw_acct /proc/net/xt_qtaguid/ctrl
+ chown root net_bw_stats /proc/net/xt_qtaguid/stats
+
+ # Allow everybody to read the xt_qtaguid resource tracking misc dev.
+ # This is needed by any process that uses socket tagging.
+ chmod 0644 /dev/xt_qtaguid
+
+ # Create location for fs_mgr to store abbreviated output from filesystem
+ # checker programs.
+ mkdir /dev/fscklogs 0770 root system
+
+ # pstore/ramoops previous console log
+ mount pstore pstore /sys/fs/pstore
+ chown system log /sys/fs/pstore/console-ramoops
+ chmod 0440 /sys/fs/pstore/console-ramoops
+
+# Healthd can trigger a full boot from charger mode by signaling this
+# property when the power button is held.
+on property:sys.boot_from_charger_mode=1
+ class_stop charger
+ trigger late-init
+
+# Load properties from /system/ + /factory after fs mount.
+on load_all_props_action
+ load_all_props
+
+# Indicate to fw loaders that the relevant mounts are up.
+on firmware_mounts_complete
+ rm /dev/.booting
+
+# Mount filesystems and start core system services.
+on late-init
+ trigger early-fs
+ trigger fs
+ trigger post-fs
+ trigger post-fs-data
+
+ # Load properties from /system/ + /factory after fs mount. Place
+ # this in another action so that the load will be scheduled after the prior
+ # issued fs triggers have completed.
+ trigger load_all_props_action
+
+ # Remove a file to wake up anything waiting for firmware.
+ trigger firmware_mounts_complete
+
+ trigger early-boot
+ trigger boot
+
+
+on post-fs
+ # once everything is setup, no need to modify /
+ mount rootfs rootfs / ro remount
+ # mount shared so changes propagate into child namespaces
+ mount rootfs rootfs / shared rec
+
+ # We chown/chmod /cache again so because mount is run as root + defaults
+ chown system cache /cache
+ chmod 0770 /cache
+ # We restorecon /cache in case the cache partition has been reset.
+ restorecon_recursive /cache
+
+ # This may have been created by the recovery system with odd permissions
+ chown system cache /cache/recovery
+ chmod 0770 /cache/recovery
+
+ #change permissions on vmallocinfo so we can grab it from bugreports
+ chown root log /proc/vmallocinfo
+ chmod 0440 /proc/vmallocinfo
+
+ chown root log /proc/slabinfo
+ chmod 0440 /proc/slabinfo
+
+ #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
+ chown root system /proc/kmsg
+ chmod 0440 /proc/kmsg
+ chown root system /proc/sysrq-trigger
+ chmod 0220 /proc/sysrq-trigger
+ chown system log /proc/last_kmsg
+ chmod 0440 /proc/last_kmsg
+
+ # make the selinux kernel policy world-readable
+ chmod 0444 /sys/fs/selinux/policy
+
+ # create the lost+found directories, so as to enforce our permissions
+ mkdir /cache/lost+found 0770 root root
+
+on post-fs-data
+ # sec_efs_file
+ mkdir /efs/sec_efs 0775 radio system
+
+ # We chown/chmod /data again so because mount is run as root + defaults
+ chown system system /data
+ chmod 0771 /data
+ # We restorecon /data in case the userdata partition has been reset.
+ restorecon /data
+ restorecon_recursive /data/media
+
+ # Avoid predictable entropy pool. Carry over entropy from previous boot.
+ copy /data/system/entropy.dat /dev/urandom
+
+ # Create dump dir and collect dumps.
+ # Do this before we mount cache so eventually we can use cache for
+ # storing dumps on platforms which do not have a dedicated dump partition.
+ mkdir /data/dontpanic 0750 root log
+
+ # Collect apanic data, free resources and re-arm trigger
+ copy /proc/apanic_console /data/dontpanic/apanic_console
+ chown root log /data/dontpanic/apanic_console
+ chmod 0640 /data/dontpanic/apanic_console
+
+ copy /proc/apanic_threads /data/dontpanic/apanic_threads
+ chown root log /data/dontpanic/apanic_threads
+ chmod 0640 /data/dontpanic/apanic_threads
+
+ write /proc/apanic_console 1
+
+ # create basic filesystem structure
+ mkdir /data/misc 01771 system misc
+ mkdir /data/misc/adb 02750 system shell
+ # SEC_SELINUX
+ mkdir /data/misc/audit 02775 audit system
+ mkdir /data/misc/bluedroid 0770 bluetooth net_bt_stack
+ mkdir /data/misc/bluetooth 0770 system system
+ mkdir /data/misc/keystore 0700 keystore keystore
+ mkdir /data/misc/keychain 0771 system system
+ mkdir /data/misc/net 0750 root shell
+ mkdir /data/misc/radio 0771 system radio
+ mkdir /data/misc/sms 0770 system radio
+ mkdir /data/misc/zoneinfo 0775 system system
+ mkdir /data/misc/vpn 0770 system vpn
+ mkdir /data/misc/shared_relro 0771 shared_relro shared_relro
+ mkdir /data/misc/systemkeys 0700 system system
+ mkdir /data/misc/wifi 0770 wifi system
+ mkdir /data/misc/wifi/sockets 0770 wifi wifi
+ mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
+ mkdir /data/misc/wifi_share_profile 0771 wifi system
+ mkdir /data/misc/wifi_hostapd 0771 wifi system
+ mkdir /data/misc/ethernet 0770 system system
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ mkdir /data/misc/user 0771 root root
+ # give system access to wpa_supplicant.conf for backup and restore
+ chmod 0660 /data/misc/wifi/wpa_supplicant.conf
+ chown system wifi /data/misc/wifi/wpa_supplicant.conf
+ mkdir /data/local 0751 root root
+ mkdir /data/misc/media 0700 media media
+
+ # icd
+ check_icd
+ chown system system /dev/icd
+ chmod 0644 /dev/icd
+ chown system system /dev/icdr
+ chmod 0644 /dev/icdr
+ chown system system /dev/tzic
+
+ mkdir /data/misc/radio/hatp 0755 radio system
+ # vpnclient
+ mkdir /data/misc/vpnclientd 0770 system system
+
+ # h2k permission
+ mkdir /efs/cpk 0771 radio system
+ chmod 0644 /efs/redata.bin
+ chmod 0644 /efs/cpk/redata.bin
+ chown radio radio /efs/h2k.dat
+ chown radio radio /efs/cpk/h2k.dat
+ chmod 0644 /efs/h2k.dat
+ chmod 0644 /efs/cpk/h2k.dat
+ chown system system /efs/drm/h2k
+
+ # For security reasons, /data/local/tmp should always be empty.
+ # Do not place files or directories in /data/local/tmp
+ mkdir /data/local/tmp 0771 shell shell
+ mkdir /data/data 0771 system system
+ mkdir /data/app-private 0771 system system
+ mkdir /data/app-asec 0700 root root
+ mkdir /data/app-lib 0771 system system
+ mkdir /data/app 0771 system system
+ mkdir /data/property 0700 root root
+
+ # SA, System SW, SAMSUNG
+ # create log directory
+ mkdir /data/log 0775 system log
+ chown system log /data/log
+ mkdir /data/anr 0775 system system
+ chown system system /data/anr
+ chmod 0775 /data/log
+ chmod 0775 /data/anr
+ restorecon /data/log
+ restorecon /data/anr
+
+ # create dalvik-cache, so as to enforce our permissions
+ mkdir /data/dalvik-cache 0771 root root
+ mkdir /data/dalvik-cache/profiles 0711 system system
+
+ # create resource-cache and double-check the perms
+ mkdir /data/resource-cache 0771 system system
+ chown system system /data/resource-cache
+ chmod 0771 /data/resource-cache
+
+ # create the lost+found directories, so as to enforce our permissions
+ mkdir /data/lost+found 0770 root root
+
+ # create directory for DRM plug-ins - give drm the read/write access to
+ # the following directory.
+ mkdir /data/drm 0770 drm drm
+
+ # create directory for MediaDrm plug-ins - give drm the read/write access to
+ # the following directory.
+ mkdir /data/mediadrm 0770 mediadrm mediadrm
+
+# DRK permission
+ mkdir /efs/prov 0770 radio system
+ mkdir /efs/prov_data 0770 radio system
+ chown radio system /efs/prov_data/dev_root
+ chmod 0770 /efs/prov_data/dev_root
+ chown radio system /efs/prov_data/dev_root/dev_root.dat
+ chmod 0640 /efs/prov_data/dev_root/dev_root.dat
+ chown radio system /efs/prov/libdevkm.lock
+ chmod 0660 /efs/prov/libdevkm.lock
+ rm /efs/prov/prov.b00
+ rm /efs/prov/prov.b01
+ rm /efs/prov/prov.b02
+ rm /efs/prov/prov.b03
+ rm /efs/prov/prov.mdt
+# CS socket
+ mkdir /dev/socket/cs_socket 0770 system system
+
+# [ SEC_MM_DRM
+ # Added drm folder to copy drm plugins
+ mkdir /system/lib/drm 0775
+ chown root root /system/lib/drm
+ chmod 0775 /system/lib/drm
+
+ restorecon -R /efs
+ restorecon -R /carrier
+ restorecon_recursive /data/misc/keystore
+ restorecon_recursive /data/property
+ restorecon_recursive /data/security
+# ]
+
+ # symlink to bugreport storage location
+ symlink /data/data/com.android.shell/files/bugreports /data/bugreports
+
+ # Separate location for storing security policy files on data
+ mkdir /data/security 0711 system system
+
+ # Reload policy from /data/security if present.
+ setprop selinux.reload_policy 1
+
+ # SA, System SW, SAMSUNG create log directory
+ mkdir /data/log 0775 system log
+ chown system log /data/log
+ mkdir /data/anr 0775 system system
+ chown system system /data/anr
+ chmod 0775 /data/log
+ chmod 0775 /data/anr
+ restorecon /data/log
+ restorecon /data/anr
+
+ # Set SELinux security contexts on upgrade or policy update.
+ restorecon_recursive /data
+ restorecon /data/data
+ restorecon /data/user
+ restorecon /data/user/0
+
+ # If there is no fs-post-data action in the init.<device>.rc file, you
+ # must uncomment this line, otherwise encrypted filesystems
+ # won't work.
+ # Set indication (checked by vold) that we have finished this action
+ #setprop vold.post_fs_data_done 1
+
+on boot
+ # basic network init
+ ifup lo
+ hostname localhost
+ domainname localdomain
+
+ # set RLIMIT_NICE to allow priorities from 19 to -20
+ setrlimit 13 40 40
+
+ # Memory management. Basic kernel parameters, and allow the high
+ # level system server to be able to adjust the kernel OOM driver
+ # parameters to match how it is managing things.
+ write /proc/sys/vm/overcommit_memory 1
+ write /proc/sys/vm/min_free_order_shift 4
+ chown root system /sys/module/lowmemorykiller/parameters/adj
+ chmod 0220 /sys/module/lowmemorykiller/parameters/adj
+ chown root system /sys/module/lowmemorykiller/parameters/minfree
+ chmod 0220 /sys/module/lowmemorykiller/parameters/minfree
+
+ # Tweak background writeout
+ write /proc/sys/vm/dirty_expire_centisecs 200
+ write /proc/sys/vm/dirty_background_ratio 5
+
+# SEC DVFS sysfs node
+ chown radio system /sys/power/cpufreq_max_limit
+ chown radio system /sys/power/cpufreq_min_limit
+ chown radio system /sys/power/cpufreq_table
+ chmod 664 /sys/power/cpufreq_max_limit
+ chmod 664 /sys/power/cpufreq_min_limit
+ chmod 664 /sys/power/cpufreq_table
+
+ chown radio system /sys/devices/system/cpu/kernel_max
+ chmod 664 /sys/devices/system/cpu/kernel_max
+
+ chown radio system /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ chmod 664 /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ chown radio system /sys/class/kgsl/kgsl-3d0/min_pwrlevel
+ chmod 664 /sys/class/kgsl/kgsl-3d0/min_pwrlevel
+ chown radio system /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies
+ chmod 664 /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies
+
+# Permissions for SSRM
+ chmod 0664 /sys/devices/platform/sec-thermistor/temperature
+ chmod 0664 /sys/class/power_supply/battery/siop_level
+ chmod 0664 /sys/class/power_supply/battery/test_charge_current
+ chown radio system /sys/devices/platform/sec-thermistor/temperature
+ chown radio system /sys/class/power_supply/battery/siop_level
+ chown radio system /sys/class/power_supply/battery/test_charge_current
+
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+
+ # Assume SMP uses shared cpufreq policy for all CPUs
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+
+ chown system system /sys/class/timed_output/vibrator/enable
+ chown system system /sys/class/leds/keyboard-backlight/brightness
+ chown system system /sys/class/leds/lcd-backlight/brightness
+ chown system system /sys/class/leds/button-backlight/brightness
+ chown system system /sys/class/leds/jogball-backlight/brightness
+ chown system system /sys/class/leds/red/brightness
+ chown system system /sys/class/leds/green/brightness
+ chown system system /sys/class/leds/blue/brightness
+ chown system system /sys/class/leds/red/device/grpfreq
+ chown system system /sys/class/leds/red/device/grppwm
+ chown system system /sys/class/leds/red/device/blink
+ chown system system /sys/class/timed_output/vibrator/enable
+ chown system system /sys/module/sco/parameters/disable_esco
+ chown system system /sys/kernel/ipv4/tcp_wmem_min
+ chown system system /sys/kernel/ipv4/tcp_wmem_def
+ chown system system /sys/kernel/ipv4/tcp_wmem_max
+ chown system system /sys/kernel/ipv4/tcp_rmem_min
+ chown system system /sys/kernel/ipv4/tcp_rmem_def
+ chown system system /sys/kernel/ipv4/tcp_rmem_max
+ chown root radio /proc/cmdline
+
+# Auto Brightness
+ chown system system /sys/class/backlight/panel/auto_brightness
+ chmod 0660 /sys/class/backlight/panel/auto_brightness
+
+# LCD mdnie and panel work
+ chown system system /sys/class/mdnie/mdnie/lcdtype
+ chown system system /sys/class/mdnie/mdnie/lcd_power
+ chown system media_rw /sys/class/mdnie/mdnie/scenario
+ chmod 0660 /sys/class/mdnie/mdnie/scenario
+
+ chown system system /sys/class/mdnie/mdnie/tuning
+ chown system media_rw /sys/class/mdnie/mdnie/outdoor
+ chown system system /sys/class/mdnie/mdnie/mdnie_temp
+ chown system media_rw /sys/class/mdnie/mdnie/mode
+ chown system system /sys/class/mdnie/mdnie/negative
+ chown system media_rw /sys/class/mdnie/mdnie/playspeed
+ chown system media_rw /sys/class/mdnie/mdnie/accessibility
+ chown system system /sys/class/mdnie/mdnie/cabc
+ chown system system /sys/class/mdnie/mdnie/bypass
+ chown system media_rw /sys/class/mdnie/mdnie/sensorRGB
+ chmod 0660 /sys/class/mdnie/mdnie/sensorRGB
+
+ chown system system /sys/class/lcd/panel/panel/auto_brightness
+ chown system system /sys/class/lcd/panel/window_type
+ chown radio system /sys/class/lcd/panel/power_reduce
+ chown radio system /sys/class/lcd/panel/siop_enable
+ chown radio system /sys/class/lcd/panel/temperature
+ chown radio system /sys/class/lcd/panel/tuning
+ chown radio system /sys/class/lcd/panel/lux
+
+# Adjust YUV to RGB Conversion(CSC_Conversion)
+ chown system media_rw /sys/class/graphics/fb0/csc_cfg
+ chmod 0660 /sys/class/graphics/fb0/csc_cfg
+
+# permission for Input Device(TSP).
+ chown system radio /sys/class/sec/tsp/cmd
+ chmod 0660 /sys/class/sec/tsp/input/enabled
+ chown system system /sys/class/sec/tsp/input/enabled
+
+# permission for Input Device(TKEY).
+ chmod 0660 /sys/class/sec/sec_touchkey/input/enabled
+ chown system system /sys/class/sec/sec_touchkey/input/enabled
+
+# permission for TKEY LED EN
+ chmod 0660 /sys/class/sec/sec_touchkey/brightness
+ chown system system /sys/class/sec/sec_touchkey/brightness
+
+# Permissions for gpio_keys
+ chown system radio /sys/class/sec/sec_key/wakeup_keys
+ write /sys/class/sec/sec_key/wakeup_keys 116,172
+
+ # Permissions for System Server and daemons.
+ chown radio system /sys/android_power/state
+ chown radio system /sys/android_power/request_state
+ chown radio system /sys/android_power/acquire_full_wake_lock
+ chown radio system /sys/android_power/acquire_partial_wake_lock
+ chown radio system /sys/android_power/release_wake_lock
+ chown system system /sys/power/autosleep
+ chown system system /sys/power/state
+ chown system system /sys/power/wakeup_count
+ chown radio system /sys/power/wake_lock
+ chown radio system /sys/power/wake_unlock
+ chmod 0660 /sys/power/state
+ chmod 0660 /sys/power/wake_lock
+ chmod 0660 /sys/power/wake_unlock
+ chown system system /sys/module/msm_thermal/core_control/enabled
+
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+
+ # Assume SMP uses shared cpufreq policy for all CPUs
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+
+ chown system system /sys/class/timed_output/vibrator/enable
+ chown system system /sys/class/leds/keyboard-backlight/brightness
+ chown system system /sys/class/leds/lcd-backlight/brightness
+ chown system system /sys/class/leds/torch-light/brightness
+ chown system system /sys/class/leds/button-backlight/brightness
+ chown system system /sys/class/leds/jogball-backlight/brightness
+ chown system system /sys/class/leds/red/brightness
+ chown system system /sys/class/leds/green/brightness
+ chown system system /sys/class/leds/blue/brightness
+ chown system system /sys/class/leds/red/device/grpfreq
+ chown system system /sys/class/leds/red/device/grppwm
+ chown system system /sys/class/leds/red/device/blink
+ chown system system /sys/class/timed_output/vibrator/enable
+ chown system system /sys/module/sco/parameters/disable_esco
+ chown system system /sys/kernel/ipv4/tcp_wmem_min
+ chown system system /sys/kernel/ipv4/tcp_wmem_def
+ chown system system /sys/kernel/ipv4/tcp_wmem_max
+ chown system system /sys/kernel/ipv4/tcp_rmem_min
+ chown system system /sys/kernel/ipv4/tcp_rmem_def
+ chown system system /sys/kernel/ipv4/tcp_rmem_max
+ chown root radio /proc/cmdline
+# NFC_SLSI
+ chmod 0660 /dev/sec-nfc
+ chown nfc nfc /dev/sec-nfc
+ mkdir /data/nfc 0700 nfc nfc
+ mkdir /data/nfc/param 0700 nfc nfc
+
+# Permissions for Camera
+ chown root system /sys/class/camera/rear/rear_camantibanding
+ chown system system /sys/class/camera/rear/rear_camfw
+ chown system system /sys/class/camera/rear/rear_checkfw_user
+ chown system system /sys/class/camera/rear/rear_checkfw_factory
+ chown system system /sys/class/camera/rear/rear_camfw_full
+ chown system system /sys/class/camera/rear/rear_camfw_load
+ chown system system /sys/class/camera/rear/rear_camtype
+ chown system radio /sys/class/camera/rear/rear_corever
+ chown system radio /sys/class/camera/rear/rear_companionfw_full
+ chown system radio /sys/class/camera/rear/rear_calcheck
+ chown system radio /sys/class/camera/rear/rear_fwcheck
+ chown system system /sys/class/camera/rear/isp_core
+ chown system radio /sys/class/camera/flash/rear_flash
+ chown system radio /sys/class/camera/flash/front_flash
+ chown system system /sys/class/camera/front/front_camfw
+ chown system system /sys/class/camera/front/front_camtype
+ chown system system /sys/class/camera/front/front_camfw_full
+ chown system system /sys/class/camera/front/front_camfw_load
+
+#OTG Test
+ chown system radio /sys/class/host_notify/usb_otg/booster
+ chmod 0660 /sys/class/host_notify/usb_otg/booster
+ chown system radio /sys/class/usb_notify/usb_control/disable
+ chmod 0660 /sys/class/usb_notify/usb_control/disable
+# Accelerometer_sensor
+ chown system radio /sys/class/sensors/accelerometer_sensor/raw_data
+ chown system radio /sys/class/sensors/accelerometer_sensor/calibration
+ chown system radio /sys/class/sensors/accelerometer_sensor/reactive_alert
+ chown system radio /sys/class/sensors/accelerometer_sensor/vendor
+ chown system radio /sys/class/sensors/accelerometer_sensor/name
+ chown system radio /sys/class/sensors/accelerometer_sensor/selftest
+ chown system radio /sys/class/sensors/accelerometer_sensor/lowpassfilter
+# Proximity_sensor
+ chown system radio /sys/class/sensors/proximity_sensor/state
+ chown system radio /sys/class/sensors/proximity_sensor/raw_data
+ chown system radio /sys/class/sensors/proximity_sensor/prox_avg
+ chown system radio /sys/class/sensors/proximity_sensor/prox_cal
+ chown system radio /sys/class/sensors/proximity_sensor/vendor
+ chown system radio /sys/class/sensors/proximity_sensor/name
+ chown system radio /sys/class/sensors/proximity_sensor/thresh_high
+ chown system radio /sys/class/sensors/proximity_sensor/thresh_low
+ chown system radio /sys/class/sensors/proximity_sensor/prox_offset_pass
+ chown system radio /sys/class/sensors/proximity_sensor/prox_trim
+# Light_sensor
+ chown system radio /sys/class/sensors/light_sensor/lux
+ chown system radio /sys/class/sensors/light_sensor/raw_data
+ chown system radio /sys/class/sensors/light_sensor/vendor
+ chown system radio /sys/class/sensors/light_sensor/name
+# Gyro_sensor
+ chown system radio /sys/class/sensors/gyro_sensor/power_on
+ chown system radio /sys/class/sensors/gyro_sensor/power_off
+ chown system radio /sys/class/sensors/gyro_sensor/temperature
+ chown system radio /sys/class/sensors/gyro_sensor/selftest
+ chown system radio /sys/class/sensors/gyro_sensor/vendor
+ chown system radio /sys/class/sensors/gyro_sensor/name
+# Magnetic_sensor
+ chown system radio /sys/class/sensors/magnetic_sensor/selftest
+ chown system radio /sys/class/sensors/magnetic_sensor/raw_data
+ chown system radio /sys/class/sensors/magnetic_sensor/adc
+ chown system radio /sys/class/sensors/magnetic_sensor/vendor
+ chown system radio /sys/class/sensors/magnetic_sensor/name
+ chown system radio /sys/class/sensors/magnetic_sensor/status
+# MetaEvent
+ chown system radio /sys/class/sensors/sensor_dev/flush
+
+# Permissions for Charging
+ mkdir /efs/Battery 0775 radio system
+ chown system radio /sys/class/power_supply/battery/batt_reset_soc
+ chown system radio /sys/class/power_supply/battery/update
+ chown system radio /sys/class/power_supply/battery/factory_mode
+ chown system radio /sys/class/power_supply/battery/batt_slate_mode
+ chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/call
+ chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/video
+ chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/music
+ chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/browser
+ chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/hotspot
+ chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/camera
+ chown system radio /sys/class/power_supply/battery/talk_wcdma
+ chown system radio /sys/class/power_supply/battery/talk_gsm
+ chown system radio /sys/class/power_supply/battery/call
+ chown system radio /sys/class/power_supply/battery/data_call
+ chown system radio /sys/class/power_supply/battery/gps
+ chown system radio /sys/class/power_supply/battery/wifi
+ chown system radio /sys/class/power_supply/battery/lte
+ chown system radio /sys/class/power_supply/battery/wc_enable
+ chown system radio /sys/class/power_supply/battery/lcd
+ chown system radio /sys/class/power_supply/ps/status
+ chmod 0664 /sys/class/power_supply/ps/status
+ chown system radio /sys/class/power_supply/battery/batt_temp_table
+
+ # Define default initial receive window size in segments.
+ setprop net.tcp.default_init_rwnd 60
+
+ write /sys/block/mmcblk0/queue/scheduler noop
+ copy /system/etc/battery_charging_temp.data /sys/class/power_supply/battery/batt_temp_table
+
+ class_start core
+
+# Permission for fast dormancy for RIL
+ chown system radio /sys/devices/virtual/sec/bamdmux/waketime
+
+# Permission for a RPMB checking thru IMEI
+ chown system radio /sys/kernel/debug/tzdbg/log
+
+# MTP permission
+ chmod 0660 /dev/usb_mtp_gadget
+ chown system mtp /dev/usb_mtp_gadget
+ mkdir /dev/socket/mtp 0770 system mtp
+
+on nonencrypted
+ class_start main
+ class_start late_start
+
+on property:vold.decrypt=trigger_default_encryption
+ start defaultcrypto
+
+on property:vold.decrypt=trigger_encryption
+ start surfaceflinger
+ start encrypt
+
+on property:sys.init_log_level=*
+ loglevel ${sys.init_log_level}
+
+on charger
+ mount ext4 /dev/block/bootdevice/by-name/system /system wait ro
+ copy /system/etc/battery_charging_temp.data /sys/class/power_supply/battery/batt_temp_table
+
+ wait /dev/block/bootdevice/by-name/efs
+ check_fs /dev/block/bootdevice/by-name/efs ext4
+ mount ext4 /dev/block/bootdevice/by-name/efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
+ chown system radio /efs
+ chmod 0771 /efs
+ mkdir /efs/Battery 0775 radio system
+
+ class_start charger
+
+
+on property:vold.decrypt=trigger_reset_main
+ class_reset main
+
+on property:vold.decrypt=trigger_load_persist_props
+ load_persist_props
+
+on property:vold.decrypt=trigger_post_fs_data
+ trigger post-fs-data
+
+on property:vold.decrypt=trigger_restart_min_framework
+ class_start main
+
+on property:vold.decrypt=trigger_restart_framework
+ class_start main
+ class_start late_start
+ start keystore
+
+on property:vold.decrypt=trigger_shutdown_framework
+ class_reset late_start
+ class_reset main
+
+on property:sys.powerctl=*
+ powerctl ${sys.powerctl}
+
+# system server cannot write to /proc/sys files,
+# and chown/chmod does not work for /proc/sys/ entries.
+# So proxy writes through init.
+on property:sys.sysctl.extra_free_kbytes=*
+ write /proc/sys/vm/extra_free_kbytes ${sys.sysctl.extra_free_kbytes}
+
+# "tcp_default_init_rwnd" Is too long!
+on property:sys.sysctl.tcp_def_init_rwnd=*
+ write /proc/sys/net/ipv4/tcp_default_init_rwnd ${sys.sysctl.tcp_def_init_rwnd}
+
+
+## Daemon processes to be run by init.
+##
+
+service ueventd /sbin/ueventd
+ class core
+ critical
+ seclabel u:r:ueventd:s0
+
+service logd /system/bin/logd
+ class core
+ socket logd stream 0666 logd logd
+ socket logdr seqpacket 0666 logd logd
+ socket logdw dgram 0222 logd logd
+ seclabel u:r:logd:s0
+
+service healthd /sbin/healthd
+ class core
+ critical
+ seclabel u:r:healthd:s0
+
+service lpm /system/bin/lpm
+ class charger
+ critical
+#start SEC_PRODUCT_FEATURE_COMMON_SUPPORT_SE_FOR_ANDROID
+# Reload SE Android Policy for MDM
+on property:persist.security.mdm.policy=1
+ setprop selinux.reload_policy 1
+#end SEC_PRODUCT_FEATURE_COMMON_SUPPORT_SE_FOR_ANDROID
+
+service console /system/bin/sh
+ class core
+ console
+ disabled
+ user shell
+ group shell log
+ seclabel u:r:shell:s0
+
+## WTL_EDM_START
+## EDM AuditLog
+service edmaudit /system/bin/edmaudit
+ class main
+ user root
+
+## WTL_EDM_END
+service auditd /system/bin/auditd -k
+ seclabel u:r:logd:s0
+ class main
+# SEC_LINUX DRS Service
+service drsd /system/bin/drsd
+ class main
+ socket drsd stream 600 system system
+
+
+service prepare_param /system/bin/prepare_param.sh /dev/block/platform/7824900.sdhci/by-name/param
+ class core
+ user root
+ group root
+ seclabel u:r:prepare_param:s0
+ oneshot
+
+# icd
+service icd /system/bin/icd
+ class main
+ user system
+ group system log
+ onrestart check_icd
+ oneshot
+
+on property:ro.debuggable=1
+ start console
+
+# SEC_SELINUX
+on property:selinux.reload_policy=1
+ chown system system /sys/fs/selinux/enforce
+ chown -R system system /sys/fs/selinux/booleans
+ chown system system /sys/fs/selinux/commit_pending_bools
+
+# SEC_SELINUX to support spota
+on property:selinux.sec.restorecon=1
+ restorecon_recursive /data/security/spota
+
+# SEC_SELINUX
+on property:init.svc.bootanim=stopped
+ start auditd
+
+# adbd is controlled via property triggers in init.<platform>.usb.rc
+service adbd /sbin/adbd --root_seclabel=u:r:su:s0
+ class core
+ socket adbd stream 660 system system
+ disabled
+ seclabel u:r:adbd:s0
+
+# adbd on at boot in emulator
+on property:ro.kernel.qemu=1
+ start adbd
+
+service lmkd /system/bin/lmkd
+ class core
+ critical
+ socket lmkd seqpacket 0660 system system
+
+service scs /system/bin/scs
+ class main
+ user system
+ group system
+ oneshot
+
+service servicemanager /system/bin/servicemanager
+ class core
+ user system
+ group system
+ critical
+ onrestart restart healthd
+ onrestart restart zygote
+ onrestart restart media
+ onrestart restart surfaceflinger
+ onrestart restart drm
+ onrestart restart sensorhubservice
+ onrestart restart keystore
+
+service vold /system/bin/vold
+ class core
+ socket vold stream 0660 root mount
+## Samsung ODE >>>
+ socket dir_enc_report stream 0660 root mount
+## Samsung ODE <<<
+ ioprio be 2
+
+## Frigatebird
+ socket frigate stream 0660 system system
+
+service epmd /system/bin/epmd
+ class main
+ socket epm stream 0660 system system
+ socket ppm stream 0660 system system
+ ioprio be 2
+
+service netd /system/bin/netd
+ class main
+ socket netd stream 0660 root system
+ socket dnsproxyd stream 0660 root inet
+ socket mdns stream 0660 root system
+ socket fwmarkd stream 0660 root inet
+
+service debuggerd /system/bin/debuggerd
+ class main
+
+service ril-daemon /system/bin/rild
+ class main
+ socket rild stream 660 root radio
+ socket rild-debug stream 660 radio system
+ user root
+ group radio cache inet misc audio sdcard_rw qcom_diag log
+
+service surfaceflinger /system/bin/surfaceflinger
+ class core
+ user system
+ group graphics drmrpc
+ onrestart restart zygote
+
+service DR-daemon /system/bin/ddexe
+ class main
+ user root
+ group system radio inet net_raw
+
+service SMD-daemon /system/bin/smdexe
+ class main
+ user root
+ group system radio inet net_raw
+
+service BCS-daemon /system/bin/connfwexe
+ class main
+ user root
+ group system radio inet net_raw
+
+service drm /system/bin/drmserver
+ class main
+ user drm
+# [ SEC_MM_DRM
+# fix
+ group drm system inet drmrpc radio
+# org
+# group drm system inet drmrpc
+# ]
+
+service media /system/bin/mediaserver
+ class main
+ user media
+ group system audio camera inet net_bt net_bt_admin net_raw net_bw_acct drmrpc mediadrm qcom_diag radio media_rw
+ ioprio rt 4
+
+# One shot invocation to deal with encrypted volume.
+service defaultcrypto /system/bin/vdc --wait cryptfs mountdefaultencrypted
+ disabled
+ oneshot
+ # vold will set vold.decrypt to trigger_restart_framework (default
+ # encryption) or trigger_restart_min_framework (other encryption)
+
+# One shot invocation to encrypt unencrypted volumes
+service encrypt /system/bin/vdc --wait cryptfs enablecrypto inplace default
+ disabled
+ oneshot
+ # vold will set vold.decrypt to trigger_restart_framework (default
+ # encryption)
+
+service bootanim /system/bin/bootanimation
+ class core
+ user graphics
+ group graphics audio
+ disabled
+ oneshot
+
+service installd /system/bin/installd
+ class main
+ socket installd stream 600 system system
+
+service flash_recovery /system/bin/install-recovery.sh
+ class main
+ seclabel u:r:install_recovery:s0
+ oneshot
+ disabled
+
+# update recovery if enabled
+on property:persist.sys.recovery_update=true
+ start flash_recovery
+
+service racoon /system/bin/racoon
+ class main
+ socket racoon stream 600 system system
+ # IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
+ group vpn net_admin inet
+ disabled
+ oneshot
+
+service mtpd /system/bin/mtpd
+ class main
+ socket mtpd stream 600 system system
+ user vpn
+ group vpn net_admin inet net_raw
+ disabled
+ oneshot
+
+service keystore /system/bin/keystore /data/misc/keystore
+ class main
+ user keystore
+ group keystore drmrpc system
+ disabled
+
+service dumpstate /system/bin/dumpstate -s
+ class main
+ socket dumpstate stream 0660 shell log
+ disabled
+ oneshot
+
+service mdnsd /system/bin/mdnsd
+ class main
+ user mdnsr
+ group inet net_raw
+ socket mdnsd stream 0660 mdnsr inet
+ disabled
+ oneshot
+
+service pre-recovery /system/bin/uncrypt
+ class main
+ disabled
+ oneshot
+
+# otp
+service otp /system/bin/otp_server
+ user system
+ group system
+ disabled
+
+on property:persist.security.tlc.otp=1
+ start otp
+ setprop persist.security.tlc.otp 0
+
+# ccm
+ service ccm /system/bin/tlc_server
+ user system
+ group system
+ disabled
+
+on property:persist.security.tlc.ccm=1
+ start ccm
+ setprop persist.security.tlc.ccm 0
+
+# tui
+ service tui /system/bin/tlc_server TUI
+ user system
+ group system
+ disabled
+
+on property:persist.security.tlc.tui=1
+ start tui
+ setprop persist.security.tlc.tui 0
+
+# CS DAEMON
+service cs_service /system/bin/cs
+ class main
+ user system
+ group system
+ disabled
+
+# insthk
+service insthk /system/bin/insthk
+ class main
+ user root
+ disabled
+ oneshot
+
+on property:sys.qseecomd.enable=true
+ start cs_service
+ start keystore
+ start insthk
+
+service mcStarter /system/bin/tbaseLoader tbase
+ class core
+ user root
+ group root
+ disabled
+ oneshot
+
+service run-mobicore /system/bin/mcDriverDaemon
+ class core
+ user system
+ group system
+ disabled
+
+on property:sys.qseecomd.enable=true
+ start mcStarter
+
+on property:sys.mobicore.loaded=true
+ start run-mobicore
+
+on property:sys.boot_completed=1
+ write /sys/block/mmcblk0/queue/scheduler cfq
+
+# icd
+on property:init.svc.media=restarting
+ check_icd
+ start icd
+
+# Activate Background Compaction
+on property:sys.sysctl.compact_memory=1
+ write /proc/sys/vm/compact_memory 1
+ setprop sys.sysctl.compact_memory=0
diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc
new file mode 100644
index 0000000..68bb568
--- /dev/null
+++ b/rootdir/etc/init.target.rc
@@ -0,0 +1,177 @@
+# Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+
+on early-init
+ mkdir /firmware 0771 system system
+ mkdir /firmware-modem 0771 system system
+ mkdir /system 0777 root root
+ symlink /data/tombstones /tombstones
+
+# import cne init file
+#on post-fs
+# export LD_PRELOAD /vendor/lib/libNimsWrap.so
+
+on fs
+ mount_all fstab.qcom
+
+ # Keeping following partitions outside fstab file. As user may not have
+ # these partition flashed on the device. Failure to mount any partition in fstab file
+ # results in failure to launch late-start class.
+
+ wait /dev/block/bootdevice/by-name/cache
+ check_fs /dev/block/bootdevice/by-name/cache ext4
+ mount ext4 /dev/block/bootdevice/by-name/cache /cache nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
+
+ wait /dev/block/bootdevice/by-name/persist
+ check_fs /dev/block/bootdevice/by-name/persist ext4
+ mount ext4 /dev/block/bootdevice/by-name/persist /persist nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
+
+ wait /dev/block/bootdevice/by-name/efs
+ check_fs /dev/block/bootdevice/by-name/efs ext4
+ mount ext4 /dev/block/bootdevice/by-name/efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
+ chown system radio /efs
+ chmod 0771 /efs
+ rm -rf /efs/dmverity
+ restorecon -R /efs
+
+on post-fs-data
+ mkdir /data/tombstones 0771 system system
+ mkdir /tombstones/modem 0771 system system
+ mkdir /tombstones/lpass 0771 system system
+ mkdir /tombstones/wcnss 0771 system system
+ mkdir /tombstones/dsps 0771 system system
+ mkdir /persist/data/sfs 0700 system system
+ mkdir /persist/data/tz 0700 system system
+
+#start camera server as daemon
+service qcamerasvr /system/bin/mm-qcamera-daemon
+ class main
+ user camera
+ group camera system inet input graphics
+
+#enable zram
+on property:ro.config.zram=true
+ swapon_all fstab.qcom
+ write /proc/sys/vm/swappiness 100
+
+# 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 qseecomd /system/bin/qseecomd
+ class core
+ user root
+ group root
+
+service perfd /system/bin/perfd
+ class main
+ user root
+ disabled
+
+service thermal-engine /system/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 boot
+ start rmt_storage
+ insmod /system/lib/modules/adsprpc.ko
+# access permission for secure touch
+ chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable
+ chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch
+ chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable
+ chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch
+ chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable
+ chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch
+ chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable
+ chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch
+
+service wcnss-service /system/bin/wcnss_service
+ class main
+ user system
+ group system wifi radio
+ oneshot
+
+on charger
+ wait /dev/block/bootdevice/by-name/system
+ mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1
+ chown root system /sys/class/power_supply/bms/current_now
+ chown root system /sys/class/power_supply/bms/voltage_ocv
+ chmod 0664 /sys/class/power_supply/bms/current_now
+ chmod 0664 /sys/class/power_supply/bms/voltage_ocv
+ start vm_bms
+ load_all_props
+ start qcom-post-boot
+
+service imsqmidaemon /system/bin/imsqmidaemon
+ class main
+ user system
+ socket ims_qmid stream 0660 system radio
+ group radio net_raw log qcom_diag
+
+service imsdatadaemon /system/bin/imsdatadaemon
+ class main
+ user system
+ socket ims_datad stream 0660 system radio
+ group system wifi radio inet net_raw log qcom_diag net_admin
+ disabled
+
+on property:sys.ims.QMI_DAEMON_STATUS=1
+ start imsdatadaemon
+
+service qmi_sfs_server /system/bin/qmi_sfs_server
+ class core
+ user system
+ group system net_raw
+
+service ims_rtp_daemon /system/bin/ims_rtp_daemon
+ class main
+ user system
+ socket ims_rtpd stream 0660 system radio
+ group radio net_raw diag qcom_diag log
+ disabled
+
+on property:sys.ims.DATA_DAEMON_STATUS=1
+ start ims_rtp_daemon
diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc
new file mode 100644
index 0000000..68a2299
--- /dev/null
+++ b/rootdir/etc/ueventd.qcom.rc
@@ -0,0 +1,232 @@
+# Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# the DIAG device node is not world writable/readable.
+/dev/diag 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 0600 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 net_admin net_admin
+/dev/wwan_ioctl 0660 net_admin net_admin
+/dev/ipaNatTable 0660 net_admin net_admin
+
+#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/video* 0660 system camera
+/dev/media* 0660 system camera
+/dev/v4l-subdev* 0660 system camera
+/dev/qseecom 0660 system drmrpc
+/dev/pft 0660 system drmrpc
+/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/msm_camera/* 0660 system camera
+/dev/gemini/ 0660 system camera
+/dev/mercury0 0660 system camera
+/dev/msm_vidc_reg 0660 system audio
+/dev/msm_vidc_dec 0660 system audio
+/dev/msm_vidc_dec_sec 0660 system audio
+/dev/msm_vidc_enc 0660 system audio
+/dev/msm_rotator 0660 system system
+/dev/hw_random 0600 root root
+/dev/adsprpc-smd 0664 system system
+
+#permissions for 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_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_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/radio0 0640 fm_radio fm_radio
+/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
+
+# DVB devices
+/dev/dvb/adapter0/demux* 0440 media media
+/dev/dvb/adapter0/dvr* 0660 media media
+/dev/dvb/adapter0/video* 0660 media media
+
+# Broadcast devices
+/dev/tsc_mux0 0660 media media
+/dev/tsc_ci0 0660 media media
+
+# sensors
+/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
+/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
+/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* poll_delay 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_wakeup 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* max_latency 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* flush 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* calibrate 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* poll_delay 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable_wakeup 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* max_latency 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* flush 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* calibrate 0660 input system
+/sys/devices/virtual/optical_sensors/proximity ps_adc 0660 input system
+/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system
+/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system
+/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system
+/sys/devices/virtual/input/input* poll 0660 input system
+/sys/devices/virtual/input/input* pollrate_ms 0660 input system
+
+# 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
+#nfc permissions
+/dev/nfc-nci 0660 nfc nfc
+/dev/assd 0660 nfc nfc
+
+# UIO devices
+/dev/uio0 0660 system system
+/dev/uio1 0660 system system
+/dev/uio2 0660 system system
+
+# SSR devices
+/dev/subsys_* 0640 system system
+
+# Ultrasound device
+/dev/usf1 0660 system system
+
+# Ramdump devices
+/dev/ramdump* 0640 system system
+
+#cpufreq_governor
+/sys/devices/system/cpu/cpu* cpufreq/interactive/above_hispeed_delay 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/go_hispeed_load 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/timer_rate 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/hispeed_freq 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/io_is_busy 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/target_loads 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/min_sample_time 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/sampling_down_factor 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/lpm_disable_freq 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/use_migration_notif 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/use_sched_load 0660 system system