blob: a22e1907fb6f4a6e397476ace88f32100f15f597 [file] [log] [blame]
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
on early-boot
chown bluetooth net_bt_stack /dev/ttyHS0
chmod 0660 /dev/ttyHS0
on boot
# MSP FactoryApp
mkdir /efs/FactoryApp 0775 system system
# Audio NXP
chmod 0660 /dev/i2c-1
chown system system /dev/i2c-1
# NFC_NXP
setprop ro.nfc.port "I2C"
chmod 0600 /dev/pn547
chown nfc nfc /dev/pn547
# permissions for bluetooth.
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
chown bluetooth net_bt_stack ro.bt.bdaddr_path
chown radio net_bt_stack /efs/bluetooth/bt_addr
chmod 0644 /efs/bluetooth/bt_addr
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
# IPSec for VOLTE
chown root system /dev/socket
chmod 0775 /dev/socket
# IPSec for VOLTE
service ipsec-daemon /system/bin/IPSecService
class main
socket ipsec_socket stream 660 system system
user system
group system net_raw inet net_admin
on fs
# Support Preload install apks
mkdir /preload 0771 system system
# efs
mkdir /efs/drm 0700 system system
mkdir /efs/imei 0775 radio radio
restorecon -R /efs
#For Absolute Persistence Partition
mkdir /persdata 0755 system system
mkdir /persdata/absolute 0750 system system
wait /dev/block/bootdevice/by-name/persdata
check_fs /dev/block/bootdevice/by-name/persdata ext4
mount ext4 /dev/block/bootdevice/by-name/persdata /persdata/absolute nosuid nodev barrier=1
chown system system /persdata
chmod 0755 /persdata
chown system system /persdata/absolute
chmod 0750 /persdata/absolute
# Permissions for svc led
chown system system /sys/class/sec/led/led_r
chown system system /sys/class/sec/led/led_g
chown system system /sys/class/sec/led/led_b
chown system system /sys/class/sec/led/led_pattern
chown system system /sys/class/sec/led/led_blink
chown system system /sys/class/sec/led/led_lowpower
# permissons for uartsel & usbsel sysfs
chmod 0660 /sys/class/sec/switch/uart_en
chmod 0660 /sys/class/sec/switch/uart_sel
chmod 0660 /sys/class/sec/switch/usb_sel
chown system system /sys/class/sec/switch/uart_en
chown system system /sys/class/sec/switch/uart_sel
chown system system /sys/class/sec/switch/usb_sel
# fm_radio
chmod 0640 /dev/radio0
chown system system /dev/radio0
# Kickstart the Wireless subsystem
write /dev/wcnss_wlan 1
write /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr 1
service ftm_ptt /system/bin/ftm_ptt -d
user root
group radio system
disabled
# umount service
service umount_service /system/bin/umount /preload
disabled
oneshot
# diag app for cp uart
service diag_uart_log /system/bin/diag_uart_log
class main
user root
group radio
# Support Preload install apks
on property:persist.sys.storage_preload=1
mount ext4 /dev/block/bootdevice/by-name/hidden /preload nosuid nodev ro barrier=1
setprop storage.preload.complete 1
on property:persist.sys.storage_preload=0
start umount_service