[Desire Android Development] melethron:
Modified Data2SD script to use EXT2 instead of EXT4

Introduction:

The more i read the more i think that ext4 isn't good for a flash drive. For some info check this for example:

http://xdaforums.com/showpost.php?p=6179444&postcount=4

So i edited the script to make an ext2 and an ext2 loopdevice (don't know yet if it makes sense to have an ext2 loop device on an ext2 partition but this was the fastest way to modify the script). Also this is a quick modification it still took some time to do since i wanted to make a flashable zip and i had issues with syntax error of the update-script (only to find out after quite some time that there wasn't any error but the recovery had some kind of problem that was gone after reboot - i thought im stupid not to find a syntax error in 4 lines of code ^^ ).

Anyway ... i finished the zip and flashed it on a fresh installed ROM (needs to be flashed right after a fresh install). First results is really good:

Quadrant score 300 points (~2500 now, same Kernel) more than on 0.14 with old script, didn't test the new script of 0.14b with journaling but this should be slower due to more I/O needed for the journal. Ui highly responsive. Well and i didn't even start to optimize the script and playing around with loop devices. But before i optimize it i make it compatible to LeeDroid and make a new thread. I also plan to add different script (ext4 also). And script that can be flashed if data2ext is enabled already and only ROM should be upgraded. Don't know yet.

Also i should test it some more before i get to happy with the results. Atm im rather impressed. But now the ...

Changes:

But now the changes i made compared to original script:

-ext2 instead of ext4

-ext4 specific lines removed

-quoted lines removed

-removed barrier=0,nobh,nouser_xattr from mount options

-some unimportant changes to "echo" (slighlty more info on logcat)

-size of loopdevice change from 1/5 of partition to 1/3

Info about the resize of loopdevice: I have ~200 MB of apps and they use ~80 MB for config. So 5:1 app-data ratio is definitly to low (you all know how internal usage kept growing on app2sd). If you have 1 GB then the loop device is only 200 MB big. That is only 53 Mb more compared to the 143 MB internal storage on default partition table. A loopdevice that small does completly negate the benefits of data2sd. I think having 300mB for data and 600 for apps quite a good value. And apart from that you can still resize the partition with gparted (im not sure if its possible to resize the loopback file - not expirienced with loopback devices).

If someone wants to try the script:

Requirements

-HTC Desire ^^

-SD-card ^^

-A second partition on sd in any format (min: 1024 - due to loopback changes)

Additional Requirements for Nandroid to work with data2sd:

-Clockwork Recovery

-Amon Ra 2.0.1 (can be found here - won't work with older versions)

Install:

1.) Full wipe (needed: files will be lost due to script anyway and the files that are left by the script (like dalvik) could only mess things up).

2.) Flash RCMixHD v0.14b (doesn't work on 0.14 since i forgot to add a file ^^)

3.) DONT REBOOT after the flash

4.) If you failed at step 3 go back to step 1 ;)

5.) flash the attached zip

6.) Now reboot do a quadrant and be happy

7.) Post a bug report if you find one

8.) if i don't respond on that pm me.

9.) ....

10) Profit

Disclaimer:

This is the quick work of a semi-noob who's not responsible for his actions. Make sure you Backup everything (well this should be done anyway if you flash something)