#!/bin/bash # SD split tool, ilove3d(fay) # 2007/07/16 # show* by Lasly ( showRadio & showNotify by Letterb ) # show* bulild by E2-EZX-SDK(-Lasly) # Please keep the authors' infomation # your version must be one of them below: # ilove3d-48P-Self-V2 # ilove3d-48P-Ultimate # ilove3d-46P-NewBeginning LANG=`showRadio "language语言:" "" "简体中文(zh-cn)" "English(en-us)"` case $LANG in 1) LANG=1 ;; 2) LANG=0 ;; 0) exit 0 ;; esac if [ ! -f /usr/SYSqtapp/ilove3d/mmc_manager.lin ] || [ ! -f /bin/mkfs.ext3 ] || [ ! -f /bin/mkswap ] then if [ $LANG -eq 1 ] then showNotify "" "您现在使用的版本不支持此功能!" 1 else showNotify "" "Your F/W does not support this function "\! 1 fi exit 0 fi umount /mmc/mmca1 > /dev/null 2>&1 if [ -d ezxlocal/download/mystuff/MMCA6 ] then umount /ezxlocal/download/mystuff/MMCA6 > /dev/null 2>&1 fi if [ -d /ezxlocal/download/mystuff/unKnown/My_MMCA2 ] then umount /ezxlocal/download/mystuff/unKnown/My_MMCA2 > /dev/null 2>&1 fi swapoff /dev/mmca5 > /dev/null 2>&1 split_mmca1=`showTextEntry 0 "/dev/mmca1: (MB)"` if [ "$split_mmca1" = "" ] then exit 0 fi split_mmca5=`showTextEntry 0 "/dev/mmca5: (MB)"` if [ "$split_mmca5" = "" ] then exit 0 fi if [ $LANG -eq 1 ] then showNotify "" "/dev/mmca6将使用所有剩余空间" else showNotify "" "The /dev/mmca6 will use free space left" fi if [ $split_mmca1 -ge 1 ] && [ $split_mmca5 -ge 1 ]; then if [ $LANG -eq 1 ]; then showQ "设置完成" "/dev/mmca1=${split_mmca1}M /dev/mmca5=${split_mmca5}M /dev/mmca6=剩余空间 是否应用设置? (需耐心等待数分钟 SD卡所有内容将丢失)" 1 || { echo "d 1 d 2 n p 1 +${split_mmca1}M t 6 n e 2 n l +${split_mmca5}M t 5 82 n l t 6 83 w" | fdisk /dev/mmca /.backup/mkdosfs /dev/mmca1 /bin/busybox mkswap /dev/mmca5 /bin/mkfs.ext3 /dev/mmca6 if [ $LANG -eq 1 ] then showQ "" "分区及格式化完成,重启手机生效!" 2 else showQ "" "All done, reboot to see the result "\! 2 fi } else showQ "Setup done" "/dev/mmca1=${split_mmca1}M /dev/mmca5=${split_mmca5}M /dev/mmca6=free space left Aplly the settings ? (It will take minutes, and all things on the SD card will be lost)" 1 || { echo "d 1 d 2 n p 1 +${split_mmca1}M t 6 n e 2 n l +${split_mmca5}M t 5 82 n l t 6 83 w" | fdisk /dev/mmca /.backup/mkdosfs /dev/mmca1 /bin/busybox mkswap /dev/mmca5 /bin/mkfs.ext3 /dev/mmca6 if [ $LANG -eq 1 ] then showQ "" "分区及格式化完成,重启手机生效!" 2 else showQ "" "All done, reboot to see the result "\! 2 fi } fi else if [ $LANG -eq 1 ] then showNotify "" "输入错误!!!" 1 else showNotify "" "Wrong input "\!\!\! 1 fi fi