mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
10a720e28d
Change-Id: I5e15574de04af9e8755acce2db4042ff6c7a3c25 Signed-off-by: Jackeagle <jackeagle102@gmail.com>
690 lines
25 KiB
Text
690 lines
25 KiB
Text
# Copyright (c) 2009-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.
|
|
#
|
|
|
|
import init.qcom.power.rc
|
|
import init.qcom.usb.rc
|
|
import init.target.rc
|
|
|
|
on early-init
|
|
export LD_SHIM_LIBS /system/lib/hw/camera.vendor.msm8226.so|libboringssl-compat.so:/system/vendor/lib/libqomx_jpegenc.so|libboringssl-compat.so:/system/lib/libcrypto.so|libboringssl-compat.so:/system/lib/libril.so|libril_shim.so
|
|
|
|
mount debugfs debugfs /sys/kernel/debug
|
|
|
|
mkdir /firmware 0771 system system
|
|
mkdir /firmware-modem 0771 system system
|
|
|
|
mkdir /persist 0771 system system
|
|
|
|
mkdir /efs 0771 system radio
|
|
|
|
symlink /data/tombstones /tombstones
|
|
|
|
on init
|
|
|
|
# Support legacy paths
|
|
symlink /sdcard /mnt/sdcard
|
|
symlink /sdcard /storage/sdcard0
|
|
|
|
on fs
|
|
mount_all fstab.qcom
|
|
|
|
# Support Preload install apks
|
|
# mkdir /preload 0771 system system
|
|
# wait /dev/block/platform/msm_sdcc.1/by-name/hidden
|
|
# mount ext4 /dev/block/platform/msm_sdcc.1/by-name/hidden /preload nosuid nodev ro barrier=1
|
|
# setprop storage.preload.complete 1
|
|
|
|
#restorecon_recursive /efs
|
|
#restorecon_recursive /persist
|
|
|
|
mkdir /persist/data 0700 system system
|
|
mkdir /persist/data/sfs 0700 system system
|
|
mkdir /persist/data/tz 0700 system system
|
|
|
|
write /sys/kernel/boot_adsp/boot 1
|
|
setprop qcom.audio.init complete
|
|
|
|
# Kickstart the Wireless subsystem
|
|
write /dev/wcnss_wlan 1
|
|
|
|
on post-fs-data
|
|
# Create the directories used by CnE subsystem
|
|
mkdir /data/connectivity 0771 system system
|
|
chown system system /data/connectivity
|
|
|
|
# For WIFI TRP/TIS
|
|
chown system root /data/.psm.info
|
|
chmod 0664 /data/.psm.info
|
|
|
|
# For WIFI Antena Selection
|
|
chown system root /data/.ant.info
|
|
chmod 0664 /data/.ant.info
|
|
|
|
# For WIFI Version
|
|
write /data/.wifiver.info 0
|
|
chown system root /data/.wifiver.info
|
|
chmod 0664 /data/.wifiver.info
|
|
|
|
# For WIFI Cert
|
|
chmod 0664 /data/.bustxglom.info
|
|
chmod 0664 /data/.roamoff.info
|
|
chmod 0664 /data/.frameburst.info
|
|
chmod 0664 /data/.txbf.info
|
|
|
|
# For WIFI MAC address
|
|
mkdir /efs/wifi 0775 radio system
|
|
chown system wifi /efs/wifi/.mac.info
|
|
chmod 0660 /efs/wifi/.mac.info
|
|
#restorecon /efs/wifi/.mac.info
|
|
chmod 0660 /efs/wifi/.mac.cob
|
|
|
|
# Create directory used by audio subsystem
|
|
mkdir /data/misc/audio 0770 audio audio
|
|
|
|
# Create directory used by radio subsystem
|
|
mkdir /data/radio 0770 radio radio
|
|
|
|
# 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
|
|
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 directories for Location services
|
|
mkdir /data/misc/location 0770 gps gps
|
|
mkdir /data/misc/location/gpsone_d 0770 system gps
|
|
mkdir /data/misc/location/mq 0770 gps gps
|
|
mkdir /data/misc/location/quipc 0770 system 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 /data/time folder for time-services
|
|
mkdir /data/time/ 0700 system system
|
|
|
|
# Enable the setgid bit on the directory
|
|
mkdir /data/bluetooth 0770 bluetooth bluetooth
|
|
chmod 2770 /data/bluetooth
|
|
|
|
# Enable the setgid bit on the directory
|
|
mkdir /data/audio/ 0770 media audio
|
|
chmod 2770 /data/audio
|
|
|
|
# Create a folder for SRS to be able to create a usercfg file
|
|
mkdir /data/data/media 0770 media media
|
|
|
|
# Gpio DVS
|
|
chown radio system /sys/class/secgpio_check/secgpio_check_all/secgpio_ctrl
|
|
|
|
# Create thombstone folders
|
|
mkdir /data/tombstones 0771 system system
|
|
mkdir /tombstones/modem 0771 system system
|
|
|
|
# Create directory for ril data
|
|
mkdir /data/misc/radio 0775 radio radio
|
|
mkdir /data/misc/radio/hatp 0775 radio system
|
|
|
|
# DRM and related files in EFS
|
|
mkdir /efs/drm 0774 drm system
|
|
mkdir /efs/drm/sdrm 0774 drm system
|
|
mkdir /efs/drm/sdrm/data_agent 0774 drm system
|
|
#restorecon /efs/drm
|
|
#restorecon /efs/drm/sdrm
|
|
#restorecon /efs/drm/sdrm/data_agent
|
|
|
|
# DivX DRM
|
|
mkdir /efs/.files 0775
|
|
mkdir /efs/.files/.dx1 0775
|
|
mkdir /efs/.files/.dm33 0775
|
|
mkdir /efs/.files/.mp301 0775
|
|
chown media system /efs/.files/.dx1
|
|
chown media system /efs/.files/.dm33
|
|
chown media system /efs/.files/.mp301
|
|
chmod 0775 /efs/.files/.dx1
|
|
chmod 0775 /efs/.files/.dm33
|
|
chmod 0775 /efs/.files/.mp301
|
|
|
|
# DRK permission
|
|
mkdir /efs/prov 0770 radio system
|
|
chown radio system /efs/prov/libdevkm.lock
|
|
chmod 0660 /efs/prov/libdevkm.lock
|
|
|
|
# ICD
|
|
exec 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
|
|
|
|
# Symlink to bugreport storage location
|
|
symlink /data/data/com.android.shell/files/bugreports /data/bugreports
|
|
|
|
setprop vold.post_fs_data_done 1
|
|
|
|
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}
|
|
|
|
on boot
|
|
mount debugfs /sys/kernel/debug /sys/kernel/debug
|
|
|
|
# Permissions for bluetooth
|
|
mkdir /efs/bluetooth 0775 radio system
|
|
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 0755 /efs/bluetooth/bt_addr
|
|
#restorecon_recursive /efs/bluetooth
|
|
|
|
# IMEI
|
|
mkdir /efs/imei 0775 radio radio
|
|
|
|
# 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
|
|
|
|
# Modem requires this
|
|
chown root radio /proc/cmdline
|
|
chmod 0644 /proc/cmdline
|
|
|
|
# Remove SUID bit for iproute2 ip tool
|
|
chmod 0755 /system/bin/ip
|
|
|
|
# For bridgemgr daemon to inform the USB driver of the correct transport
|
|
chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
|
|
|
|
# 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
|
|
# modified by SEC, SEC use a loglevel path with another way.
|
|
# write /proc/sys/kernel/printk "6 6 1 7"
|
|
|
|
# Flash storage isn't a good entropy source, and only causes locking
|
|
# overhead in the kernel. Turn it off.
|
|
write /sys/block/mmcblk0/queue/add_random 0
|
|
|
|
# MUIC
|
|
chown system radio /sys/class/sec/switch/adc
|
|
chown system radio /sys/class/sec/switch/reset_switch
|
|
chown radio system /sys/class/sec/switch/usb_state
|
|
|
|
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
|
|
|
|
chown radio system /sys/class/devfreq/qcom,cpubw.68/available_frequencies
|
|
chmod 664 /sys/class/devfreq/qcom,cpubw.68/available_frequencies
|
|
chown radio system /sys/class/devfreq/qcom,cpubw.68/available_governors
|
|
chmod 664 /sys/class/devfreq/qcom,cpubw.68/available_governors
|
|
chown radio system /sys/class/devfreq/qcom,cpubw.68/governor
|
|
chmod 664 /sys/class/devfreq/qcom,cpubw.68/governor
|
|
chown radio system /sys/class/devfreq/qcom,cpubw.68/max_freq
|
|
chmod 664 /sys/class/devfreq/qcom,cpubw.68/max_freq
|
|
chown radio system /sys/class/devfreq/qcom,cpubw.68/min_freq
|
|
chmod 664 /sys/class/devfreq/qcom,cpubw.68/min_freq
|
|
|
|
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
|
|
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
|
|
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
|
|
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
|
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
|
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
|
|
|
# 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/negative
|
|
chown system media_rw /sys/class/mdnie/mdnie/accessibility
|
|
|
|
chown radio system /sys/class/lcd/panel/lcd_power
|
|
chown radio system /sys/class/lcd/panel/lcd_type
|
|
chown radio system /sys/class/lcd/panel/power_reduce
|
|
chown radio system /sys/class/lcd/panel/siop_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/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
|
|
|
|
# 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
|
|
|
|
# Display color calibration
|
|
chown system system /sys/devices/virtual/graphics/fb0/rgb
|
|
chmod 0660 /sys/devices/virtual/graphics/fb0/rgb
|
|
|
|
# Essential node for usbservice
|
|
mkdir /dev/bus/ 755 root root
|
|
mkdir /dev/bus/usb 755 root root
|
|
|
|
# Permissions for Camera
|
|
chown root system /sys/class/camera/rear/rear_camantibanding
|
|
chown system radio /sys/class/camera/rear/rear_camfw
|
|
chown system radio /sys/class/camera/rear/rear_camfw_full
|
|
chown system radio /sys/class/camera/rear/rear_camfw_load
|
|
chown system radio /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 radio /sys/class/camera/rear/isp_core
|
|
chown system radio /sys/class/camera/flash/rear_flash
|
|
chown system radio /sys/class/camera/front/front_camfw
|
|
chown system radio /sys/class/camera/front/front_camtype
|
|
|
|
# Torch
|
|
chown system system /sys/class/leds/led:flash_torch/brightness
|
|
chmod 0666 /sys/class/leds/led:flash_torch/brightness
|
|
|
|
# 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
|
|
|
|
# Permissions for Charging
|
|
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
|
|
|
|
# Permission for fast dormancy for RIL
|
|
chown system radio /sys/devices/virtual/sec/bamdmux/waketime
|
|
|
|
# Permissions for gpio_keys
|
|
chown system radio /sys/class/sec/sec_key/wakeup_keys
|
|
write /sys/class/sec/sec_key/wakeup_keys 116,172
|
|
|
|
# Permission for HALL IC
|
|
chown system radio /sys/class/sec/sec_key/hall_detect
|
|
|
|
# Vibetonz
|
|
chmod 0660 /dev/tspdrv
|
|
chown vibe vibe /dev/tspdrv
|
|
|
|
# Vibrator
|
|
chmod 0644 /sys/class/timed_output/vibrator/pwm_value
|
|
chown system system /sys/class/timed_output/vibrator/pwm_value
|
|
chown system system /sys/class/timed_output/vibrator/enable
|
|
|
|
# Permissions for TSP
|
|
chown system system /sys/class/sec/tsp/cmd
|
|
chown system system /sys/class/sec/tsp/input/enabled
|
|
chown system system /sys/class/input/input0/enabled
|
|
chown system system /sys/class/input/input1/enabled
|
|
chown system system /sys/class/input/input2/enabled
|
|
chmod 0664 /sys/class/sec/tsp/cmd
|
|
chmod 0660 /sys/class/sec/tsp/input/enabled
|
|
chmod 0664 /sys/class/input/input0/enabled
|
|
chmod 0664 /sys/class/input/input1/enabled
|
|
chmod 0664 /sys/class/input/input2/enabled
|
|
|
|
# Permission for touchkey
|
|
chown system system /sys/class/sec/sec_touchkey/keypad_enable
|
|
chown system system /sys/class/sec/sec_touchkey/touchkey_brightness
|
|
chown system system /sys/class/sec/sec_touchkey/touchkey_menu
|
|
chown system system /sys/class/sec/sec_touchkey/touchkey_back
|
|
chown system system /sys/class/sec/sec_touchkey/touch_version
|
|
chown system system /sys/class/sec/sec_touchkey/touchkey_firm_version_panel
|
|
chown system system /sys/class/sec/sec_touchkey/touchkey_firm_version_phone
|
|
chown system system /sys/class/sec/sec_touchkey/touchkey_firm_update_status
|
|
chown system system /sys/class/sec/sec_touchkey/touchkey_firm_update
|
|
chown system system /sys/class/sec/sec_touchkey/touch_sensitivity
|
|
chown system system /sys/class/sec/sec_touchkey/touchkey_threshold
|
|
chown system system /sys/devices/virtual/sec/sec_touchkey/brightness
|
|
chmod 0664 /sys/class/sec/sec_touchkey/keypad_enable
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_brightness
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_menu
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_back
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touch_version
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_firm_version_panel
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_firm_version_phone
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_firm_update_status
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_firm_update
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touch_sensitivity
|
|
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_threshold
|
|
chmod 0664 /sys/devices/virtual/sec/sec_touchkey/brightness
|
|
restorecon /sys/class/sec/sec_touchkey/keypad_enable
|
|
|
|
# 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
|
|
|
|
on charger
|
|
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
|
|
class_start charger
|
|
|
|
# Services
|
|
service adsprpcd /system/bin/adsprpcd
|
|
class main
|
|
user media
|
|
group media
|
|
|
|
service audiod /system/bin/audiod
|
|
class late_start
|
|
user system
|
|
group system
|
|
|
|
service charger /sbin/healthd -c
|
|
class charger
|
|
critical
|
|
seclabel u:r:healthd:s0
|
|
|
|
service ds_fmc_appd /system/bin/ds_fmc_appd -p "rmnet0" -D
|
|
class late_start
|
|
group radio wifi inet
|
|
disabled
|
|
oneshot
|
|
|
|
on property:persist.data.ds_fmc_app.mode=1
|
|
start ds_fmc_appd
|
|
|
|
service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
|
|
class late_start
|
|
user bluetooth
|
|
group bluetooth net_bt_admin
|
|
disabled
|
|
oneshot
|
|
|
|
on property:bluetooth.hciattach=true
|
|
start hciattach
|
|
|
|
on property:bluetooth.hciattach=false
|
|
setprop bluetooth.status off
|
|
|
|
service irsc_util /system/bin/irsc_util "/etc/sec_config"
|
|
class main
|
|
user root
|
|
oneshot
|
|
|
|
service mpdecision /system/bin/mpdecision --avg_comp
|
|
class main
|
|
user root
|
|
group system
|
|
|
|
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 core
|
|
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
|
|
disabled
|
|
|
|
on property:ro.boot.emmc=true
|
|
start rfs_access
|
|
start rmt_storage
|
|
|
|
# Limit to SoC reset (1) and independent SSR (3)
|
|
on property:persist.sys.ssr.restart_level=1
|
|
write /sys/module/subsystem_restart/parameters/restart_level 1
|
|
|
|
on property:persist.sys.ssr.restart_level=3
|
|
write /sys/module/subsystem_restart/parameters/restart_level 3
|
|
|
|
service thermal-engine /system/bin/thermal-engine -c /etc/thermal-engine-8226.conf
|
|
class core
|
|
seclabel u:r:thermal-engine:s0
|
|
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 system
|
|
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
|
|
|
|
# Dual-sim support
|
|
on property:persist.radio.multisim.config=dsds
|
|
stop ril-daemon
|
|
start ril-daemon
|
|
start ril-daemon1
|
|
|
|
service ril-daemon1 /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
|
|
disabled
|
|
group radio cache inet misc audio log qcom_diag system drmrpc sdcard_r sdcard_rw shell
|