1 import init.tuna.usb.rc 2 3 on init 4 # See storage config details at http://source.android.com/tech/storage/ 5 mkdir /mnt/shell/emulated 0700 shell shell 6 mkdir /storage/emulated 0555 root root 7 8 export EXTERNAL_STORAGE /storage/emulated/legacy 9 export EMULATED_STORAGE_SOURCE /mnt/shell/emulated 10 export EMULATED_STORAGE_TARGET /storage/emulated 11 12 # Support legacy paths 13 symlink /storage/emulated/legacy /sdcard 14 symlink /storage/emulated/legacy /mnt/sdcard 15 symlink /storage/emulated/legacy /storage/sdcard0 16 symlink /mnt/shell/emulated/0 /storage/emulated/legacy 17 18 on post-fs-data 19 mkdir /data/media 0770 media_rw media_rw 20 21 mkdir /data/misc/wifi 0770 wifi wifi 22 mkdir /data/misc/wifi/sockets 0770 wifi wifi 23 mkdir /data/misc/dhcp 0770 dhcp dhcp 24 chown dhcp dhcp /data/misc/dhcp 25 mkdir /data/smc 0770 drmrpc drmrpc 26 chown drmrpc drmrpc /data/smc/counter.bin 27 chown drmrpc drmrpc /data/smc/storage.bin 28 chown drmrpc drmrpc /data/smc/system.bin 29 30 # camera calibration 31 mkdir /data/misc/camera 0770 media media 32 mkdir /data/misc/camera/R5_MVEN003_LD2_ND0_IR0_SH0_FL1_SVEN003_DCCID1044 0770 media media 33 34 mkdir /data/radio 0775 radio radio 35 mkdir /data/radio/log 0775 radio radio 36 37 setprop vold.post_fs_data_done 1 38 39 # LTE 40 chown radio system /sys/devices/tuna_otg/usb_sel 41 chown radio system /sys/devices/tuna_otg/uart_sel 42 chown radio system /sys/bus/i2c/drivers/fsa9480/4-0025/switch 43 chmod 0660 /sys/bus/i2c/drivers/fsa9480/4-0025/switch 44 chmod 0660 /sys/devices/tuna_otg/uart_sel 45 chmod 0660 /sys/devices/tuna_otg/usb_sel 46 47 on boot 48 mount debugfs /sys/kernel/debug /sys/kernel/debug 49 chmod 0666 /dev/pvrsrvkm 50 51 # autosuspend root hubs immediatly after attached devices 52 write /sys/bus/usb/devices/usb1/power/autosuspend_delay_ms 0 53 write /sys/bus/usb/devices/usb2/power/autosuspend_delay_ms 0 54 55 on fs 56 mkdir /factory 0775 radio radio 57 mount_all /fstab.tuna 58 setprop ro.crypto.fuse_sdcard true 59 60 # change permissions for mtd device 61 chmod 0660 /dev/mtd/mtd0 62 chown media media /dev/mtd/mtd0 63 64 # change permissions for i2c-2 device 65 chmod 0660 /dev/i2c-2 66 chown media media /dev/i2c-2 67 68 # change permissions for Tiler driver 69 chmod 0777 /dev/tiler 70 chmod 0777 /dev/dmm 71 72 # change permissions for ION driver 73 chmod 0777 /dev/ion 74 75 # We chown/chmod /factory because mount is run as root + defaults 76 chown radio radio /factory 77 chmod 0775 /factory 78 79 # add symlink for HDCP key 80 symlink /factory/hdcp.keys /system/vendor/firmware/hdcp.keys 81 82 # nfc 83 setprop ro.nfc.port "COM4" 84 chmod 0600 /dev/ttyO3 85 chown nfc nfc /dev/ttyO3 86 chmod 0600 /sys/devices/platform/nfc-power/nfc_power 87 chown nfc nfc /sys/devices/platform/nfc-power/nfc_power 88 89 # permissions for bluetooth. 90 setprop ro.bt.bdaddr_path "/factory/bluetooth/bt_addr" 91 chown bluetooth bluetooth ro.bt.bdaddr_path 92 chown bluetooth bluetooth /dev/ttyO1 93 chmod 0600 /dev/ttyO1 94 chmod 0660 /sys/class/rfkill/rfkill0/state 95 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state 96 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type 97 98 # backlight 99 chown system system /sys/class/backlight/s6e8aa0/brightness 100 101 # leds 102 chown system system /dev/an30259a_leds 103 104 # for GPS 105 chown root system /sys/class/sec/gps/GPS_PWR_EN/value 106 chmod 0660 /sys/class/sec/gps/GPS_PWR_EN/value 107 chown root system /sys/class/sec/gps/GPS_nRST/value 108 chmod 0660 /sys/class/sec/gps/GPS_nRST/value 109 110 # ril control auto-suspend 111 chmod 0660 /sys/bus/usb/devices/usb1/power/control 112 chown radio radio /sys/bus/usb/devices/usb1/power/control 113 114 on property:persist.sys.tuna.off_mode=* 115 write /d/pm_debug/enable_off_mode ${persist.sys.tuna.off_mode} 116 117 on property:ril.modem.lte.powercontrol=* 118 write /sys/bus/usb/devices/1-1/power/control ${ril.modem.lte.powercontrol} 119 120 service fRom /system/bin/fRom \ 121 -x /data/misc/camera/R5_MVEN003_LD2_ND0_IR0_SH0_FL1_SVEN003_DCCID1044 \ 122 -d /dev/mtd/mtd0 123 user media 124 group media 125 class late_start 126 oneshot 127 128 service pvrsrvctl /vendor/bin/pvrsrvctl --start --no-module 129 class core 130 user root 131 group root 132 oneshot 133 134 # create filesystems if necessary 135 service setup_fs /system/bin/setup_fs \ 136 /dev/block/platform/omap/omap_hsmmc.0/by-name/cache \ 137 /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata 138 class core 139 user root 140 group root 141 oneshot 142 143 service tf_daemon /system/bin/tf_daemon \ 144 -d -c /vendor/etc/smc_normal_world_android_cfg.ini 145 class main 146 user drmrpc 147 group drmrpc 148 149 service smc_pa_wvdrm /system/bin/smc_pa_ctrl \ 150 -c /vendor/etc/smc_normal_world_android_cfg.ini \ 151 start /vendor/firmware/smc_pa_wvdrm.ift 152 class core 153 user drmrpc 154 group drmrpc 155 oneshot 156 157 # virtual sdcard daemon running as media_rw (1023) 158 service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023 159 class late_start 160 161 service p2p_supplicant /system/bin/wpa_supplicant \ 162 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \ 163 -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1 164 # we will start as root and wpa_supplicant will switch to user wifi 165 # after setting up the capabilities required for WEXT 166 # user wifi 167 # group wifi inet keystore 168 class main 169 socket wpa_wlan0 dgram 660 wifi wifi 170 disabled 171 oneshot 172 173 service wpa_supplicant /system/bin/wpa_supplicant \ 174 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin 175 # we will start as root and wpa_supplicant will switch to user wifi 176 # after setting up the capabilities required for WEXT 177 # user wifi 178 # group wifi inet keystore 179 class main 180 socket wpa_wlan0 dgram 660 wifi wifi 181 disabled 182 oneshot 183 184 service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL 185 class main 186 disabled 187 oneshot 188 189 service dhcpcd_p2p /system/bin/dhcpcd -aABKL 190 class main 191 disabled 192 oneshot 193 194 service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL 195 class main 196 disabled 197 oneshot 198 199 service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL 200 class main 201 disabled 202 oneshot 203 204 service iprenew_wlan0 /system/bin/dhcpcd -n 205 class main 206 disabled 207 oneshot 208 209 service iprenew_p2p /system/bin/dhcpcd -n 210 class main 211 disabled 212 oneshot 213 214 service iprenew_bnep0 /system/bin/dhcpcd -n 215 class main 216 disabled 217 oneshot 218 219 # bugreport is triggered by holding down volume down, volume up and power 220 service bugreport /system/bin/bugmailer.sh -v 221 class main 222 disabled 223 oneshot 224 keycodes 114 115 116 225 226 service battery_charger /charger 227 class charger 228