1import init.tuna.usb.rc 2 3on 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 18on 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 47on 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 55on 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 chown system system /proc/mcspi1_cs3_ctrl 110 chmod 0600 /proc/mcspi1_cs3_ctrl 111 112# ril control auto-suspend 113 chmod 0660 /sys/bus/usb/devices/usb1/power/control 114 chown radio radio /sys/bus/usb/devices/usb1/power/control 115 116on property:persist.sys.tuna.off_mode=* 117 write /d/pm_debug/enable_off_mode ${persist.sys.tuna.off_mode} 118 119on property:ril.modem.lte.powercontrol=* 120 write /sys/bus/usb/devices/1-1/power/control ${ril.modem.lte.powercontrol} 121 122service fRom /system/bin/fRom \ 123 -x /data/misc/camera/R5_MVEN003_LD2_ND0_IR0_SH0_FL1_SVEN003_DCCID1044 \ 124 -d /dev/mtd/mtd0 125 user media 126 group media 127 class late_start 128 oneshot 129 130service pvrsrvctl /vendor/bin/pvrsrvctl --start --no-module 131 class core 132 user root 133 group root 134 oneshot 135 136# create filesystems if necessary 137service setup_fs /system/bin/setup_fs \ 138 /dev/block/platform/omap/omap_hsmmc.0/by-name/cache \ 139 /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata 140 class core 141 user root 142 group root 143 oneshot 144 145service tf_daemon /system/bin/tf_daemon \ 146 -d -c /vendor/etc/smc_normal_world_android_cfg.ini 147 class main 148 user drmrpc 149 group drmrpc 150 151service smc_pa_wvdrm /system/bin/smc_pa_ctrl \ 152 -c /vendor/etc/smc_normal_world_android_cfg.ini \ 153 start /vendor/firmware/smc_pa_wvdrm.ift 154 class core 155 user drmrpc 156 group drmrpc 157 oneshot 158 159# virtual sdcard daemon running as media_rw (1023) 160service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023 161 class late_start 162 163service p2p_supplicant /system/bin/wpa_supplicant \ 164 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \ 165 -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1 166 # we will start as root and wpa_supplicant will switch to user wifi 167 # after setting up the capabilities required for WEXT 168 # user wifi 169 # group wifi inet keystore 170 class main 171 socket wpa_wlan0 dgram 660 wifi wifi 172 disabled 173 oneshot 174 175service wpa_supplicant /system/bin/wpa_supplicant \ 176 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin 177 # we will start as root and wpa_supplicant will switch to user wifi 178 # after setting up the capabilities required for WEXT 179 # user wifi 180 # group wifi inet keystore 181 class main 182 socket wpa_wlan0 dgram 660 wifi wifi 183 disabled 184 oneshot 185 186service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL 187 class main 188 disabled 189 oneshot 190 191service dhcpcd_p2p /system/bin/dhcpcd -aABKL 192 class main 193 disabled 194 oneshot 195 196service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL 197 class main 198 disabled 199 oneshot 200 201service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL 202 class main 203 disabled 204 oneshot 205 206service iprenew_wlan0 /system/bin/dhcpcd -n 207 class main 208 disabled 209 oneshot 210 211service iprenew_p2p /system/bin/dhcpcd -n 212 class main 213 disabled 214 oneshot 215 216service iprenew_bnep0 /system/bin/dhcpcd -n 217 class main 218 disabled 219 oneshot 220 221# bugreport is triggered by holding down volume down, volume up and power 222service bugreport /system/bin/bugmailer.sh -v 223 class main 224 disabled 225 oneshot 226 keycodes 114 115 116 227 228service battery_charger /charger 229 class charger 230