Data2ext CyanogenMOD - UPDATE 26/01/11

J0s3f

Senior Member
May 24, 2010
63
13
0
If I don't use your apps2ext4 script, my apps are there but there is not enouhg internal space because not everything is moved to ext :(
Here is the default script:
Code:
cat /etc/init.d/05mountsd
#!/system/bin/sh
#
# mount ext partition from sd card

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
 

basketthis

Senior Member
May 23, 2011
507
258
0
Looks like to me like a syntax error in the script you're using. Did you edit it?

Sent from my Legend using XDA App
Thank you for the reply! The only thing I tried to edit was the 'data$' part that was described on pg 40. I will download the file again and try fresh and post another logcat if issues arise.
 

basketthis

Senior Member
May 23, 2011
507
258
0
e2fsck isn't included in the rom, contact the developer.

Sent from my Legend using XDA App
Thank you. Is there a way for me to add it without having to bother them? Something I can flash?


Maybe helpful, maybe not:
When I'm typing the adb commands it doesn't return any errors.... I'm talking of the commands listed on the first page. I can remember the tune commands return a version number. I can't remember exactly what the e2 command returned.
 

TheGrammarFreak

Senior Member
Jul 29, 2010
2,820
678
0
twitter.com
Thank you. Is there a way for me to add it without having to bother them? Something I can flash?


Maybe helpful, maybe not:
When I'm typing the adb commands it doesn't return any errors.... I'm talking of the commands listed on the first page. I can remember the tune commands return a version number. I can't remember exactly what the e2 command returned.
Call e2fsck while the phone is running, what happens?

Sent from my Legend using XDA App