aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSultan Qasim Khan <sultanqasim@gmail.com>2015-12-05 22:39:15 -0500
committerSultan Qasim Khan <sultanqasim@gmail.com>2015-12-06 00:08:39 -0500
commit8e2439dac56c1137345acf9190c8648e1ae967e9 (patch)
tree00fc1d94890a5fd883351968ba53d101f2fff700
parent5136e387384f947875e4fd7801e2dac591b18af9 (diff)
otus: commonize ramdisk
Change-Id: Iad884d627e7bd140d0ee701e65428125846235b2
-rw-r--r--ramdisk/init.device.rc5
-rwxr-xr-xramdisk/init.mmi.boot.sh73
-rwxr-xr-xramdisk/init.mmi.touch.sh266
-rwxr-xr-xramdisk/init.mmi.usb.rc232
-rwxr-xr-xramdisk/init.qcom.rc728
-rwxr-xr-xramdisk/init.qcom.ril.sh8
-rwxr-xr-xramdisk/init.qcom.ssr.sh151
-rwxr-xr-xramdisk/init.qcom.usb.rc219
-rw-r--r--ramdisk/ueventd.qcom.rc275
9 files changed, 5 insertions, 1952 deletions
diff --git a/ramdisk/init.device.rc b/ramdisk/init.device.rc
new file mode 100644
index 0000000..063a191
--- /dev/null
+++ b/ramdisk/init.device.rc
@@ -0,0 +1,5 @@
+service stml0xx /system/bin/stml0xx_wrapper.sh
+ class late_start
+ user compass
+ group compass misc input
+ oneshot
diff --git a/ramdisk/init.mmi.boot.sh b/ramdisk/init.mmi.boot.sh
deleted file mode 100755
index 8d0a002..0000000
--- a/ramdisk/init.mmi.boot.sh
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/system/bin/sh
-
-function advance_system_time()
-{
- min_utc=$1
- current_utc=`date +%s`
-
- # Is current date less then minumun acceptable date
- if [ $current_utc -lt $min_utc ]
- then
- day_s=$(( 24 * 60 * 60 ))
- # Average duration of month in seconds
- month_s=$(( $day_s * 30 + $day_s * 4375 / 10000 ))
- year_s=$(( $month_s * 12 ))
-
- # Convert UTC time to format accepted by date
- year=$(( $min_utc / $year_s + 1970 ))
- yr=$(( $min_utc % $year_s ))
- month=$(( $yr / $month_s + 1))
- mr=$(( $yr % $month_s ))
- if [ $month -le 9 ]
- then
- month="0$month"
- fi
- day=$(( $mr / $day_s + 1))
- if [ $day -le 9 ]
- then
- day="0$day"
- fi
-
- echo "set system time to $year$month$day.0"
- date -s "$year$month$day.0"
- fi
-}
-
-# Advance system time to SW build date as early as possible
-# in the script to avoid race condition with time daemon
-build_date_utc=`getprop ro.build.date.utc`
-if [ ! -z $build_date_utc ]; then
- advance_system_time $build_date_utc
-fi
-
-# We take this from cpuinfo because hex "letters" are lowercase there
-set -A cinfo `cat /proc/cpuinfo | /system/bin/grep Revision`
-hw=${cinfo[2]#?}
-
-# Now "cook" the value so it can be matched against devtree names
-m2=${hw%?}
-minor2=${hw#$m2}
-m1=${m2%?}
-minor1=${m2#$m1}
-if [ "$minor2" == "0" ]; then
- minor2=""
- if [ "$minor1" == "0" ]; then
- minor1=""
- fi
-fi
-setprop ro.hw.revision p${hw%??}$minor1$minor2
-unset hw cinfo m1 m2 minor1 minor2
-
-# Let kernel know our image version/variant/crm_version
-image_version="10:"
-image_version+=`getprop ro.build.id`
-image_version+=":"
-image_version+=`getprop ro.build.version.incremental`
-image_variant=`getprop ro.product.name`
-image_variant+="-"
-image_variant+=`getprop ro.build.type`
-oem_version=`getprop ro.build.version.codename`
-echo 10 > /sys/devices/soc0/select_image
-echo $image_version > /sys/devices/soc0/image_version
-echo $image_variant > /sys/devices/soc0/image_variant
-echo $oem_version > /sys/devices/soc0/image_crm_version
diff --git a/ramdisk/init.mmi.touch.sh b/ramdisk/init.mmi.touch.sh
deleted file mode 100755
index c6a9f8c..0000000
--- a/ramdisk/init.mmi.touch.sh
+++ /dev/null
@@ -1,266 +0,0 @@
-#!/system/bin/sh
-
-PATH=/sbin:/system/sbin:/system/bin:/system/xbin
-export PATH
-
-while getopts d op;
-do
- case $op in
- d) dbg_on=1;;
- esac
-done
-shift $(($OPTIND-1))
-
-scriptname=${0##*/}
-
-debug()
-{
- [ $dbg_on ] && echo "Debug: $*"
-}
-
-notice()
-{
- echo "$*"
- echo "$scriptname: $*" > /dev/kmsg
-}
-
-error_and_leave()
-{
- local err_msg
- local err_code=$1
- case $err_code in
- 1) err_msg="Error: No response from touch IC";;
- 2) err_msg="Error: Cannot read property $2";;
- 3) err_msg="Error: No matching firmware file found";;
- 4) err_msg="Error: Touch IC is in bootloader mode";;
- 5) err_msg="Error: Touch provides no reflash interface";;
- 6) err_msg="Error: Touch driver is not running";;
- esac
- notice "$err_msg"
- exit $err_code
-}
-
-for touch_vendor in $*; do
- debug "searching driver for vendor [$touch_vendor]"
- touch_driver_link=$(ls -l /sys/bus/i2c/drivers/$touch_vendor*/*-*)
- if [ -z "$touch_driver_link" ]; then
- debug "no driver for vendor [$touch_vendor] is running"
- shift 1
- else
- debug "driver for vendor [$touch_vendor] found!!!"
- break
- fi
-done
-
-[ -z "$touch_driver_link" ] && error_and_leave 6
-
-touch_path=/sys/devices/${touch_driver_link#*devices/}
-panel_path=/sys/devices/virtual/graphics/fb0
-debug "sysfs touch path: $touch_path"
-
-[ -f $touch_path/doreflash ] || error_and_leave 5
-[ -f $touch_path/poweron ] || error_and_leave 5
-
-debug "wait until driver reports <ready to flash>..."
-while true; do
- readiness=$(cat $touch_path/poweron)
- if [ "$readiness" == "1" ]; then
- debug "ready to flash!!!"
- break;
- fi
- sleep 1
- debug "not ready; keep waiting..."
-done
-unset readiness
-
-device_property=ro.hw.device
-hwrev_property=ro.hw.revision
-firmware_path=/system/etc/firmware
-
-let dec_cfg_id_boot=0; dec_cfg_id_latest=0;
-
-read_touch_property()
-{
- property=""
- debug "retrieving touch property: [$touch_path/$1]"
- property=$(cat $touch_path/$1 2> /dev/null)
- debug "touch property [$1] is: [$property]"
- [ -z "$property" ] && return 1
- return 0
-}
-
-read_panel_property()
-{
- property=""
- debug "retrieving panel property: [$panel_path/$1]"
- property=$(cat $panel_path/$1 2> /dev/null)
- debug "panel property [$1] is: [$property]"
- [ -z "$property" ] && return 1
- return 0
-}
-
-find_latest_config_id()
-{
- local fw_mask=$1
- local skip_fields=$2
- local dec max z str_hex i
-
- str_cfg_id_latest=""
-
- debug "scanning dir for files matching [$fw_mask]"
- let dec=0; max=0;
- for file in $(ls $fw_mask 2>/dev/null);
- do
- z=$file
- i=0
- while [ ! $i -eq $skip_fields ];
- do
- z=${z#*-}
- i=$((i+1))
- done
-
- str_hex=${z%%-*};
-
- let dec=0x$str_hex
- if [ $dec -gt $max ];
- then
- let max=$dec; dec_cfg_id_latest=$dec;
- str_cfg_id_latest=$str_hex
- fi
- done
-
- [ -z "$str_cfg_id_latest" ] && return 1
- return 0
-}
-
-read_touch_property flashprog || error_and_leave 1
-bl_mode=$property
-debug "bl mode: $bl_mode"
-
-read_touch_property productinfo || error_and_leave 1
-touch_product_id=$property
-if [ -z "$touch_product_id" ] || [ "$touch_product_id" == "0" ];
-then
- debug "touch ic reports invalid product id"
- error_and_leave 3
-fi
-debug "touch product id: $touch_product_id"
-
-touch_product_id=${touch_product_id%[a-z]}
-debug "touch product id without vendor suffix: $touch_product_id"
-
-read_touch_property buildid || error_and_leave 1
-str_cfg_id_boot=${property#*-}
-let dec_cfg_id_boot=0x$str_cfg_id_boot
-debug "touch config id: $str_cfg_id_boot"
-
-product_id=$(getprop $device_property 2> /dev/null)
-[ -z "$product_id" ] && error_and_leave 2 $device_property
-product_id=${product_id%-*}
-debug "product id: $product_id"
-
-hwrev_id=$(getprop $hwrev_property 2> /dev/null)
-[ -z "$hwrev_id" ] && error_and_leave 2 $hwrev_property
-debug "hw revision: $hwrev_id"
-
-read_panel_property "panel_supplier"
-supplier=$property
-if [ -z "$supplier" ];
-then
- debug "driver does not report panel supplier"
-fi
-debug "panel supplier: $supplier"
-
-cd $firmware_path
-
-find_best_match()
-{
- local hw_mask=$1
- local panel_supplier=$2
- local skip_fields fw_mask
-
- while [ ! -z "$hw_mask" ]; do
- if [ "$hw_mask" == "-" ]; then
- hw_mask=""
- fi
-
- if [ ! -z $panel_supplier ];
- then
- skip_fields=3
- fw_mask="$touch_vendor-$panel_supplier-$touch_product_id-*-$product_id$hw_mask.*"
- else
- skip_fields=2
- fw_mask="$touch_vendor-$touch_product_id-*-$product_id$hw_mask.*"
- fi
-
- find_latest_config_id "$fw_mask" "$skip_fields" && break
-
- hw_mask=${hw_mask%?}
- done
-
- [ -z "$str_cfg_id_latest" ] && return 1
-
- if [ -z $panel_supplier ]; then
- firmware_file=$(ls $touch_vendor-$touch_product_id-$str_cfg_id_latest-*-$product_id$hw_mask.*)
- else
- firmware_file=$(ls $touch_vendor-$panel_supplier-$touch_product_id-$str_cfg_id_latest-*-$product_id$hw_mask.*)
- fi
- notice "Firmware file for upgrade $firmware_file"
-
- return 0
-}
-
-hw_mask="-$hwrev_id"
-debug "hw_mask=$hw_mask"
-
-match_not_found=1
-if [ ! -z "$supplier" ];
-then
- debug "search for best hw revision match with supplier"
- find_best_match "-$hwrev_id" "$supplier"
- match_not_found=$?
-fi
-
-if [ "$match_not_found" -ne "0" ];
-then
- debug "search for best hw revision match without supplier"
- find_best_match "-$hwrev_id" || error_and_leave 3
-fi
-
-if [ $dec_cfg_id_boot -ne $dec_cfg_id_latest ] || [ "$bl_mode" == "1" ];
-then
- debug "forcing firmware upgrade"
- echo 1 > $touch_path/forcereflash
- debug "sending reflash command"
- echo $firmware_file > $touch_path/doreflash
- read_touch_property flashprog || error_and_leave 1
- bl_mode=$property
-
- [ "$bl_mode" == "1" ] && error_and_leave 4
-
- read_touch_property buildid || error_and_leave 1
- str_cfg_id_new=${property#*-}
- debug "firmware config ids: expected $str_cfg_id_latest, current $str_cfg_id_new"
-
- notice "Touch firmware config id at boot time $str_cfg_id_boot"
- notice "Touch firmware config id in the file $str_cfg_id_latest"
- notice "Touch firmware config id currently programmed $str_cfg_id_new"
-
- if [ "$(getprop ro.build.motfactory)" == "1" ];
- then
- echo "Factory build detected! Resetting device after touch firmware upgrade..."
- sleep 1
- reboot
- fi
-else
- notice "Touch firmware is up to date"
-fi
-
-unset device_property hwrev_property supplier
-unset str_cfg_id_boot str_cfg_id_latest str_cfg_id_new
-unset dec_cfg_id_boot dec_cfg_id_latest match_not_found
-unset hwrev_id product_id touch_product_id scriptname
-unset synaptics_link firmware_path touch_path
-unset bl_mode dbg_on hw_mask firmware_file property
-
-return 0
diff --git a/ramdisk/init.mmi.usb.rc b/ramdisk/init.mmi.usb.rc
deleted file mode 100755
index 5d7d442..0000000
--- a/ramdisk/init.mmi.usb.rc
+++ /dev/null
@@ -1,232 +0,0 @@
-# Copyright (c) 2011, Code Aurora Forum. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of Code Aurora nor
-# the names of its contributors may be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-on init
- write /sys/class/android_usb/android0/f_rndis/wceis 1
-
- # Mount Points for External Storage Devices
- mkdir /storage/usbdisk_1.1.1 0755 system system
- mkdir /storage/usbdisk_1.0 0755 system system
- mkdir /storage/usbdisk_1.1 0755 system system
- mkdir /storage/usbdisk_1.2 0755 system system
- mkdir /storage/usbdisk_1.3 0755 system system
- mkdir /storage/usbdisk_1.4 0755 system system
- mkdir /storage/usbdisk_1.5 0755 system system
- mkdir /storage/usbdisk_1.6 0755 system system
- mkdir /storage/usbdisk_1.7 0755 system system
-
-on boot
- write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
- write /sys/class/android_usb/android0/iProduct ${ro.product.model}
- write /sys/class/android_usb/android0/f_mass_storage/vendor ${ro.product.manufacturer}
- write /sys/class/android_usb/android0/f_mass_storage/product ${ro.product.model}
- mkdir /dev/bus 0755 root root
- mkdir /dev/bus/usb 0755 root root
- chown system system /sys/class/android_usb/android0/secure
- chmod 0660 /sys/class/android_usb/android0/secure
-
-service mmi-usb-sh /system/bin/sh /init.mmi.usb.sh
- class core
- user root
- oneshot
-
-# USB compositions
-on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 05C6
- write /sys/class/android_usb/android0/idProduct 9025
- write /sys/class/android_usb/android0/f_diag/clients diag
- write /sys/class/android_usb/android0/f_serial/transports smd,tty
- write /sys/class/android_usb/android0/f_rmnet/transports 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,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=rndis
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct 0x2e24
- 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 0x22b8
- write /sys/class/android_usb/android0/idProduct 0x2e25
- write /sys/class/android_usb/android0/functions rndis,adb
- write /sys/class/android_usb/android0/enable 1
- start adbd
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=mtp
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/bDeviceClass 0
- write /sys/class/android_usb/android0/bDeviceSubClass 0
- write /sys/class/android_usb/android0/bDeviceProtocol 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct ${ro.usb.mtp}
- write /sys/class/android_usb/android0/functions mtp
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=mtp,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/bDeviceClass 0
- write /sys/class/android_usb/android0/bDeviceSubClass 0
- write /sys/class/android_usb/android0/bDeviceProtocol 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct ${ro.usb.mtp_adb}
- write /sys/class/android_usb/android0/functions mtp,adb
- write /sys/class/android_usb/android0/enable 1
- start adbd
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet,usbnet,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt_adb}
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- 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,usbnet,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,serial_tty,rmnet,usbnet
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct ${ro.usb.bpt}
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- 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,usbnet
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=rndis,diag,serial_smd,serial_tty,rmnet,usbnet,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct ${ro.usb.bpteth_adb}
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- 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 rndis,diag,serial,rmnet,usbnet,adb
- write /sys/class/android_usb/android0/enable 1
- start adbd
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=rndis,diag,serial_smd,serial_tty,rmnet,usbnet
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct ${ro.usb.bpteth}
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- 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 rndis,diag,serial,rmnet,usbnet
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=usbnet,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e2d
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode internal
- write /sys/class/android_usb/android0/functions usbnet,adb
- write /sys/class/android_usb/android0/enable 1
- start adbd
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=usbnet
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e2c
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode internal
- write /sys/class/android_usb/android0/functions usbnet
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=diag,usbnet
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e34
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- write /sys/class/android_usb/android0/f_diag/clients diag
- write /sys/class/android_usb/android0/functions diag,usbnet
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=diag,usbnet,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e35
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- write /sys/class/android_usb/android0/f_diag/clients diag
- write /sys/class/android_usb/android0/functions diag,usbnet,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/bDeviceClass 0
- write /sys/class/android_usb/android0/bDeviceSubClass 0
- write /sys/class/android_usb/android0/bDeviceProtocol 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct ${ro.usb.ptp}
- write /sys/class/android_usb/android0/functions ptp
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=ptp,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/bDeviceClass 0
- write /sys/class/android_usb/android0/bDeviceSubClass 0
- write /sys/class/android_usb/android0/bDeviceProtocol 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct ${ro.usb.ptp_adb}
- write /sys/class/android_usb/android0/functions ptp,adb
- write /sys/class/android_usb/android0/enable 1
- start adbd
- setprop sys.usb.state ${sys.usb.config}
diff --git a/ramdisk/init.qcom.rc b/ramdisk/init.qcom.rc
deleted file mode 100755
index 0b5cebb..0000000
--- a/ramdisk/init.qcom.rc
+++ /dev/null
@@ -1,728 +0,0 @@
-# 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.
-#
-
-import init.qcom.usb.rc
-
-on early-init
- # Create firmware mount point
- mkdir /firmware 0771 system system
-
- # Create modem FSG mount point
- mkdir /fsg 755 root root
-
- chown system system /sys/kernel/debug
- chmod 0775 /sys/kernel/debug
-
- symlink /data/tombstones /tombstones
-
-on init
- # Set permissions for persist partition
- mkdir /persist 0771 system system
-
- # Support legacy paths
- symlink /sdcard /mnt/sdcard
- symlink /sdcard /storage/sdcard0
-
- # Configure coredump
- write /proc/sys/kernel/core_pattern "|/system/bin/coredump %e %p %t"
- write /proc/self/coredump_filter "0x7f"
-
- # Setup kernel dropbox permissions so that dropboxd can utilize it
- chown root qcom_diag /sys/kernel/dropbox/event
- chown root qcom_diag /sys/kernel/dropbox/data
-
- # Symbols required for motorola blobs
- export LD_SHIM_LIBS "/system/lib/liblog.so|libmoto.so /system/lib/libcrypto.so|libboringssl-compat.so /system/vendor/lib/libqc-opt.so|libshim_qcopt.so"
-
-on fs
- mount_all fstab.qcom
- swapon_all fstab.qcom
-
- # Set permissions for BL logs
- chmod 0640 /dev/block/bootdevice/by-name/logs
- chown root system /dev/block/bootdevice/by-name/logs
-
-on post-fs-data
- mkdir /data/tombstones 0771 system system
- mkdir /tombstones/modem 0771 system system
-
- # 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
-
- # 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
- restorecon_recursive /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
-
- # Wifi
- restorecon /data/hostapd
- restorecon /data/misc/wifi/hostapd/wlan0
-
- #Create directories for QuIPS
- mkdir /data/misc/quipc 0770 system gps
-
- #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
-
- #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
- # Enable the setgid bit on the directory
- chmod 2770 /data/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
-
- # Setup folders for diag_mdlog
- mkdir /data/diag_mdlog 0750 system log
- mkdir /data/diag_mdlog/logs 0750 log log
-
- # Setup folder for native to transfer data to NativeDropBoxAgent
- mkdir /data/system/dropbox-add 0730 system qcom_diag
-
- #Subsystem RAM-dumps
- mkdir /data/ss-ram-dumps 0750 radio log
- mkdir /data/ss-ram-dumps/bp-dumps 0750 radio log
-
- # Create directory for cutback
- mkdir /data/misc/cutback 0770 radio wifi
-
- # To remove apanic proc entry
- write /proc/apanic_console 1
-
- # Create directory used by power_supply_logger
- mkdir /data/power_supply_logger 0750 mot_pwric log
-
- # create the necessary data dirs for tpapi with proper permission
- mkdir /dev/tpapi 02770 mot_tpapi mot_tpapi
- mkdir /data/tpapi 02770 mot_tpapi mot_tpapi
- mkdir /data/tpapi/etc 02770 mot_tpapi mot_tpapi
- mkdir /data/tpapi/etc/tpa 02770 mot_tpapi mot_tpapi
- mkdir /data/tpapi/etc/tpa/persistent 02770 mot_tpapi mot_tpapi
-
- # Permissions for battery health daemon
- chown mot_pwric mot_pwric /sys/module/qpnp_bms/parameters/last_ocv_uv
- chown mot_pwric mot_pwric /sys/module/qpnp_charger/parameters/bms_chrg_capacity
- chown mot_pwric mot_pwric /sys/module/qpnp_charger/parameters/bms_chrg_capacity_temp
- chown mot_pwric mot_pwric /sys/module/qpnp_charger/parameters/chrg_timestamp
-
- start batt_health
-
-on early-boot
- # Fix stupid 'add_tid_to_cgroup failed to write' errors
- # This should really be done in init.rc on init
- chmod 0660 /dev/cpuctl
-
- # 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/kernel/boot_adsp/boot 1
-
-on boot
- # mount debugfs for systrace
- mount debugfs /sys/kernel/debug /sys/kernel/debug
-
- 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 bluetooth /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
-
- #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
-
- # Prevents permission denied error for telephony
- chmod 0644 /proc/cmdline
-
- setprop wifi.interface wlan0
-
-# 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,110208,4096,16384,110208
- 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.
- write /proc/sys/net/core/rmem_max 2097152
- write /proc/sys/net/core/wmem_max 2097152
-
- # Optimize TCP parameters for QCOM-8x10 products without LTE support
- # This init file will override the values defined in init.rc file.
- # Carrier specific init.<carrier>.rc file will override this file.
- # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
- setprop net.tcp.buffersize.default 131072,262144,1048576,4096,16384,262144
- setprop net.tcp.buffersize.wifi 131072,262144,3145728,4096,221184,3145728
- setprop net.tcp.buffersize.umts 131072,262144,1452032,4096,16384,399360
- setprop net.tcp.buffersize.edge 16384,32768,131072,4096,16384,65536
- setprop net.tcp.buffersize.gprs 4096,8192,24576,4096,8192,24576
- setprop net.tcp.buffersize.hspa 131072,262144,2441216,4096,16384,399360
- setprop net.tcp.buffersize.hsdpa 131072,262144,2441216,4096,16384,399360
- setprop net.tcp.buffersize.hsupa 131072,262144,2441216,4096,16384,399360
- setprop net.tcp.buffersize.hspap 131072,262144,2441216,4096,16384,399360
- setprop net.tcp.buffersize.cdma 4096,12288,49152,4096,12288,49152
- setprop net.tcp.buffersize.1xrtt 16384,32768,131072,4096,16384,102400
- setprop net.tcp.buffersize.evdo 16384,32768,131072,4096,16384,102400
- setprop net.tcp.buffersize.evdo_b 131072,262144,1048576,4096,16384,524288
- setprop net.tcp.buffersize.ehrpd 131072,262144,1048576,4096,16384,524288
- setprop net.tcp.buffersize.2ghotspot 4096,16384,65536,16384,32768,131072
- setprop net.tcp.buffersize.2ghotspot2 4096,16384,102400,16384,32768,131072
- setprop net.tcp.buffersize.3ghotspot 4096,16384,399360,131072,262144,2441216
- setprop net.tcp.buffersize.3ghotspot2 4096,16384,524288,131072,262144,1048576
-
- # 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 3145728
- write /proc/sys/net/core/wmem_max 3145728
-
- #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
-
- # CT406 Light sensor and proximity
- chown system system /sys/module/ct406/parameters/als_enable
- chmod 0660 /sys/module/ct406/parameters/als_enable
- chown system system /sys/module/ct406/parameters/prox_enable
- chmod 0660 /sys/module/ct406/parameters/prox_enable
- chown system system /sys/module/ct406/parameters/ip_enable
- chmod 0660 /sys/module/ct406/parameters/ip_enable
- chown system system /sys/module/ct406/parameters/als_delay
- chmod 0660 /sys/module/ct406/parameters/als_delay
-
- # Change ownership and permission for led
- chown system system /sys/class/leds/white/brightness
- chown system system /sys/class/leds/rgb/control
- chown system system /sys/class/leds/led:flash_0/brightness
- chown system system /sys/class/leds/charging/brightness
- chmod 0664 /sys/class/leds/white/brightness
- chmod 0664 /sys/class/leds/rgb/control
- chmod 0664 /sys/class/leds/led:flash_0/brightness
- chmod 0664 /sys/class/leds/charging/brightness
- chmod 0664 /sys/class/leds/lcd-backlight/brightness
-
- # Permissions for Factory Test of Charging Paths
- chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_auto_enable
- chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_ibatt
- chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_itrick
- chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_iusb
- chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_usb_suspend
- chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_fail_clear
- chown mot_pwric mot_pwric /sys/class/power_supply/battery/device/force_chg_usb_otg_ctl
-
- # Change ownership and permission for vibrator
- chown system system /sys/class/timed_output/vibrator/enable
- chmod 0660 /sys/class/timed_output/vibrator/enable
- chown system system /sys/devices/virtual/timed_output/vibrator/vtg_level
-
- # display color calibration
- chown system system /sys/devices/platform/kcal_ctrl.0/kcal
- chown system system /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
-
- # Enable rotator
- chown system system /sys/class/input/event1/device/device/enable
-
- # setup trace dir
- mkdir /cache/trace 0777 root shell
- chown root shell /cache/trace
- chmod 0777 /cache/trace
-
- # Force all SSR systems to 'related' so they attempt self-recovery without
- # rebooting the device
- write /sys/bus/msm_subsys/devices/subsys0/restart_level related
- write /sys/bus/msm_subsys/devices/subsys1/restart_level related
- write /sys/bus/msm_subsys/devices/subsys2/restart_level related
- write /sys/bus/msm_subsys/devices/subsys3/restart_level related
-
- setprop ro.hw.device ${ro.boot.device}
- setprop ro.hw.hwrev ${ro.boot.hwrev}
- setprop ro.hw.radio ${ro.boot.radio}
-
- # Allow radio to access power state
- chown system system /sys/power/state
- chown radio system /sys/class/power_supply/usb/online
- chmod 0755 /sys/class/power_supply/usb/online
-
- # Switch to interactive and let PowerHAL configure it
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
- chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
- chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boost
- chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
- chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
- chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
- chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
- chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
- chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
- chown system system /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
- chown system system /sys/devices/system/cpu/cpufreq/interactive/sync_freq
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/sync_freq
- chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/target_loads
- chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
- chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
- chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
- chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
- chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
- chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
-
-# Services start here
-
-service adsprpcd /system/bin/adsprpcd
- class main
- user media
- group media
-
-service audiod /system/bin/audiod
- class late_start
- user system
- group system
-
-service batt_health /system/bin/batt_health
- class main
- group mot_pwric
- disabled
-
-service charge_only_mode /system/bin/charge_only_mode
- user root
- group graphics system input
- disabled
-
-service hw_revs /system/bin/hardware_revisions.sh
- class main
- user system
- group system
- oneshot
-
-service irsc_util /system/bin/irsc_util "/etc/sec_config"
- class main
- user root
- oneshot
-
-service location_mq /system/bin/location-mq
- class late_start
- user gps
- group gps
- disabled
-
-service stml0xx /system/bin/stml0xx_wrapper.sh
- class late_start
- user compass
- group compass misc input
- oneshot
-
-service mmi-boot-sh /system/bin/sh /init.mmi.boot.sh
- class core
- user root
- oneshot
-
-service_redefine ril-daemon /system/bin/rild
- class main
- socket rild stream 660 root radio
- socket rild-debug stream 660 radio system
- socket cutback stream 660 media radio
- user root
- group radio cache inet misc audio sdcard_rw qcom_oncrpc qcom_diag log net_raw
-
-service ril-daemon2 /system/bin/rild -c 2
- class main
- socket rild2 stream 660 root radio
- socket rild-debug2 stream 660 radio system
- user root
- group radio cache inet misc audio sdcard_rw qcom_oncrpc qcom_diag log net_raw
- disabled
-
-service rild2-wrapper /system/bin/sh /init.qcom.ril.sh
- class late_start
- user root
- group root
- oneshot
-
-service mmi-touch-sh /system/bin/sh /init.mmi.touch.sh synaptics aps
- class late_start
- user root
- oneshot
-
-service mpdecision /system/bin/mpdecision --avg_comp
- user root
- group root system
- disabled
-
-on property:ro.use_data_netmgrd=false
- stop netmgrd
-
-service netmgrd /system/bin/netmgrd
- class main
-
-service qcamerasvr /system/bin/mm-qcamera-daemon
- class late_start
- user camera
- group camera system inet input graphics
-
-service qmuxd /system/bin/qmuxd
- class main
- user radio
- group radio audio bluetooth gps qcom_diag
-
-service qseecomd /system/bin/qseecomd
- class late_start
- user root
- group root
-
-service rfs_access /system/bin/rfs_access
- class core
- user system
- group system net_raw
-
-service rmt_storage /system/bin/rmt_storage
- class core
- user root
-
-# SSR
-on property:persist.sys.ssr.restart_level=*
- exec /system/bin/sh /init.qcom.ssr.sh ${persist.sys.ssr.restart_level}
-
-on property:persist.sys.qc.sub.rdump.on=*
- write /sys/module/subsystem_restart/parameters/enable_ramdumps ${persist.sys.qc.sub.rdump.on}
-
-on property:hw.fm.mode=*
- start fm_dl
-
-service thermal-engine /system/bin/thermal-engine -c /etc/thermal-engine-8610.conf
- class main
- user root
- group root
-
-service time_daemon /system/bin/time_daemon
- class late_start
- user root
- group root
-
-service wcnss-service /system/bin/wcnss_service
- class late_start
- user root
- group system wifi
- oneshot
-
-# WPA
-service p2p_supplicant /system/bin/wpa_supplicant \
- -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
- -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \
- -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
- -I/system/etc/wifi/wpa_supplicant_overlay.conf \
- -puse_p2p_group_interface=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 \
- -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
- -I/system/etc/wifi/wpa_supplicant_overlay.conf \
- -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
-
-on property:init.svc.wpa_supplicant=stopped
- stop dhcpcd
-
-service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
- 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 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
-
-service dhcpcd_eth0 /system/bin/dhcpcd -G
- class late_start
- disabled
- oneshot
-
-service iprenew_eth0 /system/bin/dhcpcd -nBK
- class late_start
- disabled
- oneshot
-
-service xtwifi_client /system/bin/xtwifi-client
- class late_start
- user gps
- group net_admin wifi inet gps
- disabled
-
-service xtwifi_inet /system/bin/xtwifi-inet-agent
- class late_start
- user gps
- group inet gps
- disabled
-
-on charger
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct 0x2e82
- write /sys/class/android_usb/android0/functions mass_storage
- write /sys/class/android_usb/android0/enable 1
-
- wait /dev/block/platform/msm_sdcc.1/by-name/system
- mount ext4 /dev/block/platform/msm_sdcc.1/by-name/system /system ro barrier=1
-
- write /sys/module/lpm_levels/enable_low_power/l2 1
- write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_show_resume_irq/parameters/debug_mask 1
- write /sys/devices/system/cpu/cpu1/online 0
- write /sys/devices/system/cpu/cpu2/online 0
- write /sys/devices/system/cpu/cpu3/online 0
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
- chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
- chown root system /sys/devices/system/cpu/cpu1/online
- chmod 664 /sys/devices/system/cpu/cpu1/online
- write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
- write /sys/power/autosleep "mem"
- write /sys/module/lpm_levels/enable_low_power/l2 3
- write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 0
- write /sys/devices/system/cpu/cpu1/online 1
- write /sys/devices/system/cpu/cpu2/online 1
- write /sys/devices/system/cpu/cpu3/online 1
- start charge_only_mode
-
-on property:sys.boot_completed=1
- write /sys/module/lpm_levels/enable_low_power/l2 4
- write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu0/retention/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu1/retention/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
-
- chown root system /sys/devices/system/cpu/cpu1/online
- chmod 0664 /sys/devices/system/cpu/cpu1/online
- chown root system /sys/devices/system/cpu/cpu2/online
- chmod 0664 /sys/devices/system/cpu/cpu2/online
- chown root system /sys/devices/system/cpu/cpu3/online
- chmod 0664 /sys/devices/system/cpu/cpu3/online
-
- write /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk 1
- write /sys/module/lowmemorykiller/parameters/vmpressure_file_min 49152
-
- start mpdecision
diff --git a/ramdisk/init.qcom.ril.sh b/ramdisk/init.qcom.ril.sh
deleted file mode 100755
index d9637f2..0000000
--- a/ramdisk/init.qcom.ril.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/system/bin/sh
-export PATH=/system/xbin:$PATH
-
-multisim=`getprop persist.radio.multisim.config`
-
-if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
- start ril-daemon2
-fi
diff --git a/ramdisk/init.qcom.ssr.sh b/ramdisk/init.qcom.ssr.sh
deleted file mode 100755
index 279383c..0000000
--- a/ramdisk/init.qcom.ssr.sh
+++ /dev/null
@@ -1,151 +0,0 @@
-#!/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 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.
-#
-
-ssr_str="$1"
-IFS=,
-ssr_array=($ssr_str)
-typeset -i subsys_mask=0
-
-# check user input subsystem with system device
-ssr_check_subsystem_name()
-{
- typeset -i i=0
- subsys=`cat /sys/bus/msm_subsys/devices/subsys$i/name`
- while [ "$subsys" != "" ]
- do
- if [ "$subsys" == "$ssr_name" ]; then
- return 1
- fi
- i=$i+1
- subsys=`cat /sys/bus/msm_subsys/devices/subsys$i/name`
- done
- return 0
-}
-
-# set subsystem mask to indicate which subsystem needs to be enabled
-for num in "${!ssr_array[@]}"
-do
- case "${ssr_array[$num]}" in
- "1")
- subsys_mask=0
- ;;
- "riva")
- subsys_mask=$subsys_mask+1
- ;;
- "3")
- subsys_mask=63
- ;;
- "adsp")
- ssr_name=adsp
- if ( ssr_check_subsystem_name ); then
- subsys_mask=$subsys_mask+2
- fi
- ;;
- "modem")
- ssr_name=modem
- if ( ssr_check_subsystem_name ); then
- subsys_mask=$subsys_mask+4
- fi
- ;;
- "wcnss")
- ssr_name=wcnss
- if ( ssr_check_subsystem_name ); then
- subsys_mask=$subsys_mask+8
- fi
- ;;
- "venus")
- ssr_name=venus
- if ( ssr_check_subsystem_name ); then
- subsys_mask=$subsys_mask+16
- fi
- ;;
- "external_modem")
- ssr_name=external_modem
- if ( ssr_check_subsystem_name ); then
- subsys_mask=$subsys_mask+32
- fi
- ;;
- esac
-done
-
-# loop through all subsystems and disable SSR only for adsp
-typeset -i j=0
-typeset -i adsp_mask=0
-subsys=`cat /sys/bus/msm_subsys/devices/subsys$j/name`
-while [ "$subsys" != "" ]
-do
- if [ "$subsys" == "adsp" ]; then
- adsp_mask=$(( 1 << ( j + 1 ) ))
- subsys_mask=$(( subsys_mask & ( ~adsp_mask ) ))
- fi
- j=$j+1
- subsys=`cat /sys/bus/msm_subsys/devices/subsys$j/name`
-done
-
-# enable selected subsystem restart
-if [ $((subsys_mask & 1)) == 1 ]; then
- echo 1 > /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr
-else
- echo 0 > /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr
-fi
-
-if [ $((subsys_mask & 2)) == 2 ]; then
- echo "related" > /sys/bus/msm_subsys/devices/subsys0/restart_level
-else
- echo "system" > /sys/bus/msm_subsys/devices/subsys0/restart_level
-fi
-
-if [ $((subsys_mask & 4)) == 4 ]; then
- echo "related" > /sys/bus/msm_subsys/devices/subsys1/restart_level
-else
- echo "system" > /sys/bus/msm_subsys/devices/subsys1/restart_level
-fi
-
-if [ $((subsys_mask & 8)) == 8 ]; then
- echo "related" > /sys/bus/msm_subsys/devices/subsys2/restart_level
-else
- echo "system" > /sys/bus/msm_subsys/devices/subsys2/restart_level
-fi
-
-if [ $((subsys_mask & 16)) == 16 ]; then
- echo "related" > /sys/bus/msm_subsys/devices/subsys3/restart_level
-else
- echo "system" > /sys/bus/msm_subsys/devices/subsys3/restart_level
-fi
-
-if [ $((subsys_mask & 32)) == 32 ]; then
- echo "related" > /sys/bus/msm_subsys/devices/subsys4/restart_level
-else
- echo "system" > /sys/bus/msm_subsys/devices/subsys4/restart_level
-fi
-
-if [ $((subsys_mask & 63)) == 63 ]; then
- echo 3 > /sys/module/subsystem_restart/parameters/restart_level
-else
- echo 1 > /sys/module/subsystem_restart/parameters/restart_level
-fi
diff --git a/ramdisk/init.qcom.usb.rc b/ramdisk/init.qcom.usb.rc
deleted file mode 100755
index 059309d..0000000
--- a/ramdisk/init.qcom.usb.rc
+++ /dev/null
@@ -1,219 +0,0 @@
-# Copyright (c) 2011, Code Aurora Forum. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of Code Aurora nor
-# the names of its contributors may be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-on init
- write /sys/class/android_usb/android0/f_rndis/wceis 1
-
-on boot
- write /sys/class/android_usb/android0/iSerial ${ro.serialno}
- write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
- write /sys/class/android_usb/android0/iProduct ${ro.product.model}
- write /sys/class/android_usb/android0/f_mass_storage/vendor ${ro.product.manufacturer}
- write /sys/class/android_usb/android0/f_mass_storage/product ${ro.product.model}
- mkdir /dev/bus 0755 root root
- mkdir /dev/bus/usb 0755 root root
- chown system system /sys/class/android_usb/android0/secure
- chmod 0660 /sys/class/android_usb/android0/secure
-
-# USB compositions
-on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 05C6
- write /sys/class/android_usb/android0/idProduct 9025
- write /sys/class/diag/diag/logging_mode usb
- 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,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/diag/diag/logging_mode usb
- 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=rndis
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct 0x2e24
- 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 0x22b8
- write /sys/class/android_usb/android0/idProduct 0x2e25
- write /sys/class/android_usb/android0/functions rndis,adb
- write /sys/class/android_usb/android0/enable 1
- start adbd
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=mtp
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/bDeviceClass 0
- write /sys/class/android_usb/android0/bDeviceSubClass 0
- write /sys/class/android_usb/android0/bDeviceProtocol 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct 0x2e82
- 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
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/bDeviceClass 0
- write /sys/class/android_usb/android0/bDeviceSubClass 0
- write /sys/class/android_usb/android0/bDeviceProtocol 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct 0x2e76
- 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=diag,serial_smd,serial_tty,rmnet,usbnet,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e29
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- 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,usbnet,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,serial_tty,rmnet,usbnet
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e28
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- 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,usbnet
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=rndis,diag,serial_smd,serial_tty,rmnet,usbnet,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e2b
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- 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 rndis,diag,serial,rmnet,usbnet,adb
- write /sys/class/android_usb/android0/enable 1
- start adbd
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=rndis,diag,serial_smd,serial_tty,rmnet,usbnet
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e2a
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- 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 rndis,diag,serial,rmnet,usbnet
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=usbnet,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e2d
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode internal
- write /sys/class/android_usb/android0/functions usbnet,adb
- write /sys/class/android_usb/android0/enable 1
- start adbd
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=usbnet
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e2c
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode internal
- write /sys/class/android_usb/android0/functions usbnet
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=diag,usbnet
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e34
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- write /sys/class/android_usb/android0/f_diag/clients diag
- write /sys/class/android_usb/android0/functions diag,usbnet
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=diag,usbnet,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idProduct 0x2e35
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/diag/diag/logging_mode usb
- write /sys/class/android_usb/android0/f_diag/clients diag
- write /sys/class/android_usb/android0/functions diag,usbnet,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/bDeviceClass 0
- write /sys/class/android_usb/android0/bDeviceSubClass 0
- write /sys/class/android_usb/android0/bDeviceProtocol 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct 0x2e83
- write /sys/class/android_usb/android0/functions ptp
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=ptp,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/bDeviceClass 0
- write /sys/class/android_usb/android0/bDeviceSubClass 0
- write /sys/class/android_usb/android0/bDeviceProtocol 0
- write /sys/class/android_usb/android0/idVendor 0x22b8
- write /sys/class/android_usb/android0/idProduct 0x2e84
- 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}
diff --git a/ramdisk/ueventd.qcom.rc b/ramdisk/ueventd.qcom.rc
deleted file mode 100644
index dfbf9b3..0000000
--- a/ramdisk/ueventd.qcom.rc
+++ /dev/null
@@ -1,275 +0,0 @@
-# Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of The Linux Foundation nor
-# the names of its contributors may be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-/dev/null 0666 root root
-/dev/zero 0666 root root
-/dev/full 0666 root root
-/dev/ptmx 0666 root root
-/dev/tty 0666 root root
-/dev/random 0666 root root
-/dev/urandom 0666 root root
-
-/dev/ashmem 0666 root root
-/dev/binder 0666 root root
-/dev/tspdrv 0666 root root
-/dev/ttyHSL0 0660 radio system
-# logger should be world writable (for logging) but not readable
-/dev/log/* 0666 root log
-
-# the DIAG device node is not world writable/readable.
-/dev/diag 0660 system qcom_diag
-/dev/ttydiag0 0660 system qcom_diag
-/dev/ttydiag1 0660 system qcom_diag
-/dev/genlock 0666 system system
-/dev/kgsl 0666 system system
-/dev/kgsl-3d0 0666 system system
-/dev/kgsl-2d0 0666 root root
-/dev/kgsl-2d1 0666 root root
-/dev/ion 0664 system system
-/dev/rtc0 0660 system system
-/dev/smd0 0660 system system
-/dev/smd4 0660 system system
-/dev/smd_cxm_qmi 0640 radio radio
-/dev/smd5 0660 system system
-/dev/smd6 0660 system system
-/dev/smd7 0660 bluetooth bluetooth
-
-/dev/block/platform/msm_sdcc.1/by-name/frp 0600 system system
-
-#permissions for CSVT
-/dev/smd11 0660 radio radio
-
-/dev/rfcomm0 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/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/video* 0660 system camera
-/dev/media* 0660 system camera
-/dev/v4l-subdev* 0660 system camera
-/dev/qseecom 0660 system drmrpc
-/dev/gemini0 0660 system camera
-/dev/jpeg0 0660 system camera
-/dev/jpeg1 0660 system camera
-/dev/jpeg2 0660 system camera
-/dev/adsprpc-smd 0664 media camera
-/dev/msm_camera/* 0660 media 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 0644 root root
-/dev/adsprpc-smd 0660 media camera
-
-#permissions for 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_acdb 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 system radio
-/dev/smd3 0660 bluetooth net_bt_stack
-/dev/smd2 0660 bluetooth net_bt_stack
-/dev/ttyHSL1 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
-
-# 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/virtual/optical_sensors/proximity ps_adc 0660 input system
-/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system
-/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system
-/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system
-/sys/devices/virtual/input/input* poll 0660 input system
-/sys/devices/virtual/input/input* pollrate_ms 0660 input system
-/sys/devices/virtual/input/input* delay 0660 root input
-/sys/devices/virtual/input/input* op_mode 0660 root input
-/sys/devices/virtual/input/input* offset_x 0664 root input
-/sys/devices/virtual/input/input* offset_y 0664 root input
-/sys/devices/virtual/input/input* offset_z 0664 root input
-/sys/devices/virtual/input/input* rept_xy 0664 root input
-/sys/devices/virtual/input/input* rept_z 0664 root input
-/sys/devices/virtual/input/input* bandwidth 0664 root input
-/sys/devices/virtual/input/input* range 0664 root input
-/sys/devices/virtual/input/input* driver/enable 0660 root input
-/sys/devices/virtual/input/input* driver/delay 0660 root input
-
-# wlan
-/dev/wcnss_wlan 0660 system system
-/dev/wcnss_ctrl 0660 system system
-
-#nfc permissions
-/dev/nfc-nci 0660 nfc nfc
-/dev/bcm2079x-i2c 0660 nfc nfc
-
-# UIO devices
-/dev/uio0 0660 system system
-/dev/uio1 0660 system system
-/dev/uio2 0660 system system
-
-# SSR
-/dev/coredump_modem 0660 radio radio
-/dev/ramdump_adsp 0660 radio radio
-/dev/ramdump_modem 0660 radio radio
-/dev/ramdump_smem-modem 0660 radio radio
-/dev/ramdump_smem-smd 0660 radio radio
-/dev/ramdump_venus 0660 radio radio
-/dev/ramdump_pronto 0660 radio radio
-
-# HOB
-/dev/mot_hob_ram 0660 radio radio
-
-# ACDB
-/dev/msm_acdb 0660 system audio
-
-# MOT CAMERA
-/dev/motcamera0 0660 camera camera
-
-# I2C
-/dev/i2c-0 0660 root system
-/dev/i2c-1 0660 root system
-/dev/i2c-2 0660 root system
-/dev/i2c-3 0660 root system
-/dev/i2c-5 0660 root system
-
-# SECURITY
-/dev/qseecom 0660 system drmrpc
-/dev/sec 0660 system drmrpc
-
-# AK8963 Magnetometer
-/dev/akm8963 0660 compass compass
-/dev/akm8963_dev 0660 compass compass
-
-# LIS3DH accelerometer
-/dev/lis3dh 0660 compass compass
-
-# L3G4200D Gyro
-/dev/l3g4200d 0660 compass compass
-
-#PN544 NFC
-/dev/pn544 0660 nfc nfc
-
-# kernel logs
-/dev/log/kernel 0600 root log
-
-# Moto Sensors
-/dev/stm401 0660 system compass
-/dev/stm401_as 0660 compass compass
-/dev/stm401_ms 0660 compass compass
-
-# Moto Sensors
-/dev/stml0xx 0660 system compass
-/dev/stml0xx_as 0660 compass compass
-/dev/stml0xx_ms 0660 compass compass
-
-# Validity Sensor
-/dev/vfsspi 0660 fingerp fingerp
-
-# DTV
-/dev/isdbt 0660 system system
-
-# haptic
-/dev/drv2605 0660 system system
-
-# FB Quickdraw
-/dev/fb_quickdraw 0660 system graphics