[Android Software/Hacking General [Developers Only]] impactor:
I installed MIUI XJ rom on my HTC Desire, and it has X-Part D2Ext built in. I now want to disable it I have about 250 mb free on /data so that should be enough to

The problem is that it looks like this version of the built-in script has all the disabling features removed.

data2ext --disable = no such command

d2extoff = no such command

Etc, etc.

there are those files inside /etc/init.d:

04apps2sd

#!/system/bin/sh
#
# mount ext partition from sd card
# toggle bypass by xj
exit;
BB="logwrapper busybox";

if [ "$SD_EXT_DIRECTORY" = "" ];
then
SD_EXT_DIRECTORY=/sd-ext;
fi;

# find SD Card
for MMC_NUM in `seq 0 9`;
do
MMC_TYPE=`cat /sys/block/mmcblk$MMC_NUM/device/type`
if [ "$MMC_TYPE" = "SD" ];
then
# 2nd partition of sdcard should be the sd-ext if exist
SD_EXT_PART=/dev/block/mmcblk${MMC_NUM}p2
break
fi
done

if [ -b "$SD_EXT_PART" ];
then
log -p i -t mountsd "Checking filesystems..";

# fsck the sdcard filesystem first
if [ -x `which e2fsck` ];
then
e2fsck -y $SD_EXT_PART
e2fsk_exitcode=$?
else
echo "executable e2fsck not found, assuming no filesystem errors"
e2fsk_exitcode=0
fi

# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $e2fsk_exitcode;
if [ "$e2fsk_exitcode" -lt 2 ];
then
# mount and set perms
$BB mount -o noatime,nodiratime,barrier=1 -t ext3 $SD_EXT_PART $SD_EXT_DIRECTORY;
if [ "$?" = 0 ];
then
$BB chown 1000:1000 $SD_EXT_DIRECTORY;
$BB chmod 771 $SD_EXT_DIRECTORY;
log -p i -t mountsd "$SD_EXT_DIRECTORY successfully mounted";
else
log -p e -t mountsd "Unable to mount filesystem for $SD_EXT_DIRECTORY!";
fi
else
log -p e -t mountsd "Unable to repair filesystem, disabling apps2sd";
fi
fi

07internalsd

#!/system/bin/sh
echo "make sure internal sdcard folder exists";
INTERNAL_SDCARD=/data/sdcard
if [ ! -d $INTERNAL_SDCARD ];
then
rm -r -f $INTERNAL_SDCARD;
mkdir -p $INTERNAL_SDCARD;
chmod -R 777 $INTERNAL_SDCARD;
chown -R 1000:1000 $INTERNAL_SDCARD;
fi

80data2extinit

#!/system/bin/sh
#created by atroy
#adapted by xavierjohn22

BUSYBOX="/system/bin/busybox.swap"
D2ELOG="/data/local/data2ext.log"

if [ ! -e /dev/block/mmcblk0p1 ]; then
$BUSYBOX mknod /dev/block/mmcblk0p1 b 179 1;
fi
$BUSYBOX mount /dev/block/mmcblk0p1 /mnt/sdcard;

if [ -e $D2ELOG ]; then
D2E_DEBUG_LOG="/mnt/sdcard/data2ext.debug.log"
$BUSYBOX echo "[*] === Debug Mode start at `date +%c` === [*]" >> $D2E_DEBUG_LOG;
$BUSYBOX cat $D2ELOG >> $D2E_DEBUG_LOG;
$BUSYBOX echo "[*] === Debug Mode completed at `date +%c` === [*]" >> $D2E_DEBUG_LOG;
$BUSYBOX rm -f $D2ELOG;
fi

$BUSYBOX echo "[*] === Starting at `date +%c` === [*]" >> $D2ELOG;

$BUSYBOX echo "[*] At `date +%c` Checking partitions information ..." >> $D2ELOG;
$BUSYBOX echo `$BUSYBOX fdisk -lu /dev/block/mmcblk0` >> $D2ELOG;
for i in 2 3 4;
do
if [ ! -e /dev/block/mmcblk0p$i ]; then
$BUSYBOX echo "[*] At `date +%c` mmcblk0p$i nod not exist, try to make it now ..." >> $D2ELOG;
$BUSYBOX mknod /dev/block/mmcblk0p$i b 179 $i;
fi

bootflagp=`$BUSYBOX fdisk -lu /dev/block/mmcblk0 | $BUSYBOX grep mmcblk0p$i | $BUSYBOX awk '{print $2}'`;
if [ "$bootflagp" = "*" ];then
pBlocks=`$BUSYBOX fdisk -lu /dev/block/mmcblk0 | $BUSYBOX grep mmcblk0p$i | $BUSYBOX awk '{print $3}'`;
else
pBlocks=`$BUSYBOX fdisk -lu /dev/block/mmcblk0 | $BUSYBOX grep mmcblk0p$i | $BUSYBOX awk '{print $2}'`;
fi

pType=`$BUSYBOX fdisk -lu /dev/block/mmcblk0 | $BUSYBOX grep mmcblk0p$i | $BUSYBOX awk '{print $5}'`;
if [ $pBlocks -gt 0 ];then
pFond=$i;
$BUSYBOX echo "[*] At `date +%c` Found mmcblk0p$i[Type:$pType] ..." >> $D2ELOG;
else
if [ -e /dev/block/mmcblk0p$i ]; then
$BUSYBOX rm -rf /dev/block/mmcblk0p$i
fi
$BUSYBOX echo "[*] At `date +%c` Not Found mmcblk0p$i..." >> $D2ELOG;
fi
done

$BUSYBOX echo "[*] At `date +%c` Enable data2ext $pFond partitions ..." >> $D2ELOG;
$BUSYBOX touch /data/local/data2ext.$pFond.partitions.enable

# Add ase scripts
if [ ! -e /data/local/data2ext.finish ];then
$BUSYBOX echo "[*] At `date +%c` Add gscrip files ..." >> $D2ELOG;
mkdir /mnt/sdcard/gscript
cp -r /data/gscript/* /mnt/sdcard/gscript/
fi

$BUSYBOX echo "[*] At `date +%c` Changing cfq scheduler for mtd ..." >> $D2ELOG;
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
echo 1 > /sys/block/mmcblk0/queue/rotational;
for i in 1 2 3 4 5;
do
echo "deadline" > /sys/block/mtdblock$i/queue/scheduler
echo 0 > /sys/block/mtdblock$i/queue/rotational;
done

sync;
sleep 1

83data2ext

#!/system/bin/sh
#created by atroy
#adapted by xavierjohn22

BUSYBOX="/system/bin/busybox.swap"
D2ELOG="/data/local/data2ext.log"

$BUSYBOX echo "[*] At `date +%c` Try data2ext for xpartitions version..." >> $D2ELOG;

if [ -e /dev/block/mmcblk0p2 ];then

if [ ! -e /data/local/data2ext.finish ];then
$BUSYBOX echo "[*] At `date +%c` Init first mmcblk0p2,creat userdata from the first ext..." >> $D2ELOG;
/system/bin/mkfs_ext4.swap -t ext4 -b 4096 -m 0 -F -L userdata /dev/block/mmcblk0p2
/system/bin/tune2fs.swap -o journal_data_ordered /dev/block/mmcblk0p2
/system/bin/tune2fs.swap -E hash_alg=tea /dev/block/mmcblk0p2
/system/bin/tune2fs.swap -e continue /dev/block/mmcblk0p2
/system/bin/tune2fs.swap -O ^has_journal /dev/block/mmcblk0p2
/system/bin/tune2fs.swap -O ^huge_file /dev/block/mmcblk0p2
/system/bin/e2fsck.swap -y -v -f /dev/block/mmcblk0p2;

$BUSYBOX echo "[*] At `date +%c` Init /mnt/asec/ext..." >> $D2ELOG;
$BUSYBOX mkdir /mnt/asec/ext
$BUSYBOX mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /mnt/asec/ext
$BUSYBOX chown 1000.1000 /mnt/asec/ext
$BUSYBOX chmod 771 /mnt/asec/ext

$BUSYBOX rm -rf /mnt/asec/ext/*

if [ ! -d /data/system ];then
$BUSYBOX mkdir /data/system
fi
$BUSYBOX chown 1000.1000 /data/system
$BUSYBOX chmod 771 /data/system

$BUSYBOX echo "[*] At `date +%c` Found Ext, but data2ext is not finished, so do it now, please wait... it is long..." >> $D2ELOG;
if [ -e /mnt/sdcard/sd-ext-xpart.zip ];then
$BUSYBOX echo "[*] At `date +%c` Extracting /mnt/sdcard/sd-ext-xpart.zip ..." >> $D2ELOG;
cd /mnt/asec/ext
$BUSYBOX unzip -o /mnt/sdcard/sd-ext-xpart.zip
$BUSYBOX chown -R 1000.1000 /mnt/asec/ext/app
$BUSYBOX chmod 771 /mnt/asec/ext/app
$BUSYBOX chmod 644 /mnt/asec/ext/app/*
cd /
fi

$BUSYBOX cp -a /data/* /mnt/asec/ext/
$BUSYBOX rm -rf /data/app
$BUSYBOX rm -rf /data/app-private
$BUSYBOX rm -rf /data/dalvik-cache

sync
sleep 1

$BUSYBOX umount /mnt/asec/ext
sleep 1
fi

sync
$BUSYBOX umount /data
sleep 1

$BUSYBOX mkdir /mnt/asec/mtddata
$BUSYBOX mount -o nosuid,nodev,relatime /dev/block/mtdblock5 /mnt/asec/mtddata

/system/bin/e2fsck.swap -y -v -f /dev/block/mmcblk0p2;
$BUSYBOX mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data
$BUSYBOX chown 1000.1000 /data
$BUSYBOX chmod 771 /data

$BUSYBOX rm -rf /data/local/*
$BUSYBOX mount --bind /mnt/asec/mtddata/local /data/local

echo "0" > /data/misc/screen_lock_status
$BUSYBOX chown 1000.1000 /data/misc/screen_lock_status
$BUSYBOX chmod 644 /data/misc/screen_lock_status

sync
sleep 1

if [ -e /dev/block/mmcblk0p3 ];then
if [ ! -e /data/local/data2ext.finish ];then
$BUSYBOX echo "[*] At `date +%c` Found mmcblk0p3, will use it for /data/data..." >> $D2ELOG;
/system/bin/mkfs_ext4.swap -t ext4 -b 4096 -m 0 -F -L extdata /dev/block/mmcblk0p3
/system/bin/tune2fs.swap -o journal_data_ordered /dev/block/mmcblk0p3
/system/bin/tune2fs.swap -E hash_alg=tea /dev/block/mmcblk0p3
/system/bin/tune2fs.swap -e continue /dev/block/mmcblk0p3
/system/bin/tune2fs.swap -O ^has_journal /dev/block/mmcblk0p3
/system/bin/tune2fs.swap -O ^huge_file /dev/block/mmcblk0p3
/system/bin/e2fsck.swap -y -v -f /dev/block/mmcblk0p3;
fi

$BUSYBOX echo "[*] At `date +%c` Init extdata to mmcblk0p3..." >> $D2ELOG;

/system/bin/e2fsck.swap -y -v -f /dev/block/mmcblk0p3;

$BUSYBOX mkdir /mnt/asec/extdata
$BUSYBOX mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p3 /mnt/asec/extdata

if [ ! -d /mnt/asec/extdata/data ];then
$BUSYBOX mkdir /mnt/asec/extdata/data
fi
$BUSYBOX chown 1000.1000 /mnt/asec/extdata/data
$BUSYBOX chmod 771 /mnt/asec/extdata/data

$BUSYBOX touch /data/data/d2e-fix
$BUSYBOX cp -a /data/data/* /mnt/asec/extdata/data/
$BUSYBOX rm -rf /data/data/*
$BUSYBOX rm -rf /data/data

$BUSYBOX umount /mnt/asec/extdata
$BUSYBOX mkdir /data/data
sync
sleep 1

$BUSYBOX mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p3 /data/data
fi

if [ ! -e /data/local/data2ext.finish ];then
$BUSYBOX echo "[*] At `date +%c` Creating data2ext.finish mark..." >> $D2ELOG;
$BUSYBOX touch /data/local/data2ext.finish
sync
sleep 1
fi

if [ -e /dev/block/mmcblk0p4 ] && [ ! -e /data/local/data2extswap.disable ];then
$BUSYBOX echo "[*] At `date +%c` Found mmcblk0p4, will use it for swap, create swap fs on it now..." >> $D2ELOG;
$BUSYBOX mkswap /dev/block/mmcblk0p4
$BUSYBOX swapon /dev/block/mmcblk0p4
echo "1" > /proc/sys/vm/swappiness
echo "40" > /proc/sys/vm/vfs_cache_pressure
fi

sync
sleep 1

for i in system;
do
if [ ! -d /mnt/asec/mtddata/$i ];then
$BUSYBOX mkdir /mnt/asec/mtddata/$i;
fi
$BUSYBOX chown 1000.1000 /mnt/asec/mtddata/$i;
$BUSYBOX chmod 771 /mnt/asec/mtddata/$i;

if [ -d /data/$i ] && [ ! -h /data/$i ];then
$BUSYBOX touch /data/$i/d2e-fix;
$BUSYBOX cp -a /data/$i/* /mnt/asec/mtddata/$i/;
$BUSYBOX rm -rf /data/$i/*;
fi;
done;

if [ ! -d /mnt/asec/mtddata/misc ];then
$BUSYBOX mkdir /mnt/asec/mtddata/misc;
fi
$BUSYBOX chown 1000.9998 /mnt/asec/mtddata/misc;
$BUSYBOX chmod 01771 /mnt/asec/mtddata/misc;
if [ -d /data/misc ] && [ ! -h /data/misc ];then
$BUSYBOX touch /data/misc/d2e-fix;
$BUSYBOX cp -a /data/misc/* /mnt/asec/mtddata/misc/;
$BUSYBOX rm -rf /data/misc/*;
fi;

if [ ! -d /mnt/asec/mtddata/property ];then
$BUSYBOX mkdir /mnt/asec/mtddata/property;
fi
$BUSYBOX chown 0.0 /mnt/asec/mtddata/property;
$BUSYBOX chmod 700 /mnt/asec/mtddata/property;
if [ -d /data/property ] && [ ! -h /data/property ];then
$BUSYBOX touch /data/property/d2e-fix;
$BUSYBOX cp -a /data/property/* /mnt/asec/mtddata/property/;
$BUSYBOX rm -rf /data/property/*;
fi;

for i in property misc system;
do
if [ -d /data/$i ] && [ ! -h /data/$i ];then
$BUSYBOX rm -rf /data/$i/*;
else
$BUSYBOX rm -rf /data/$i;
$BUSYBOX mkdir /data/$i
fi;
$BUSYBOX mount --bind /mnt/asec/mtddata/$i /data/$i;
done;

#realdata=/mnt/asec/extdata/ 3-part
realdata=/data/

cd /data
filelist=`$BUSYBOX find data -type d -follow -name "com.android.providers.*" -maxdepth 1`
for i in $filelist
do
if [ -d $realdata/$i ] && [ ! -h $realdata/$i ];then
$BUSYBOX cp -a $realdata/$i /mnt/asec/mtddata/data/
$BUSYBOX rm -rf $realdata/$i/*
fi
done

cd /mnt/asec/mtddata/
filelist=`$BUSYBOX find data -type d -name "com.android.providers.*" -maxdepth 1`
for i in $filelist
do
if [ -d $realdata/$i ] && [ ! -h $realdata/$i ];then
$BUSYBOX rm -rf $realdata/$i/*
else
$BUSYBOX rm -rf $realdata/$i
$BUSYBOX mkdir $realdata/$i
fi
$BUSYBOX mount --bind /mnt/asec/mtddata/$i /data/$i
$BUSYBOX touch /mnt/asec/mtddata/$i/d2e-binded
done
cd /

cd /data
filelist=`$BUSYBOX cat /data/system/packages.xml|$BUSYBOX awk '{if ($0~/^<package name=/ && $3~/\/system\/app/ && !($2~/name=\"com.htc.cs\"/)) {print "data/" substr($2,7,length($2)-7)}}'`
for i in $filelist
do
if [ ! -e $realdata/$i/d2e-binded ];then
if [ -d $realdata/$i ] && [ ! -h $realdata/$i ] ;then
if [ ! -e /mnt/asec/mtddata/$i/d2e-binded ];then
$BUSYBOX cp -a $realdata/$i /mnt/asec/mtddata/data/
$BUSYBOX rm -rf $realdata/$i/*
sync
else
$BUSYBOX rm -rf $realdata/$i/*
fi
else
$BUSYBOX rm -rf $realdata/$i
$BUSYBOX mkdir $realdata/$i
fi
if [ ! -e /mnt/asec/mtddata/$i ];then
$BUSYBOX mkdir /mnt/asec/mtddata/$i
$BUSYBOX chown 1000.1000 /mnt/asec/mtddata/$i
$BUSYBOX chmod 777 /mnt/asec/mtddata/$i
fi

$BUSYBOX mount --bind /mnt/asec/mtddata/$i /data/$i
$BUSYBOX touch /mnt/asec/mtddata/$i/d2e-binded
fi
done
cd /

$BUSYBOX echo "[*] At `date +%c` Data-to-EXT successfully enabled." >> $D2ELOG;

else
$BUSYBOX echo "[*] At `date +%c` Data-to-EXT disabled." >> $D2ELOG;
fi

sync;

89d2ecomplete

#!/system/bin/sh
#adapted by xavierjohn22

BUSYBOX="/system/bin/busybox.swap"

if [ -e /data/local/d2eupdate.d2e ];then
if [ -e /data/local/d2eupdateOK.d2e ];then
$BUSYBOX mount -o remount system /system
sleep 1
#
# mostly are atroys, cmupdater xj
$BUSYBOX rm -rf /data/app/d2e_updater.apk
$BUSYBOX rm -rf /system/app/d2e_updater_1.5.20.apk
$BUSYBOX rm -rf /system/app/cmupdaterapp.ui.apk
$BUSYBOX rm -rf /system/app/d2e_updater.apk
#$BUSYBOX rm -rf /system/app/MIUICMUpdater.apk
#
$BUSYBOX rm -rf /data/local/d2eupdate.d2e
#$BUSYBOX rm -rf /system/app/Updater.apk
#$BUSYBOX rm -rf /system/app/Updater.odex
#$BUSYBOX cp /data/system/app/Updater.apk /system/app/Updater.apk
#$BUSYBOX chown -R 0:0 /system/app/Updater.apk
#$BUSYBOX chmod -R 0644 /system/app/Updater.apk
sleep 1
$BUSYBOX mount -o remount,ro system /system
else
$BUSYBOX touch /data/local/d2eupdateOK.d2e;
fi
fi

sync;
setprop cm.filesystem.ready 1;

Can someone give me a hand with that?