import init.tenderloin.usb.rc on early-init start serial on init mkdir /boot mkdir /system mkdir /data 0771 system system mkdir /cache 0770 system cache # Enable LVM # We need to set LVM_SYSTEM_DIR for lvm to work and it does not work # with embedded export command until too late, so we exploit # the fact that there is /bin/sh on the 13th partition that we can use. mount ext3 /dev/block/mmcblk0p13 /boot wait noatime barrier=1 # Unfortunately it's dynamically linked so we need to create this # /lib symlink first and kill it later when no longer needed. symlink /boot/lib /lib # Also stupid lvm binary expects block devices to live in /dev, # not /dev/block symlink /dev/block/mmcblk0p14 /dev/mmcblk0p14 exec /boot/bin/sh -c "LVM_SYSTEM_DIR=/boot/etc/lvm /boot/usr/sbin/lvm.static vgchange -ay" # regular mounts mount ext4 /dev/store/ut-system /system wait ro barrier=1 mount ext4 /dev/store/ut-data /data wait noatime nodev barrier=1 noauto_da_alloc mount ext4 /dev/store/ut-cache /cache wait noatime nosuid nodev barrier=1 # remove all the lvm stuff as well as the moboot nextboot instruction exec /system/xbin/rm -rf /dev/mmcblk0p14 /lib /boot/moboot.next /var # remount /boot read-only mount ext3 /dev/block/mmcblk0p13 /boot remount ro wait noatime barrier=1 mkdir /storage 0050 system sdcard_r mkdir /mnt/shell/sdcard 0700 shell shell mkdir /storage/sdcard 0555 root root export EXTERNAL_STORAGE /storage/sdcard # Support legacy paths symlink /storage/sdcard /sdcard symlink /storage/sdcard /mnt/sdcard symlink /storage/sdcard /storage/sdcard0 # create directory for mounting usb drives mkdir /storage/usbdisk 0666 system system symlink /storage/usbdisk /mnt/usbdisk symlink /mnt/usbdisk /usbdisk on post-fs # camera calibration mkdir /data/misc/camera 0770 media system mkdir /data/misc/camera/R5_MVEN003_LD2_ND0_IR0_SH0_FL1_SVEN003_DCCID1044 0770 media media # camera config exec /system/bin/touch /data/misc/camera/config.txt chown media system /data/misc/camera/config.txt chmod 660 /data/misc/camera/config.txt setprop vold.post_fs_data_done 1 on init chmod 0666 /proc/net/xt_qtaguid/ctrl chmod 0660 /dev/ctp_uart # for Invense MPU3050 chmod 0664 /dev/mpu chmod 0664 /dev/mpuirq chmod 0664 /dev/timerirq chown system system /dev/mpu chown system system /dev/mpuirq chown system system /dev/timerirq chmod 0666 /dev/lm8502 chmod 0666 /sys/class/leds/core_navi_left/brightness chmod 0666 /sys/class/leds/core_navi_right/brightness chown system system /dev/lm8502 chown system system /sys/class/leds/core_navi_left/brightness chown system system /sys/class/leds/core_navi_right/brightness # For TS control chown system system /sys/devices/platform/cy8ctma395/vdd chown system system /sys/devices/platform/cy8ctma395/xres chown system system /sys/user_hw/pins/ctp/wake/level chown system system /dev/i2c-5 # increase per-process file limit to prevent warning setrlimit 7 10000 10000 on boot mount debugfs /sys/kernel/debug /sys/kernel/debug mkdir /data/misc/wifi 0770 system wifi mkdir /data/misc/wifi/sockets 0770 system wifi mkdir /data/misc/dhcp chown dhcp dhcp /data/misc/dhcp mount debugfs /sys/kernel/debug /sys/kernel/debug # bluetooth power up/down interface chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state chmod 0660 /sys/class/rfkill/rfkill0/state # fmtx chown bluetooth bluetooth /sys/class/rfkill/rfkill1/type chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state chmod 0660 /sys/class/rfkill/rfkill1/state chown bluetooth bluetooth /dev/rfkill chmod 0660 /dev/rfkill chown bluetooth bluetooth /sys/user_hw/pins/bt/reset/level chown bluetooth bluetooth /sys/user_hw/pins/bt/host_wake/level # Headphone jack detection chown audio audio /dev/input/event5 chmod 0660 /dev/input/event5 # allow system to modify target loads chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads # Increase readahead buffers on MMC devices write /sys/block/mmcblk0/bdi/read_ahead_kb 1024 # Enable power collapse where always safe write /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled 1 write /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled 1 write /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled 1 write /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled 1 write /sys/module/pm_8x60/modes/cpu1/power_collapse/idle_enabled 1 write /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled 1 write /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled 1 write /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled 1 write /sys/module/rpm_resources/enable_low_power/vdd_dig 2 write /sys/module/rpm_resources/enable_low_power/vdd_mem 2 write /sys/module/rpm_resources/enable_low_power/L2_cache 1 write /sys/module/rpm_resources/enable_low_power/pxo 1 # compat-wireless modules needed for ath6kl insmod /system/lib/modules/compat.ko insmod /system/lib/modules/cfg80211.ko # change permissions for i2c-2 device chmod 0660 /dev/i2c-2 chown media media /dev/i2c-2 service wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf # 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 -ABKL class main disabled oneshot service iprenew_wlan0 /system/bin/dhcpcd -n class main disabled oneshot service tsdriver /system/bin/ts_srv class core user root critical service dcvs0 /system/bin/dcvs --cpu=0 --slacktime=64 class core user root disabled service dcvs1 /system/bin/dcvs --cpu=1 --slacktime=64 class core user root disabled #service mpdecision /system/bin/mpdecision --no_sleep --avg_comp # class core # user root # disabled service thermald /system/bin/thermald class core user root oneshot service serial /sbin/serial class core disabled oneshot