blob: 3c9f7ff57869aa05dee4bec8168a33a311fc66c0 [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
12# permissions for bluetooth.
13 setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
14 chown bluetooth net_bt_stack ro.bt.bdaddr_path
15 chown radio net_bt_stack /efs/bluetooth/bt_addr
16 chmod 0644 /efs/bluetooth/bt_addr
17 chmod 0660 /sys/class/rfkill/rfkill0/state
18 chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
19 chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
20
21on fs
22
23# Support Preload install apks
24 mkdir /preload 0771 system system
25
26# efs
27 mkdir /efs/drm 0700 system system
28 mkdir /efs/imei 0775 radio radio
29 restorecon -R /efs
30
31#For Absolute Persistence Partition
32
33 mkdir /persdata 0755 system system
34 mkdir /persdata/absolute 0750 system system
35
36 wait /dev/block/bootdevice/by-name/persdata
37 check_fs /dev/block/bootdevice/by-name/persdata ext4
38 mount ext4 /dev/block/bootdevice/by-name/persdata /persdata/absolute nosuid nodev barrier=1
39
40 chown system system /persdata
41 chmod 0755 /persdata
42 chown system system /persdata/absolute
43 chmod 0750 /persdata/absolute
44
45# Permissions for svc led
46 chown system system /sys/class/sec/led/led_r
47 chown system system /sys/class/sec/led/led_g
48 chown system system /sys/class/sec/led/led_b
49 chown system system /sys/class/sec/led/led_pattern
50 chown system system /sys/class/sec/led/led_blink
51 chown system system /sys/class/sec/led/led_lowpower
52
53# permissons for uartsel & usbsel sysfs
54 chmod 0660 /sys/class/sec/switch/uart_en
55 chmod 0660 /sys/class/sec/switch/uart_sel
56 chmod 0660 /sys/class/sec/switch/usb_sel
57 chown system system /sys/class/sec/switch/uart_en
58 chown system system /sys/class/sec/switch/uart_sel
59 chown system system /sys/class/sec/switch/usb_sel
60
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -040061# RIL for multi rild
62on property:ro.multisim.simslotcount=2
63service ril-daemon2 /system/bin/rild -l /system/lib/libsec-ril-dsds.so -c 2
64 class main
65 socket rild2 stream 660 root radio
66 socket rild-debug2 stream 660 radio system
67 user root
68 group radio cache inet misc audio log qcom_diag sdcard_r shell sdcard_rw system drmrpc
69
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040070# fm_radio
71 chmod 0640 /dev/radio0
72 chown system system /dev/radio0
73
74# Kickstart the Wireless subsystem
75write /dev/wcnss_wlan 1
76write /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr 1
77service ftm_ptt /system/bin/ftm_ptt -d
78 user root
79 group radio system
80 disabled
81
82# umount service
83service umount_service /system/bin/umount /preload
84 disabled
85 oneshot
86
87# Support Preload install apks
88on property:persist.sys.storage_preload=1
89 mount ext4 /dev/block/bootdevice/by-name/hidden /preload nosuid nodev ro barrier=1
90 setprop storage.preload.complete 1
91
92on property:persist.sys.storage_preload=0
93 start umount_service