[Galaxy S6 Edge+ Android Development] godkingofcanada:
import init.samsungexynos7420.usb.rc

import init.wifi.rc

import init.baseband.rc

import init.carrier.rc

import init.power.rc

import init.battery.rc

import init.nexus.rc

on early-init

mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755

on init

export LD_SHIM_LIBS "/system/lib64/hw/fingerprint.vendor.exynos5.so|/vendor/lib64/libbauthtzcommon_shim.so:/system/lib/libexynoscamera.so|/vendor/lib/libexynoscamera_shim.so:/system/lib64/libexynoscamera.so|/vendor/lib64/libexynoscamera_shim.so:/system/bin/gpsd|/vendor/lib64/gpsd_shim.so"

# RIL <-> audioserver comm

chmod 0644 /proc/cmdline

mkdir /preload 0771 system system

# Support legacy paths

symlink /sdcard /storage/sdcard0

symlink /storage/usbdisk /mnt/usbdisk

symlink /data/app /factory

symlink /dev/block/platform/15570000.ufs/by-name/STEADY /dev/block/steady

symlink /dev/block/platform/15570000.ufs/by-name/PERSISTENT /dev/block/persistent

# Setup schedtune sysfs

mount tmpfs cgroups /sys/fs/cgroup

mkdir /sys/fs/cgroup/stune

mount cgroup stune /sys/fs/cgroup/stune schedtune

on post-fs

# sda block device

write /sys/block/sda/queue/scheduler "row"

write /sys/block/sda/queue/read_ahead_kb 256

write /sys/block/sda/queue/rq_affinity 2

write /sys/block/sda/queue/add_random 0

write /sys/block/sda/queue/rotational 0

# sdb block device

write /sys/block/sdb/queue/scheduler "row"

write /sys/block/sdb/queue/read_ahead_kb 256

write /sys/block/sdb/queue/rq_affinity 2

write /sys/block/sdb/queue/add_random 0

write /sys/block/sdb/queue/rotational 0

# sdc block device

write /sys/block/sdc/queue/scheduler "row"

write /sys/block/sdc/queue/read_ahead_kb 256

write /sys/block/sdc/queue/rq_affinity 2

write /sys/block/sdc/queue/add_random 0

write /sys/block/sdc/queue/rotational 0

on post-fs-data

setprop vold.post_fs_data_done 1

# Reset notification-LED

write /sys/class/leds/led_b/brightness 0

write /sys/class/leds/led_g/brightness 0

write /sys/class/leds/led_r/brightness 0

write /sys/class/leds/led_w/brightness 0

# Reset touchkeys

write /sys/class/sec/sec_touchkey/brightness 0

# Permissions for audio

chown system radio /sys/class/audio/earjack/select_jack

chown system radio /sys/class/audio/earjack/key_state

chown system radio /sys/class/audio/earjack/state

chown system radio /sys/class/audio/earjack/mic_adc

chown system audio /sys/class/dsm/max98505/dsm_log

chown system audio /sys/class/dsm/maxdsm_cal/max

chown system audio /sys/class/dsm/maxdsm_cal/min

chown system audio /sys/class/dsm/maxdsm_cal/status

chown system audio /sys/class/dsm/maxdsm_cal/duration

chown system audio /sys/class/dsm/maxdsm_cal/temp

chown system audio /sys/class/dsm/maxdsm_cal/rdc

mkdir /data/firmware 0770 audioserver system

mkdir /efs/maxim 0770 system audio

chown system audio /efs/maxim/temp_cal

chown system audio /efs/maxim/rdc_cal

chmod 0660 /efs/maxim/temp_cal

chmod 0660 /efs/maxim/rdc_cal

chown audioserver system /data/firmware

# Permissions Camera

mkdir /data/camera 0777 media system

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_checkfw_user

chown system radio /sys/class/camera/rear/rear_checkfw_factory

chown system radio /sys/class/camera/rear/rear_sensor_standby

chown system radio /sys/class/camera/rear/rear_camtype

chown system radio /sys/class/camera/rear/rear_companionfw

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/isp_core

chown system radio /sys/class/camera/rear/fw_update

chown system radio /sys/class/camera/rear/from_write

chown system radio /sys/class/camera/flash/rear_flash

chown cameraserver system /sys/class/camera/flash/rear_torch_flash

chmod 0664 /sys/class/camera/flash/rear_flash

chmod 0664 /sys/class/camera/flash/rear_torch_flash

chown system radio /sys/class/camera/front/front_camfw

chown system radio /sys/class/camera/front/front_camfw_full

chown system radio /sys/class/camera/front/front_checkfw_factory

chown system radio /sys/class/camera/front/front_camtype

chown system radio /sys/class/camera/ois/selftest

chown system radio /sys/class/camera/ois/ois_power

chown system radio /sys/class/camera/ois/ois_rawdata

chown system radio /sys/class/camera/ois/oisfw

chown system radio /sys/class/camera/ois/ois_diff

# SVC LED

chown system system /sys/class/sec/led/led_r

chown system system /sys/class/sec/led/led_g

chown system system /sys/class/sec/led/led_b

chown system system /sys/class/leds/led_r/brightness

chown system system /sys/class/leds/led_g/brightness

chown system system /sys/class/leds/led_b/brightness

chown system system /sys/class/leds/led_r/delay_on

chown system system /sys/class/leds/led_g/delay_on

chown system system /sys/class/leds/led_b/delay_on

chown system system /sys/class/leds/led_r/delay_off

chown system system /sys/class/leds/led_g/delay_off

chown system system /sys/class/leds/led_b/delay_off

chown system system /sys/class/leds/led_r/blink

chown system system /sys/class/leds/led_g/blink

chown system system /sys/class/leds/led_b/blink

chown system system /sys/class/sec/led/led_pattern

chown system system /sys/class/sec/led/led_blink

chown system system /sys/class/sec/led/led_br_lev

chown system system /sys/class/sec/led/led_lowpower

# Audience

chown system audio /sys/class/earsmart/control/power_control_set

chown system audio /sys/class/earsmart/control/route_value

chown system audio /sys/class/earsmart/control/veq_control_set

chown system audio /sys/class/earsmart/control/extra_volume

chown system audio /sys/class/earsmart/control/always_stream_fs_on

# Vibrations

chown system system /sys/class/timed_output/vibrator/enable

chown system system /sys/class/timed_output/vibrator/intensity

# permission for CHARGING

chown system radio /sys/class/power_supply/battery/batt_discharging_check

chown system radio /sys/class/power_supply/battery/batt_discharging_check_adc

chown system radio /sys/class/power_supply/battery/batt_discharging_ntc

chown system radio /sys/class/power_supply/battery/batt_discharging_ntc_adc

chown system radio /sys/class/power_supply/battery/batt_self_discharging_control

chown system radio /sys/class/power_supply/battery/batt_inbat_wireless_cs100

#NFC : create data/nfc for nv storage

mkdir /data/nfc 0700 nfc nfc

mkdir /data/nfc/param 0700 nfc nfc

mkdir /data/bcmnfc 0700 nfc nfc

mkdir /data/bcmnfc/param 0700 nfc nfc

mkdir /efs/sec_efs/nfc 0500 nfc nfc

# sec_efs_file

mkdir /efs/sec_efs 0775 radio system

# Latin SSMS feature

mkdir /efs/SMS 0775 radio system

# PMK permission

mkdir /efs/mc 0770 radio system

chown radio system /efs/mc

chmod 0770 /efs/mc

chown radio system /efs/mc/mc.dat

chmod 0640 /efs/mc/mc.dat

# Professioanl Audio

mkdir /data/misc/jack 0770 jack system

mkdir /dev/socket/jack 0771 jack system

# Samsung Pay

mkdir /efs/pfw_data 0760 spay spay

# h2k

mkdir /efs/cpk 0771 radio system

chmod 0644 /efs/redata.bin

chmod 0644 /efs/cpk/redata.bin

chown radio radio /efs/h2k.dat

chown radio radio /efs/cpk/h2k.dat

chmod 0644 /efs/h2k.dat

chmod 0644 /efs/cpk/h2k.dat

chown system system /efs/drm/h2k

# icd

check_icd

chown system system /dev/icd

chmod 0644 /dev/icd

chown system system /dev/icdr

chmod 0644 /dev/icdr

chown system system /dev/tzic

restorecon /dev/icd

restorecon /dev/icdr

# SideSync

chown system system /dev/android_ssusbcon

chmod 0660 /dev/android_ssusbcon

# mobicore

mkdir /data/app/mcRegistry 0775 system system

mkdir /data/app/mcRegistry/TbStorage 0700 system system

mkdir /efs/TEE 0770 radio system

# MTP permission

chmod 0660 /dev/usb_mtp_gadget

chown system mtp /dev/usb_mtp_gadget

mkdir /dev/socket/mtp 0770 system mtp

# create uibc dir

mkdir /dev/socket/uibc 0777 media system

chown media system /dev/socket/uibc

chmod 0775 /dev/socket/uibc

# Vibetonz

chmod 0660 /dev/tspdrv

chown vibe vibe /dev/tspdrv

# for BT MAC address

mkdir /efs/bluetooth 0775 radio system

# if already exist

chown radio system /efs/bluetooth

chmod 0775 /efs/bluetooth

on boot

# Set vibrator intensity 75%

write /sys/devices/virtual/timed_output/vibrator/intensity 7500

#setprop ro.radio.noril yes

# IPSec for VOLTE

chown root system /dev/socket

chmod 0775 /dev/socket

# Allow to access debugfs

chmod 755 /sys/kernel/debug

# Allow to access HMP-settings

chown system system /sys/kernel/hmp/boost

chown system system /sys/kernel/hmp/semiboost

chown system system /sys/kernel/hmp/active_down_migration

chown system system /sys/kernel/hmp/aggressive_up_migration

chown system system /sys/kernel/hmp/sb_down_threshold

chown system system /sys/kernel/hmp/sb_up_threshold

# Set up kernel tracing, but disable it by default

chmod 0222 /sys/kernel/debug/tracing/trace_marker

write /sys/kernel/debug/tracing/tracing_on 0

# ASV

chown system system /d/asv_summary

chown bluetooth bluetooth /dev/ttySAC4

chmod 0660 /dev/ttySAC4

# mobicore

chmod 0660 /dev/s5p-smem

chmod 0660 /dev/t-base-tui

chown system system /dev/s5p-smem

chown system system /dev/t-base-tui

export MC_AUTH_TOKEN_PATH /efs

# sem_daemon permission

chown system system /efs/sec_efs/ssp_data

chmod 0644 /efs/sec_efs/ssp_data

# DRK permission

mkdir /efs/prov 0770 radio system

mkdir /efs/prov_data 0770 radio system

chown radio system /efs/prov_data/dev_root

chmod 0770 /efs/prov_data/dev_root

chown radio system /efs/prov_data/knox

chmod 0770 /efs/prov_data/knox

chown radio system /efs/prov_data/dev_root/dev_root.dat

chmod 0640 /efs/prov_data/dev_root/dev_root.dat

chown radio system /efs/prov/libdevkm.lock

chmod 0660 /efs/prov/libdevkm.lock

write /efs/prov/ffffffff00000000000000000000000c.tlbin 0

chown radio system /efs/prov/ffffffff00000000000000000000000c.tlbin

chmod 0660 /efs/prov/ffffffff00000000000000000000000c.tlbin

# CS socket

mkdir /dev/socket/cs_socket 0770 system system

# MSP FactoryApp

mkdir /efs/FactoryApp 0775 system system

# permissions for bluetooth.

setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"

chown bluetooth bluetooth ro.bt.bdaddr_path

chown radio bluetooth /efs/bluetooth/bt_addr

chmod 0640 /efs/bluetooth/bt_addr

chmod 0660 /sys/class/rfkill/rfkill0/state

chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state

chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type

# for datarouter

chown system system /dev/dun

chown system system /dev/ttyGS0

chown system system /dev/ttyGS1

chown system system /dev/ttyGS2

chown system system /dev/ttyGS3

# Permissions for usb_lock

chown system radio /sys/class/android_usb/android0/usb_lock

# SSWAP

write /proc/sys/vm/swappiness 130

# FM Radio

chmod 0640 /dev/fmradio

chown system system /dev/fmradio

on fs

mount_all /fstab.samsungexynos7420

# For Absolute Persistence Partition

mkdir /persdata 0755 system system

mkdir /persdata/absolute 0750 system system

wait /dev/block/platform/15570000.ufs/by-name/PERSDATA

check_fs /dev/block/platform/15570000.ufs/by-name/PERSDATA ext4

mount ext4 /dev/block/platform/15570000.ufs/by-name/PERSDATA /persdata/absolute nosuid nodev barrier=1

chown system system /persdata

chmod 0755 /persdata

chown system system /persdata/absolute

chmod 0750 /persdata/absolute

# For SBFS partition

mkdir /sbfs 0755 system system

wait /dev/block/platform/15570000.ufs/by-name/SBFS

check_fs /dev/block/platform/15570000.ufs/by-name/SBFS ext4

mount ext4 /dev/block/platform/15570000.ufs/by-name/SBFS /sbfs nosuid nodev barrier=1

chown system system /sbfs

chmod 0755 /sbfs

# Permissions for TouchScreen

chown system radio /sys/class/sec/tsp/cmd

chown system system /sys/class/sec/tsp/input/enabled

# Permissions for ZEROFLTE PowerHAL

chown system system /sys/class/input/input0/enabled

chown system system /sys/class/input/input1/enabled

chmod 0660 /sys/class/input/input0/enabled

chmod 0660 /sys/class/input/input1/enabled

# Permissions for Touchkey

chown system radio /sys/class/sec/sec_touchkey/brightness

chown system radio /sys/class/sec/sec_touchkey/touchkey_firm_update

chown system radio /sys/class/sec/sec_touchkey/touch_sensitivity

chown system radio /sys/class/sec/sec_touchkey/glove_mode

chown system radio /sys/class/sec/sec_touchkey/flip_mode

chown system radio /sys/class/sec/sec_touchkey/keyboard_mode

chown system radio /sys/class/sec/sec_touchkey/boost_level

chown system radio /sys/class/sec/sec_touchkey/tkey_int_ctrl

chown system system /sys/class/sec/sec_touchkey/input/enabled

# Permissions for gpio_keys

chown radio system /sys/class/sec/sec_key/wakeup_keys

write /sys/class/sec/sec_key/wakeup_keys 116,172

# Permissions for input_booster

chown system radio /sys/class/input_booster/level

chown system radio /sys/class/input_booster/head

chown system radio /sys/class/input_booster/tail

# Permissions for EFS

chown radio system /efs

chmod 0771 /efs

# Fingerprint

mkdir /dev/validity 0770 system system

# Permissions for ION

chmod 0660 /sys/class/ion_cma/ion_video_ext/isolated

chown system system /sys/class/ion_cma/ion_video_ext/isolated

# Permissions for backlight

chmod 0660 /sys/class/backlight/panel/brightness

chown system system /sys/class/backlight/panel/brightness

chown system system /sys/class/backlight/panel/auto_brightness

# Permissions for LCD HMT

chown system system /sys/class/lcd/panel/hmt_on

chown system system /sys/class/lcd/panel/hmt_bright

chown system system /sys/class/mdnie/mdnie/hmt_color_temperature

# Permissions for LCD ALPM

chown system system /sys/class/lcd/panel/alpm

# Permissions for LCD

chown system radio /sys/class/lcd/panel/manufacture_code

chown system radio /sys/class/lcd/panel/lcd_type

chown system system /sys/class/lcd/panel/siop_enable

chown system system /sys/class/lcd/panel/temperature

chown system media_rw /sys/class/backlight/panel/weakness_hbm_comp

# Permissions for MDNIE

chown system media_rw /sys/class/mdnie/mdnie/mode

chown system media_rw /sys/class/mdnie/mdnie/scenario

chown system system /sys/class/mdnie/mdnie/accessibility

chown system system /sys/class/mdnie/mdnie/auto_brightness

chown system system /sys/class/mdnie/mdnie/sensorRGB

# Permissions for System LSI NFC

# NFC : Permissions for NFC

chmod 0660 /dev/sec-nfc

# NFC : change owner

chown nfc nfc /dev/sec-nfc

# Permissions for NXP NFC

# NFC : Permissions for NFC

chmod 0660 /dev/pn547

# NFC : change owner

chown nfc nfc /dev/pn547

# Permissions for NXP ESE

chmod 0660 /dev/p61

chown system system /dev/p61

# Permissions for S.LSI ESE

chmod 0660 /dev/p3

chown system system /dev/p3

# terminal mode

chmod 0660 /sys/class/android_usb/android0/terminal_version

chown system system /sys/class/android_usb/android0/terminal_version

# SENSORS

# Fingerprint_sensor

chown system radio /sys/class/fingerprint/fingerprint/type_check

chown system radio /sys/class/fingerprint/fingerprint/name

chown system radio /sys/class/fingerprint/fingerprint/vendor

chown system radio /sys/class/fingerprint/fingerprint/regulator

chown system radio /sys/class/fingerprint/fingerprint/wakelocks

# Accelerometer_sensor

chown system radio /sys/class/sensors/accelerometer_sensor/raw_data

chown system radio /sys/class/sensors/accelerometer_sensor/calibration

chown system radio /sys/class/sensors/accelerometer_sensor/reactive_alert

chown system radio /sys/class/sensors/accelerometer_sensor/vendor

chown system radio /sys/class/sensors/accelerometer_sensor/name

chown system radio /sys/class/sensors/accelerometer_sensor/selftest

chown system radio /sys/class/sensors/accelerometer_sensor/lowpassfilter

# Proximity_sensor

chown system radio /sys/class/sensors/proximity_sensor/state

chown system radio /sys/class/sensors/proximity_sensor/raw_data

chown system radio /sys/class/sensors/proximity_sensor/prox_avg

chown system radio /sys/class/sensors/proximity_sensor/prox_cal

chown system radio /sys/class/sensors/proximity_sensor/vendor

chown system radio /sys/class/sensors/proximity_sensor/name

chown system radio /sys/class/sensors/proximity_sensor/thresh_high

chown system radio /sys/class/sensors/proximity_sensor/thresh_low

chown system radio /sys/class/sensors/proximity_sensor/barcode_emul_en

chown system radio /sys/class/sensors/proximity_sensor/prox_offset_pass

chown system radio /sys/class/sensors/proximity_sensor/prox_trim

chown system radio /sys/class/sensors/proximity_sensor/prox_probe

# Light_sensor

chown system radio /sys/class/sensors/light_sensor/lux

chown system radio /sys/class/sensors/light_sensor/raw_data

chown system radio /sys/class/sensors/light_sensor/vendor

chown system radio /sys/class/sensors/light_sensor/name

# Gyro_sensor

chown system radio /sys/class/sensors/gyro_sensor/power_on

chown system radio /sys/class/sensors/gyro_sensor/power_off

chown system radio /sys/class/sensors/gyro_sensor/temperature

chown system radio /sys/class/sensors/gyro_sensor/selftest

chown system radio /sys/class/sensors/gyro_sensor/selftest_dps

chown system radio /sys/class/sensors/gyro_sensor/vendor

chown system radio /sys/class/sensors/gyro_sensor/name

# Barometer_sensor

chown system radio /sys/class/sensors/barometer_sensor/sea_level_pressure

chown system radio /sys/class/sensors/barometer_sensor/vendor

chown system radio /sys/class/sensors/barometer_sensor/name

chown system radio /sys/class/sensors/barometer_sensor/calibration

chown system radio /sys/class/sensors/barometer_sensor/temperature

# Magnetic_sensor

chown system radio /sys/class/sensors/magnetic_sensor/raw_data

chown system radio /sys/class/sensors/magnetic_sensor/vendor

chown system radio /sys/class/sensors/magnetic_sensor/name

# HRM_sensor

chown system radio /sys/class/sensors/hrm_sensor/name

chown system radio /sys/class/sensors/hrm_sensor/vendor

chown system radio /sys/class/sensors/hrm_sensor/led_current

chown system radio /sys/class/sensors/hrm_sensor/led_current1

chown system radio /sys/class/sensors/hrm_sensor/led_current2

chown system radio /sys/class/sensors/hrm_sensor/led_current3

chown system radio /sys/class/sensors/hrm_sensor/led_current4

chown system radio /sys/class/sensors/hrm_sensor/hr_range

chown system radio /sys/class/sensors/hrm_sensor/hr_range2

chown system radio /sys/class/sensors/hrm_sensor/look_mode_ir

chown system radio /sys/class/sensors/hrm_sensor/look_mode_red

chown system radio /sys/class/sensors/hrm_sensor/eol_test

chown system radio /sys/class/sensors/hrm_sensor/eol_test_result

chown system radio /sys/class/sensors/hrm_sensor/eol_test_status

chown system radio /sys/class/sensors/hrm_sensor/int_pin_check

chown system radio /sys/class/sensors/hrm_sensor/lib_ver

chown system radio /sys/class/sensors/hrm_sensor/regulator

chown system radio /sys/class/sensors/hrm_sensor/part_type

chown system radio /sys/class/sensors/hrm_sensor/device_id

chown system radio /sys/class/sensors/hrm_sensor/hrm_flush

chown system radio /sys/class/sensors/hrm_sensor/threshold

chown system radio /sys/class/sensors/hrm_sensor/alc_enable

# HRMLED_sensor

chown system radio /sys/class/sensors/hrmled_sensor/name

chown system radio /sys/class/sensors/hrmled_sensor/vendor

chown system radio /sys/class/sensors/hrmled_sensor/hrmled_flush

# UV_sensor

chown system radio /sys/class/sensors/uv_sensor/name

chown system radio /sys/class/sensors/uv_sensor/vendor

chown system radio /sys/class/sensors/uv_sensor/uv_lib_ver

chown system radio /sys/class/sensors/uv_sensor/uv_sr_interval

chown system radio /sys/class/sensors/uv_sensor/uv_eol_test

chown system radio /sys/class/sensors/uv_sensor/uv_flush

# Grip_sensor

chown system radio /sys/class/sensors/grip_sensor/name

chown system radio /sys/class/sensors/grip_sensor/vendor

chown system radio /sys/class/sensors/grip_sensor/raw_data

chown system radio /sys/class/sensors/grip_sensor/threshold

chown system radio /sys/class/sensors/grip_sensor/calibration

chown system radio /sys/class/sensors/grip_sensor/onoff

chown system radio /sys/class/sensors/grip_sensor/reset

chown system radio /sys/class/sensors/grip_sensor/mode

chown system radio /sys/class/sensors/grip_sensor/gain

chown system radio /sys/class/sensors/grip_sensor/start

chown system radio /sys/class/sensors/grip_sensor/slope

chown system radio /sys/class/sensors/grip_sensor/temp

chown system radio /sys/class/sensors/grip_sensor/temp_cal

chown system radio /sys/class/sensors/grip_sensor/capmain

# SensorHub

chown system radio /sys/class/sensors/ssp_sensor/enable

chown system radio /sys/class/sensors/ssp_sensor/mcu_rev

chown system radio /sys/class/sensors/ssp_sensor/mcu_name

chown system radio /sys/class/sensors/ssp_sensor/mcu_test

chown system radio /sys/class/sensors/ssp_sensor/mcu_reset

chown system radio /sys/class/sensors/ssp_sensor/mcu_update

chown system radio /sys/class/sensors/ssp_sensor/mcu_sleep_test

chown system radio /sys/class/sensors/ssp_sensor/ori_poll_delay

# Sensorhub IIO

chown system radio /sys/class/sensors/ssp_sensor/accel_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/rot_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/game_rot_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/step_det_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/gyro_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/uncalib_gyro_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/mag_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/uncal_mag_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/light_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/pressure_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/prox_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/sig_motion_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/step_cnt_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/uncal_gyro_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/interrupt_gyro_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/tilt_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/pickup_poll_delay

chown system radio /sys/class/sensors/ssp_sensor/ssp_flush

chown system radio /sys/class/sensors/ssp_sensor/int_gyro_enable

chown system radio /sys/class/sensors/ssp_sensor/sensor_state

chmod 0600 /dev/batch_io

chown system system /dev/batch_io

# MOBEAM

chown system radio /sys/class/sec/sec_barcode_emul/vendor

chown system radio /sys/class/sec/sec_barcode_emul/name

chown system radio /sys/class/sec/sec_barcode_emul/barcode_send

chown system radio /sys/class/sec/sec_barcode_emul/barcode_led_status

chown system radio /sys/class/sec/sec_barcode_emul/barcode_ver_check

# IRLED_sensor

chown system radio /sys/class/sensors/irled_remote/name

chown system radio /sys/class/sensors/irled_remote/vendor

chown system radio /sys/class/sensors/irled_remote/irled_send

chown system radio /sys/class/sensors/irled_remote/irled_send_result

# Default MDNIE mode (cinema)

write /sys/class/mdnie/mdnie/mode 3

# Copy DRM Key

copy /system/app/wv.keys /factory/wv.keys

# Permission for DRM Key

chmod 0644 /factory/wv.keys

# ARGOSD network_throughput

chown system system /dev/network_throughput

# TSP & Pressure Sensor

chown system system /dev/i2c-7

chmod 0660 /dev/i2c-7

# NFC_NXP

setprop ro.nfc.port "I2C"

chmod 0660 /dev/pn547

chown nfc nfc /dev/pn547

# NFC_BROADCOM

chmod 0600 /dev/bcm2079x

chown nfc nfc /dev/bcm2079x

# NFC_SLSI

chmod 0660 /dev/sec-nfc

chown nfc nfc /dev/sec-nfc

# MST/NFC Switch

chown spay system /dev/mst_ctrl

chmod 0660 /dev/mst_ctrl

# permission for TSP, Touchkey and Wacom

chown system radio /sys/class/sec/tsp/cmd

chmod 0660 /sys/class/sec/tsp/input/enabled

chown system system /sys/class/sec/tsp/input/enabled

chmod 0660 /sys/class/sec_touchkey/input/enabled

chown system system /sys/class/sec/sec_touchkey/input/enabled

chown system radio /sys/class/sec/sec_touchkey/brightness

chmod 0660 /sys/class/sec/sec_epen/input/enabled

chown system system /sys/class/sec/sec_epen/input/enabled

# Switch Device

chown system radio /sys/class/sec/switch/usb_sel

chown system radio /sys/class/sec/switch/uart_sel

chown system radio /sys/class/sec/switch/uart_en

chown system radio /sys/class/sec/switch/otg_test

chown system radio /sys/class/sec/switch/apo_factory

chown system radio /sys/class/sec/switch/afc_disable

chown system radio /sys/class/sec/switch/wireless

# GPIO DVS

chown radio system /sys/class/secgpio_check/secgpio_check_all/gpioinit_check

chown radio system /sys/class/secgpio_check/secgpio_check_all/gpiosleep_check

chown radio system /sys/class/secgpio_check/secgpio_check_all/checked_sleepGPIO

# Sensors permissions

# Accelerometer_sensor

chown system radio /sys/class/sensors/accelerometer_sensor/raw_data

chown system radio /sys/class/sensors/accelerometer_sensor/calibration

chown system radio /sys/class/sensors/accelerometer_sensor/reactive_alert

chown system radio /sys/class/sensors/accelerometer_sensor/selftest

chown system radio /sys/class/sensors/accelerometer_sensor/vendor

chown system radio /sys/class/sensors/accelerometer_sensor/name

chown system system /efs/calibration_data

chmod 0666 /efs/calibration_data

# Proximity_sensor

chown system radio /sys/class/sensors/proximity_sensor/state

chown system radio /sys/class/sensors/proximity_sensor/raw_data

chown system radio /sys/class/sensors/proximity_sensor/prox_avg

chown system radio /sys/class/sensors/proximity_sensor/prox_cal

chown system radio /sys/class/sensors/proximity_sensor/prox_thresh

chown system radio /sys/class/sensors/proximity_sensor/thresh_high

chown system radio /sys/class/sensors/proximity_sensor/thresh_low

chown system radio /sys/class/sensors/proximity_sensor/vendor

chown system radio /sys/class/sensors/proximity_sensor/name

# Light_sensor

chown system radio /sys/class/sensors/light_sensor/lux

chown system radio /sys/class/sensors/light_sensor/raw_data

chown system radio /sys/class/sensors/light_sensor/vendor

chown system radio /sys/class/sensors/light_sensor/name

# Gyro_sensor

chown system radio /sys/class/sensors/gyro_sensor/power_on

chown system radio /sys/class/sensors/gyro_sensor/power_off

chown system radio /sys/class/sensors/gyro_sensor/temperature

chown system radio /sys/class/sensors/gyro_sensor/selftest

chown system radio /sys/class/sensors/gyro_sensor/selftest_dps

chown system radio /sys/class/sensors/gyro_sensor/vendor

chown system radio /sys/class/sensors/gyro_sensor/name

# Magnetic_sensor

chown system radio /sys/class/sensors/magnetic_sensor/raw_data

chown system radio /sys/class/sensors/magnetic_sensor/vendor

chown system radio /sys/class/sensors/magnetic_sensor/name

# MPL IIO

chown system system /dev/invensense

chown system system /sys/bus/iio/devices/invensense/buffer/enable

chown system system /sys/bus/iio/devices/invensense/buffer/length

chown system system /sys/bus/iio/devices/invensense/control

chmod 0660 /dev/invensense

chmod 0664 /sys/bus/iio/devices/invensense/buffer/enable

chmod 0664 /sys/bus/iio/devices/invensense/buffer/length

chmod 0664 /sys/bus/iio/devices/invensense/control

# usb detect

mkdir /dev/bus 0755 root root

mkdir /dev/bus/usb 0755 root root

# OTG Test

chown system radio /sys/class/host_notify/usb_otg/booster

chmod 0664 /sys/class/host_notify/usb_otg/booster

# usb disable

chown system usb /sys/class/usb_notify/usb_control/disable

chmod 0664 /sys/class/usb_notify/usb_control/disable

# sdc block device

chown system system /sys/android_touch/doubletap2wake

chmod 0664 /sys/android_touch/doubletap2wake