diff options
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/fstab.tuna | 19 | ||||
-rwxr-xr-x | rootdir/init.tuna.rc | 267 | ||||
-rwxr-xr-x | rootdir/init.tuna.usb.rc | 79 | ||||
-rw-r--r-- | rootdir/ueventd.tuna.rc | 49 |
4 files changed, 414 insertions, 0 deletions
diff --git a/rootdir/fstab.tuna b/rootdir/fstab.tuna new file mode 100644 index 0000000..79d2fc6 --- /dev/null +++ b/rootdir/fstab.tuna @@ -0,0 +1,19 @@ +# Android fstab file. +#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> +# The filesystem that contains the filesystem checker binary (typically /system) cannot +# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK + + +/dev/block/platform/omap/omap_hsmmc.0/by-name/system /system ext4 ro wait +/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro wait +/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check +/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check,encryptable=/dev/block/platform/omap/omap_hsmmc.0/by-name/metadata +/dev/block/platform/omap/omap_hsmmc.0/by-name/misc /misc emmc defaults defaults +/dev/block/platform/omap/omap_hsmmc.0/by-name/boot /boot emmc defaults defaults +/dev/block/platform/omap/omap_hsmmc.0/by-name/recovery /recovery emmc defaults defaults +/dev/block/platform/omap/omap_hsmmc.0/by-name/sbl /sbl emmc defaults defaults +/dev/block/platform/omap/omap_hsmmc.0/by-name/xloader /xloader emmc defaults defaults +/dev/block/platform/omap/omap_hsmmc.0/by-name/radio /radio emmc defaults defaults + +# USB storage device +/devices/platform/omap/musb-omap2430/musb-hdrc auto vfat defaults voldmanaged=usbdisk:auto diff --git a/rootdir/init.tuna.rc b/rootdir/init.tuna.rc new file mode 100755 index 0000000..2109b33 --- /dev/null +++ b/rootdir/init.tuna.rc @@ -0,0 +1,267 @@ +import init.tuna.usb.rc + +on init + # See storage config details at http://source.android.com/tech/storage/ + mkdir /mnt/shell/emulated 0700 shell shell + mkdir /storage/emulated 0555 root root + + export EXTERNAL_STORAGE /storage/emulated/legacy + export EMULATED_STORAGE_SOURCE /mnt/shell/emulated + export EMULATED_STORAGE_TARGET /storage/emulated + + # Support legacy paths + symlink /storage/emulated/legacy /sdcard + symlink /storage/emulated/legacy /mnt/sdcard + symlink /storage/emulated/legacy /storage/sdcard0 + symlink /mnt/shell/emulated/0 /storage/emulated/legacy + + # create directory for mounting usb drives + chmod 0701 /mnt/media_rw + mkdir /mnt/media_rw/usbdisk 0775 system system + mkdir /storage/usbdisk 0000 system system + +on post-fs-data + mkdir /data/media 0770 media_rw media_rw + + mkdir /data/misc/wifi 0770 wifi wifi + mkdir /data/misc/wifi/sockets 0770 wifi wifi + mkdir /data/misc/dhcp 0770 dhcp dhcp + chown dhcp dhcp /data/misc/dhcp + mkdir /data/smc 0770 drmrpc drmrpc + chown drmrpc drmrpc /data/smc/counter.bin + chown drmrpc drmrpc /data/smc/storage.bin + chown drmrpc drmrpc /data/smc/system.bin + + # camera calibration + mkdir /data/misc/camera 0770 media media + mkdir /data/misc/camera/R5_MVEN003_LD2_ND0_IR0_SH0_FL1_SVEN003_DCCID1044 0770 media media + restorecon /data/misc/camera + + mkdir /data/radio 0775 radio radio + mkdir /data/radio/log 0775 radio radio + + setprop vold.post_fs_data_done 1 + +# LTE + chown radio system /sys/devices/tuna_otg/usb_sel + chown radio system /sys/devices/tuna_otg/uart_sel + chown radio system /sys/bus/i2c/drivers/fsa9480/4-0025/switch + chmod 0660 /sys/bus/i2c/drivers/fsa9480/4-0025/switch + chmod 0660 /sys/devices/tuna_otg/uart_sel + chmod 0660 /sys/devices/tuna_otg/usb_sel + +on boot + mount debugfs /sys/kernel/debug /sys/kernel/debug + chmod 0666 /dev/pvrsrvkm + +# autosuspend root hubs immediatly after attached devices + write /sys/bus/usb/devices/usb1/power/autosuspend_delay_ms 0 + write /sys/bus/usb/devices/usb2/power/autosuspend_delay_ms 0 + +on fs + mkdir /factory 0775 radio radio + mount_all /fstab.tuna + restorecon /dev/block/platform/omap/omap_hsmmc.0/by-name/radio + mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory rw remount + restorecon /factory + restorecon /factory/imei/mps_code.dat + restorecon /factory/.nv_state + restorecon /factory/.nv_data.bak + restorecon /factory/nv_data.bin + restorecon /factory/nv_data.bin.md5 + restorecon /factory/hdcp.keys + restorecon /factory/imei + restorecon /factory/wifi + restorecon /factory/wv.keys + restorecon /factory/bluetooth + restorecon /factory/bluetooth/bt_addr + mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ro remount + setprop ro.crypto.fuse_sdcard true + +# change permissions for mtd device + chmod 0660 /dev/mtd/mtd0 + chown media media /dev/mtd/mtd0 + +# change permissions for i2c-2 device + chmod 0660 /dev/i2c-2 + chown media media /dev/i2c-2 + +# change permissions for Tiler driver + chmod 0777 /dev/tiler + chmod 0777 /dev/dmm + +# change permissions for ION driver + chmod 0777 /dev/ion + +# We chown/chmod /factory because mount is run as root + defaults + chown radio radio /factory + chmod 0775 /factory + +# add symlink for HDCP key + symlink /factory/hdcp.keys /system/vendor/firmware/hdcp.keys + +# nfc + setprop ro.nfc.port "COM4" + chmod 0600 /dev/ttyO3 + chown nfc nfc /dev/ttyO3 + chmod 0600 /sys/devices/platform/nfc-power/nfc_power + chown nfc nfc /sys/devices/platform/nfc-power/nfc_power + +# permissions for bluetooth. + setprop ro.bt.bdaddr_path "/factory/bluetooth/bt_addr" + chown bluetooth bluetooth ro.bt.bdaddr_path + chown bluetooth bluetooth /dev/ttyO1 + chmod 0600 /dev/ttyO1 + chmod 0660 /sys/class/rfkill/rfkill0/state + chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state + chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type + +# backlight + chown system system /sys/class/backlight/s6e8aa0/brightness + +# leds + chown system system /dev/an30259a_leds + +# for GPS + chown root system /sys/class/sec/gps/GPS_PWR_EN/value + chmod 0660 /sys/class/sec/gps/GPS_PWR_EN/value + chown root system /sys/class/sec/gps/GPS_nRST/value + chmod 0660 /sys/class/sec/gps/GPS_nRST/value + chown system system /proc/mcspi1_cs3_ctrl + chmod 0600 /proc/mcspi1_cs3_ctrl + +# ril control auto-suspend + chmod 0660 /sys/bus/usb/devices/usb1/power/control + chown radio radio /sys/bus/usb/devices/usb1/power/control + +on property:persist.sys.tuna.off_mode=* + write /d/pm_debug/enable_off_mode ${persist.sys.tuna.off_mode} + +on property:ril.modem.lte.powercontrol=* + write /sys/bus/usb/devices/1-1/power/control ${ril.modem.lte.powercontrol} + +service fRom /system/bin/fRom \ + -x /data/misc/camera/R5_MVEN003_LD2_ND0_IR0_SH0_FL1_SVEN003_DCCID1044 \ + -d /dev/mtd/mtd0 + user media + group media + class late_start + oneshot + +service pvrsrvctl /vendor/bin/pvrsrvctl --start --no-module + class core + user root + group root + oneshot + +# create filesystems if necessary +service setup_fs /system/bin/setup_fs \ + /dev/block/platform/omap/omap_hsmmc.0/by-name/cache \ + /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata + class core + user root + group root + oneshot + +service tf_daemon /system/bin/tf_daemon \ + -d -c /vendor/etc/smc_normal_world_android_cfg.ini + class main + user drmrpc + group drmrpc + +service smc_pa_wvdrm /system/bin/smc_pa_ctrl \ + -c /vendor/etc/smc_normal_world_android_cfg.ini \ + start /vendor/firmware/smc_pa_wvdrm.ift + class core + user drmrpc + group drmrpc + oneshot + +# virtual sdcard daemon running as media_rw (1023) +service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated + class late_start + +service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/usbdisk /storage/usbdisk + class late_start + disabled + +service p2p_supplicant /system/bin/wpa_supplicant \ + -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ + -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \ + -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ + -I/system/etc/wifi/wpa_supplicant_overlay.conf \ + -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \ + -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 + # we will start as root and wpa_supplicant will switch to user wifi + # after setting up the capabilities required for WEXT + # user wifi + # group wifi inet keystore + class main + socket wpa_wlan0 dgram 660 wifi wifi + disabled + oneshot + +service wpa_supplicant /system/bin/wpa_supplicant \ + -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ + -I/system/etc/wifi/wpa_supplicant_overlay.conf \ + -O/data/misc/wifi/sockets \ + -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 + # we will start as root and wpa_supplicant will switch to user wifi + # after setting up the capabilities required for WEXT + # user wifi + # group wifi inet keystore + class main + socket wpa_wlan0 dgram 660 wifi wifi + disabled + oneshot + +service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL + class main + disabled + oneshot + +service dhcpcd_p2p /system/bin/dhcpcd -aABKL + class main + disabled + oneshot + +service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL + class main + disabled + oneshot + +service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL + class main + disabled + oneshot + +service iprenew_wlan0 /system/bin/dhcpcd -n + class main + disabled + oneshot + +service iprenew_p2p /system/bin/dhcpcd -n + class main + disabled + oneshot + +service iprenew_bt-pan /system/bin/dhcpcd -n + class main + disabled + oneshot + +service iprenew_eth0 /system/bin/dhcpcd -n + class main + disabled + oneshot + +# bugreport is triggered by holding down volume down, volume up and power +service bugreport /system/bin/dumpstate -d -p -B \ + -o /data/data/com.android.shell/files/bugreports/bugreport + class main + disabled + oneshot + keycodes 114 115 116 + +service battery_charger /charger + class charger diff --git a/rootdir/init.tuna.usb.rc b/rootdir/init.tuna.usb.rc new file mode 100755 index 0000000..e86a7bd --- /dev/null +++ b/rootdir/init.tuna.usb.rc @@ -0,0 +1,79 @@ +on init + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/f_rndis/manufacturer Samsung + write /sys/class/android_usb/android0/f_rndis/vendorID 04e8 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + +on boot + write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} + write /sys/class/android_usb/android0/iProduct ${ro.product.model} + +on property:sys.usb.config=mtp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 685c + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6860 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6863 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/bDeviceClass 224 + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6864 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/bDeviceClass 224 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6865 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6866 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,dm + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6864 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,acm,dm + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6864 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/f_acm/instances 1 + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} diff --git a/rootdir/ueventd.tuna.rc b/rootdir/ueventd.tuna.rc new file mode 100644 index 0000000..00a8e37 --- /dev/null +++ b/rootdir/ueventd.tuna.rc @@ -0,0 +1,49 @@ +#for DSSCOMP +/dev/dsscomp 0660 system system +/dev/tiler 0666 system system + +#for SYSLINK +/dev/rpmsg-omx0 0660 drmrpc drmrpc +/dev/rpmsg-omx1 0660 drmrpc drmrpc +/dev/rproc_user 0660 drmrpc drmrpc +/dev/tf_driver 0660 drmrpc drmrpc +/dev/tf_ctrl 0660 drmrpc drmrpc + +#for Sensors +/dev/mpu 0660 system system +/dev/mpuirq 0660 system system +/dev/accelirq 0660 system system +/dev/compassirq 0660 system system +/dev/timerirq 0660 system system + +#for HSPA RIL +/dev/umts_boot0 0660 radio radio +/dev/umts_boot1 0660 radio radio +/dev/umts_ipc0 0660 radio radio +/dev/umts_rfs0 0660 radio radio +/dev/block/mmcblk0p9 0660 radio radio +/dev/umts_ramdump0 0660 radio radio + +# used by RIL and GPS +/dev/ttyO0 0660 system radio + +#for LTE RIL +/dev/cdma_boot0 0660 radio radio +/dev/lte_boot0 0660 radio radio +/dev/cdma_ipc0 0660 radio radio +/dev/lte_ipc0 0660 radio radio +/dev/cdma_rfs0 0660 radio radio +/dev/lte_rfs0 0660 radio radio +/dev/lte_spi 0660 radio radio +/dev/cdma_rmnet5 0660 radio radio +/dev/cdma_rmnet6 0660 radio radio +/dev/lte_rmnet4 0660 radio radio +/dev/ttyGS0 0660 radio radio +/dev/ttyGS1 0660 radio radio +/dev/block/mmcblk0p4 0660 radio radio +/dev/modem_br 0660 radio radio +/dev/cdma_ramdump0 0660 radio radio +/dev/lte_ramdump0 0660 radio radio + +#for cp log +/dev/cdma_cplog 0660 radio radio |