Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 1 | # 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 | |
| 7 | on early-boot |
| 8 | chown bluetooth net_bt_stack /dev/ttyHS0 |
| 9 | chmod 0660 /dev/ttyHS0 |
| 10 | |
| 11 | on 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 | |
| 21 | on 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 Zvikaramba | 1ffaaca | 2016-07-24 20:33:26 -0400 | [diff] [blame] | 61 | # RIL for multi rild |
| 62 | on property:ro.multisim.simslotcount=2 |
| 63 | service 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 Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 70 | # fm_radio |
| 71 | chmod 0640 /dev/radio0 |
| 72 | chown system system /dev/radio0 |
| 73 | |
| 74 | # Kickstart the Wireless subsystem |
| 75 | write /dev/wcnss_wlan 1 |
| 76 | write /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr 1 |
| 77 | service ftm_ptt /system/bin/ftm_ptt -d |
| 78 | user root |
| 79 | group radio system |
| 80 | disabled |
| 81 | |
| 82 | # umount service |
| 83 | service umount_service /system/bin/umount /preload |
| 84 | disabled |
| 85 | oneshot |
| 86 | |
| 87 | # Support Preload install apks |
| 88 | on 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 | |
| 92 | on property:persist.sys.storage_preload=0 |
| 93 | start umount_service |