blob: 3c9f7ff57869aa05dee4bec8168a33a311fc66c0 [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
# 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
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
# RIL for multi rild
on property:ro.multisim.simslotcount=2
service ril-daemon2 /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
group radio cache inet misc audio log qcom_diag sdcard_r shell sdcard_rw system drmrpc
# 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
# 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