[Hero, G2 Touch Android Development] byr2:
Hi!

I was experimenting with the data2ext script made for the Desire in following thread:

http://xdaforums.com/showthread.php?t=859419

Now I managed to get it working with HTC Hero and Flykernel12a and Amon RA-s recovery v1.7.0.1 .

MAKING THIS WORKING IS A RISKY OPERATION! DO NOT START IF YOU DO NOT UNDERSTAND WHAT IS WRITTEN BELOW! I'M NOT RESPONSIBLE IF YOU DAMAGE YOUR PHONE OR YOU LOOSE YOUR DATA!

So here is what I made:

- make backup of your entire SD card, because we are going to repartition it, so all data will be lost on your SD card

- reboot to recovery and MAKE NANDROID BACKUP of your existing configuration!!! Then stay in recovery mode, and copy your NANDROID BACKUP to a safe place on your computer from the SD card!!!!! DURING THE OPERATION WE WILL ERASE THE WHOLE SD CARD!!!

- wipe your cache and dalvik-cache (only this 2, NO factory/data reset!!)

- connect to your phone with "adb shell" (while in recovery!!)

- in the shell execute following commands:

(do this only if you have active app2sd and your app/app-private/dalvik-cache directories are on the SD card EXT partition)

mount /data

rm -rf /data/app

rm - rf /data/app-private

rm - rf /data/dalvik-cache

mkdir /data/app

mkdir /data/app-private

mkdir /data/dalvik-cache

chmod 777 /data/app*

chmod 777 /data/dalvik-cache

chown 1000:1000 /data/app*

chown 1000:1000 /data/dalvik-cache

- now we will copy back the apps on the nand

mount /sd-ext

cp /sd-ext/app/* /data/app

cp /sd-ext/app-private/* /data/app-private

(no need to copy the dalvik-cache content!)

umount /sd-ext

- so now we have all our app on the nand again. next step is to put the 04data2extV4 script into the right place

umount /data

mount /system

exit

(now leaving shell to copy file)

in the command prompt execute:

adb push pathtothescript/04data2extV4 /system/etc/init.d/

adb shell

(back to shell again)

chmod 755 /system/etc/init.d/04data2extV4

chown 0:2000 /system/etc/init.d/04data2extV4

rm /system/etc/init.d/05mountsd

(remove script which mounts SD card differently)

rm /system/etc/init.d/10apps2sd

(remove script which makes app2sd)

umount /system

exit

(now leaving shell)

now we have to repartition your SD card to 2 ext and 1 fat partition. For this use the utility1 I uploaded which is modified version of the original utility in /sbin.

in command prompt:

adb push pathtoyourscript/utility1 /sbin/

adb shell

(back to shell)

chmod +x /sbin/utility1

(now execute the utility)

/sbin/utility1

choose 0 from menu: Partition SD 2 EXT 1 FAT (can set sizes)

enter the first EXT partition size (min. 3-400, I use 1300 - values are in MB)

enter second EXT partition size (min. 2-300, I use 300 - values are in MB)

the rest will be configured for the FAT32 file system

On the first EXT partition you will store the whole /data

On the second EXT partition you will store the /data/data in a loop file

Now we are hopefully ready to reboot, the rest will be managed by the 04data2extV4 script, wich creates the ext2 file systems, converts them to ext4, stets file system option such as journaling where needed, etc and copies everything from nand to ext4.

I hope this works for all. I reached Quadrant score for total system score about 455, without data2ext I had about 400. But I have a Class4 SD card. On class6 I'm sure it will be even faster.

Again, it is risky, so take care.

The boot process can be long, because at the first time it will copy the whole /data directory to the first EXT partition, the data/data directory on the 2nd partition, and will recreate the whole dalvik-cache (remember we wiped!).

Enjoy :)

Regards,

byr2

PS: in the RAR file you will find an FSTAB file. I removed the /sd-ext mount option from it. If you have trouble, try to replace the fstab file in /etc to this fstab file or remove the /sd-ext mount option from your fstab