blob: a22e1907fb6f4a6e397476ace88f32100f15f597 [file] [log] [blame]
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04001# Copyright (C) 2012 The Android Open Source Project
2#
3# IMPORTANT: Do not create world writable files or directories.
4# This is a common source of Android security bugs.
5#
6
7on early-boot
8 chown bluetooth net_bt_stack /dev/ttyHS0
9 chmod 0660 /dev/ttyHS0
10
11on boot
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -040012
13# MSP FactoryApp
14 mkdir /efs/FactoryApp 0775 system system
15
16# Audio NXP
17 chmod 0660 /dev/i2c-1
18 chown system system /dev/i2c-1
19
20# NFC_NXP
21 setprop ro.nfc.port "I2C"
22 chmod 0600 /dev/pn547
23 chown nfc nfc /dev/pn547
24
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040025# permissions for bluetooth.
26 setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
27 chown bluetooth net_bt_stack ro.bt.bdaddr_path
28 chown radio net_bt_stack /efs/bluetooth/bt_addr
29 chmod 0644 /efs/bluetooth/bt_addr
30 chmod 0660 /sys/class/rfkill/rfkill0/state
31 chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
32 chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
33
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -040034# IPSec for VOLTE
35 chown root system /dev/socket
36 chmod 0775 /dev/socket
37
38# IPSec for VOLTE
39 service ipsec-daemon /system/bin/IPSecService
40 class main
41 socket ipsec_socket stream 660 system system
42 user system
43 group system net_raw inet net_admin
44
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040045on fs
46
47# Support Preload install apks
48 mkdir /preload 0771 system system
49
50# efs
51 mkdir /efs/drm 0700 system system
52 mkdir /efs/imei 0775 radio radio
53 restorecon -R /efs
54
55#For Absolute Persistence Partition
56
57 mkdir /persdata 0755 system system
58 mkdir /persdata/absolute 0750 system system
59
60 wait /dev/block/bootdevice/by-name/persdata
61 check_fs /dev/block/bootdevice/by-name/persdata ext4
62 mount ext4 /dev/block/bootdevice/by-name/persdata /persdata/absolute nosuid nodev barrier=1
63
64 chown system system /persdata
65 chmod 0755 /persdata
66 chown system system /persdata/absolute
67 chmod 0750 /persdata/absolute
68
69# Permissions for svc led
70 chown system system /sys/class/sec/led/led_r
71 chown system system /sys/class/sec/led/led_g
72 chown system system /sys/class/sec/led/led_b
73 chown system system /sys/class/sec/led/led_pattern
74 chown system system /sys/class/sec/led/led_blink
75 chown system system /sys/class/sec/led/led_lowpower
76
77# permissons for uartsel & usbsel sysfs
78 chmod 0660 /sys/class/sec/switch/uart_en
79 chmod 0660 /sys/class/sec/switch/uart_sel
80 chmod 0660 /sys/class/sec/switch/usb_sel
81 chown system system /sys/class/sec/switch/uart_en
82 chown system system /sys/class/sec/switch/uart_sel
83 chown system system /sys/class/sec/switch/usb_sel
84
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040085# fm_radio
86 chmod 0640 /dev/radio0
87 chown system system /dev/radio0
88
89# Kickstart the Wireless subsystem
90write /dev/wcnss_wlan 1
91write /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr 1
92service ftm_ptt /system/bin/ftm_ptt -d
93 user root
94 group radio system
95 disabled
96
97# umount service
98service umount_service /system/bin/umount /preload
99 disabled
100 oneshot
101
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400102# diag app for cp uart
103service diag_uart_log /system/bin/diag_uart_log
104 class main
105 user root
106 group radio
107
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400108# Support Preload install apks
109on property:persist.sys.storage_preload=1
110 mount ext4 /dev/block/bootdevice/by-name/hidden /preload nosuid nodev ro barrier=1
111 setprop storage.preload.complete 1
112
113on property:persist.sys.storage_preload=0
114 start umount_service
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400115