[Desire Android Development] sibere:
I also used my phone in recovery mode. Maybe it helps to get a better compatibility with the phone :)

Since I repartitioned and reformatted it by hand straight on the phone (with fdisk and mke2fs+mkfs.vfat) I 'm getting up to 11mb/s writing speed on my C6 and 12mb/s read speed. not too bad hey? I had lost that performance after using the tool. I've lost a couple of hours at it, but I'm still convinced that doing things manually is much better :)

I still have this excellent script written by Melethron. You ca get inspiration from it:

#!/sbin/sh
log="/tmp/alignment/align.log";
logsd="/sdcard/alignment-log.txt";

if [ ! -e "$logsd" ];
then
echo " ############################################" > $logsd;
echo " # Partition alignment by melethron #" >> $logsd;
echo " ############################################" >> $logsd;
fi;

# lazy unmount since sd is mounted :/ ... im a bit crazy ... i know
sync;
sync;
/sbin/umount -l /sdcard;
/sbin/umount /dev/block/mmcblk0p2
sync;
sync;

echo " " > $log;
echo " " >> $log;
echo "===============================" >> $log;
date >> $log;
echo "===============================" >> $log;
echo " " >> $log;
echo " " >> $log;

# tabs are from old script... to lazy to remove them

echo " +++ Check of 1024k Partition alignment" >> $log;
conf=/tmp/alignment/fdiskconfig;
parttable="busybox fdisk -lu /dev/block/mmcblk0";
# fetching start- and endsector of partition 2 and swap partition (if it exists)
# and fix values if for any case the bootflag is set for a partition (this would retutn "*" for sectorstartp2)
bootflagp2=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p2 | busybox awk '{print $2}'`;
if [ "$bootflagp2" = "*" ];
then
sectorstartp2=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p2 | busybox awk '{print $3}'`;
sectorendp2=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p2 | busybox awk '{print $4}'`;
else
sectorstartp2=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p2 | busybox awk '{print $2}'`;
sectorendp2=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p2 | busybox awk '{print $3}'`;
fi;

if [ -e /dev/block/mmcblk0p3 ];
then
bootflagp3=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p3 | busybox awk '{print $2}'`;
if [ "$bootflagp3" = "*" ];
then
sectorstartp3=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p3 | busybox awk '{print $3}'`;
sectorendp3=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p3 | busybox awk '{print $4}'`;
else
sectorstartp3=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p3 | busybox awk '{print $2}'`;
sectorendp3=`busybox fdisk -lu /dev/block/mmcblk0 | grep mmcblk0p3 | busybox awk '{print $3}'`;
fi;
alignmentcheckp3=`expr $sectorstartp3 % 2048`;
alignmb=`expr $sectorstartp3 / 2048`
swapexist="1";
else
alignmentcheckp3="0";
swapexist="0";
fi;
# mb alignement for log and echo
alignmbp2=`expr $sectorstartp2 / 2048`;
# getting remainder of division by 2048
alignmentcheckp2=`expr $sectorstartp2 % 2048`;

# checking alignment
if [ "$alignmentcheckp2" = "0" ] && [ "$alignmentcheckp3" = "0" ];
then
# remainder 0 ("sector" mod 2048 = 0) means the starting sector is a multiple of 2048 and thus already aligned to MB
echo " +++ Your Partition(s) are already aligned " >> $log;
echo " "	>> $log;
else
# remainder != 0 means the partition is not aligned (at least for 1024k ;) )
# the script will calculates the new starting sector by getting the next multiple of 2048 from old start sector
# Note that for sector=d*2048+r with r!=0: expr ( sector / 2048) gives d (division without rest)

# Adding modifaction info to logfile
echo " +++ Your Partition(s) were NOT aligned:	" >> $log;
echo " " >> $log;

# SD-EXT alignment
if [ "$alignmentcheckp2" != "0" ]
then
# starting sector for alignment
newsectorstartp2=`expr \( $sectorstartp2 / 2048 + 1 \) \* 2048`;

# logfile
echo " --- Your SD-Ext Partition started at sector: $sectorstartp2 " >> $log;
echo " --- and it should start at following sector: $newsectorstartp2" >> $log;
echo " "	>> $log;
fi;

# Swap alignment
if [ "$alignmentcheckp3" != "0" ]
then
# starting sector for alignment
newsectorstartp3=`expr \( $sectorstartp3 / 2048 + 1 \) \* 2048`;
newsectorendp2=`expr $newsectorstartp3 - 1`;

# logfile
echo " --- Your Swap Partition started at sector: $sectorstartp3	" >> $log;
echo " --- and it should start at following sector: $newsectorstartp3" >> $log;
echo " "	>> $log;
fi;

echo " +++ Your Partition(s) were modified:"	>> $log;
echo " "	>> $log;
echo " +++ OLD Partition table of your SD-Card: "	>> $log;
echo " "	>> $log;
echo "__________________________fdisk_Partition_table_____________________________"	>> $log;
$parttable >> $log;
echo "____________________________________________________________________________"	>> $log;
echo " "	>> $log;
echo " "	>> $log;

# creating configfile for fdisk - these are the buttons pressed for a certain action;
# show sectors instead of cylinders
echo "u" > $conf;

# (d)elete the partition (2) -
# INFO: this will deleted even if it IS aligned to let endsector match the starting sector of the swap partition
# this wouldnt be nescassry but if this is not done this would lead to (up to) 1 mb missing
echo "d" >> $conf;
echo "2" >> $conf;

# (d)elete partition (3) if present
if [ "$swapexist" = "1" ];
then
echo "d" >> $conf;
echo "3" >> $conf;
fi;

# create (n)ew (p)rimary partition (2)
echo "n" >> $conf;
echo "p" >> $conf;
echo "2" >> $conf;

# new start sector if not aligned - old if already aligned
if [ -n "$newsectorstartp2" ];
then
echo "$newsectorstartp2" >> $conf;
else
echo "$sectorstartp2" >> $conf;
fi;

# new endsector of p2 if p3 is present AND is not aligned
if [ -n "$newsectorendp2" ];
then
echo "$newsectorendp2 " >> $conf;
else
echo "$sectorendp2" >> $conf;
fi;

#swap if it exists
if [ "$swapexist" = "1" ];
then
# (n)ew (p)rimary partition (3);
echo "n" >> $conf;
echo "p" >> $conf;
echo "3" >> $conf;
# new sector if needed
if [ -n "$newsectorstartp3" ];
then
echo "$newsectorstartp3" >> $conf;
else
echo "$sectorstartp3" >> $conf;
fi;
echo "$sectorendp3" >> $conf;
fi;

# Write the partition table;
echo "w" >> $conf;

# running fdisk
busybox fdisk /dev/block/mmcblk0 < $conf;
sync;

# logfile adding new part table
echo " +++ NEW Partition table of your SD-Card: "	>> $log;
echo " "	>> $log;
fi;

echo "__________________________fdisk_Partition_table_____________________________"	>> $log;
$parttable >> $log;
echo "____________________________________________________________________________"	>> $log;
echo " "	>> $log;
echo " "	>> $log;
echo " "	>> $log;

# format the new SD-ext partition with ext3 and log the output
echo " +++ The SD-ext partition got formated with EXT4:"	>> $log;
echo " "	>> $log;
echo "_________________________mkfs.ext4+tune2fs_output______________________________"	>> $log;
/tmp/alignment/mkfs.ext4 -E stride=64,stripe-width=64 -m 0 -L sd-ext /dev/block/mmcblk0p2 >> $log;
/tmp/alignment/tune2fs -l /dev/block/mmcblk0p2 >> $log;
echo "_______________________________________________________________________________"	>> $log;
echo " "	>> $log;
echo " "	>> $log;

if [ -e /dev/block/mmcblk0p3 ];
then
echo " +++ The Swappartition got formated:"	>> $log;
echo " "	>> $log;
echo "______________________________mkwap_output__________________________________"	>> $log;
busybox mkswap /dev/block/mmcblk0p3 >> $log;
echo "____________________________________________________________________________"	>> $log;
echo " "	>> $log;
echo " "	>> $log;
fi;

#log end
echo "############################################################################" >> $log;
echo "############################################################################" >> $log;
echo " " >> $log;
echo " " >> $log;

# copy log to sd
sync;
mount /sdcard;
cat $log >> $logsd;
sync;
rm -r /tmp/alignment;
sync;

Everything can be done on the phone in recovery mode using an adb shell, except FAT32 FS optimisation. ATM mkfs.vfat embedded into busybox doesn't have all options and I had to connect my phone to my linux box to optimize the FAT32 FS. Latest tests with atto showed that I almost double the write speed with an aligned partition AND aligned filesystem.

The key parameters for using fdisk are those:

fdisk -H64 -S32 /dev/block/mmcblk0

Then the 1st partition (fat32) must start at cylinder 2. Then define your partition size keeping in mind that with the parameters used, each cylinder = 1024K (easy to align this way isn't it? ;) )

Here is the result for my SD. 8GB With 1.2GB used for ext4

# ./busybox-1.18.4 fdisk -l /dev/block/mmcblk0
./busybox-1.18.4 fdisk -l /dev/block/mmcblk0

Disk /dev/block/mmcblk0: 8166 MB, 8166309888 bytes
64 heads, 32 sectors/track, 7788 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 2 6499 6653952 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 6500 7788 1319936 83 Linux
#