205 lines
6.5 KiB
Text
205 lines
6.5 KiB
Text
# Copyright (C) 2012 The Android Open Source Project
|
|
#
|
|
# IMPORTANT: Do not create world writable files or directories.
|
|
# This is a common source of Android security bugs.
|
|
#
|
|
|
|
on init
|
|
|
|
on fs
|
|
|
|
#For Verizon Device Stats Partition
|
|
mkdir /vzw 0755 system system
|
|
|
|
chown system system /vzw
|
|
chmod 0755 /vzw
|
|
|
|
on boot
|
|
# permission for MUIC(waterproof)
|
|
chown system radio /sys/class/sec/switch/uart_en
|
|
|
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
|
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
|
|
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
|
|
chown system system /sys/module/sco/parameters/disable_esco
|
|
chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
|
|
chown system system /sys/module/msm_core/parameters/polling_interval
|
|
chown system system /sys/module/msm_core/parameters/disabled
|
|
chown system system /sys/kernel/debug/msm_core/enable
|
|
chown system system /sys/kernel/debug/msm_core/ptable
|
|
chown system system /sys/kernel/boot_slpi/ssr
|
|
chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
|
|
chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
|
|
chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set
|
|
chmod 0660 /sys/class/rfkill/rfkill0/state
|
|
chmod 0660 /proc/bluetooth/sleep/proto
|
|
chown bluetooth net_bt /dev/ttyHS0
|
|
chmod 0660 /dev/ttyHS0
|
|
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
|
|
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
|
|
|
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
|
|
chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
|
|
|
|
# for BT MAC address
|
|
mkdir /efs/bluetooth 0770 system bluetooth
|
|
# if already exist
|
|
chown system bluetooth /efs/bluetooth
|
|
chown system bluetooth /efs/bluetooth/bt_addr
|
|
chmod 0770 /efs/bluetooth
|
|
chmod 0640 /efs/bluetooth/bt_addr
|
|
# permissions for bluetooth.
|
|
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
|
|
chown bluetooth bluetooth ro.bt.bdaddr_path
|
|
|
|
# bluetooth LPM
|
|
chmod 0660 /proc/bluetooth/sleep/lpm
|
|
chmod 0220 /proc/bluetooth/sleep/btwrite
|
|
chown bluetooth bluetooth /proc/bluetooth/sleep/lpm
|
|
chown bluetooth bluetooth /proc/bluetooth/sleep/btwrite
|
|
chmod 0600 /dev/btlock
|
|
chown bluetooth bluetooth /dev/btlock
|
|
|
|
# permission for touchkey grip
|
|
chown system radio /sys/class/sec/sec_touchkey/sar_enable
|
|
chown system radio /sys/class/sec/sec_touchkey/sw_reset
|
|
|
|
# op mode for charger
|
|
chmod 0664 /sys/class/power_supply/sm5705-charger/charger_op_mode
|
|
chown system radio /sys/class/power_supply/sm5705-charger/charger_op_mode
|
|
|
|
# Permissions for Charging
|
|
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/store_mode
|
|
|
|
# bluetooth
|
|
chown bluetooth bluetooth /dev/ttyHS0
|
|
chmod 0660 /dev/ttyHS0
|
|
|
|
# SSWAP
|
|
write /proc/sys/vm/swappiness 130
|
|
|
|
# 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 S.LSI ESE
|
|
chmod 0660 /dev/p3
|
|
chown system system /dev/p3
|
|
|
|
# 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
|
|
|
|
# Fingerprint
|
|
mkdir /dev/validity 0770 system system
|
|
|
|
# Fingerprint_sensor
|
|
chmod 0660 /dev/vfsspi
|
|
chmod 0660 /dev/esfp0
|
|
chown system system /dev/vfsspi
|
|
chown system system /dev/esfp0
|
|
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/adm
|
|
|
|
# SENSOR FRAMEWORK : starts fingerprintService
|
|
#service vcsFPService /system/bin/vcsFPService
|
|
# class late_start
|
|
# user system
|
|
# group system
|
|
#
|
|
# FINGERPRINT FRAMEWORK : starts fingerprintd
|
|
#service fingerprintd /system/bin/fingerprintd
|
|
# class late_start
|
|
# user system
|
|
# group system
|
|
#
|
|
on post-fs-data
|
|
# permissions for audio
|
|
chown system radio /sys/class/rt5508_cal/trigger
|
|
chown system radio /sys/class/rt5508_cal/status
|
|
chown system radio /sys/class/rt5508_cal/rt5508.0/gsense_otp
|
|
chown system radio /sys/class/rt5508_cal/rt5508.0/n20db
|
|
chown system radio /sys/class/rt5508_cal/rt5508.0/n15db
|
|
chown system radio /sys/class/rt5508_cal/rt5508.0/n10db
|
|
chown system radio /sys/class/rt5508_cal/rt5508.0/rspk
|
|
chown system radio /sys/class/rt5508_cal/rt5508.0/dcr_offset
|
|
|
|
mkdir /efs/richtek/rt5508_cal 0771 radio 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
|
|
chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
|
|
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
|
|
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
|
|
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/device/extldo
|
|
|
|
# sem_daemon permission
|
|
chown system system /efs/sec_efs/ssp_data
|
|
chmod 0644 /efs/sec_efs/ssp_data
|
|
|
|
|
|
# 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 net_bt /sys/class/rfkill/rfkill0/state
|
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
|
|
|
|
# sem_daemon
|
|
#service sem_daemon /system/bin/sem_daemon
|
|
# class core
|
|
# user system
|
|
# group system nfc
|
|
# disabled
|
|
#
|
|
#on property:sys.boot_completed=1
|
|
# setprop security.semdaemonfinish 0
|
|
# start sem_daemon
|
|
#
|
|
#on property:security.semdaemonfinish=1
|
|
# stop sem_daemon
|
|
#
|
|
# cooldown mode for lpm animation
|
|
on charger
|
|
mkdir /vzw 0744 system system
|
|
wait /dev/block/bootdevice/by-name/carrier
|
|
mount ext4 /dev/block/bootdevice/by-name/carrier /vzw nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
|
|
chown system system /vzw
|
|
chmod 0744 /vzw
|
|
|
|
# SSWAP
|
|
service swapon /sbin/sswap -s -f 2048
|
|
class core
|
|
user root
|
|
group root
|
|
seclabel u:r:sswap:s0
|
|
oneshot
|
|
|
|
# Bluetooth
|
|
on property:wc_transport.start_hci=true
|
|
start start_hci_filter
|
|
|
|
on property:wc_transport.start_hci=false
|
|
stop start_hci_filter
|
|
|
|
service start_hci_filter /system/bin/wcnss_filter
|
|
class late_start
|
|
user bluetooth
|
|
group bluetooth
|
|
disabled
|