[Desire Android Development] floppie:
If you need lot of internal memory ...

I modified 03stuff2sd a little bit, so does it now uses a THIRD ext2/3/4 partition (/dev/block/mmcblk0p3) for /data/data only and leaving app, app-private, dalvik-cache (app2sd+) the way it is.

So the internal memory is used for very very little internal needs only.

The difference to data2ext is, that there is NOT a single big file containing a whole filesystem (ext2 ~ 100MB), but a REAL file system on its own.

So, here is what to do:

1st WARNING: You NEED to be very familar with adb and shell commands!

2nd WARNING: Backup everything

3rd WARNING: Asure your backup is valid and complete

PRESUMPTIONS:

- sdcard layout :

partition1 = fat32 (vfat)

partition2 = ext2/3/4 >= 512MB

- AuraXTSense V8.2 APP2SD+ installed and working

- You've downloaded the attached script 03stuff2sd_mod.txt

Step 1: the new init-script

- reboot into recovery

- cd into the directory where you saved 03stuff2sd_mod.txt

- issue the following commands:

adb shell mount /system

adb push 03stuff2sd_mod.txt /system/etc/init.d/03stuff2sd

adb shell chmod 0777 /system/etc/init.d/03stuff2sd

- check if it is correct by issueing

adb shell ls -l /system/etc/init.d

- shoud look like this:

-rwxrwxrwx 1 root root 577 Aug 1 2008 00start

-rwxrwxrwx 1 root root 247 Aug 1 2008 01modules

-rwxrwxrwx 1 root root 231 Aug 1 2008 02firstboot

-rwxrwxrwx 1 root root 3372 Dec 19 18:13 03stuff2sd

-rwxrwxrwx 1 root root 556 Aug 1 2008 20userinit

-rwxrwxrwx 1 root root 83 Aug 1 2008 99complete

- unount /system by issueing

adb shell umount /system

Step 2: the new (third) partition

- in recovery menu select "mounts and storage"

- select "mount USB storage"

- your pc should now automount the existing two partions

- backup the contents of your current ext2/3/4-partition

for me it mounts as /media/4e8fd0c1-5409, so I use the following commands on MY PC (AS ROOT!):

cd /media/4e8fd0c1-5409

tar cvzf ../4e8fd0c1-5409.tar.gz .

cd /media

- unmount the currently mounted ext2/3/4-partition

umount /dev/sdh2

- use fdisk or gparted and delete the ext2/3/4-partition

- create TWO new partitions in the now available free space

(I had an 1G ext4 partition, so I made 2 x 512MB ext4 partitions)

I further copied the id of the existing ext4 partition into the first one

and added 1 for the id of the second one (the new third) partition

- after the partitions are created select "Unmount" in the recovery menu

- go back to the recovery main menu and select "advanced"

- select "Reboot Recovery" now

- after recovery is rebooted select "mounts and storage"

- select "mount USB storage"

your pc should now automount THREE partitions

- on my pc I issue (AS ROOT!)

cd /media/4e8fd0c1-5409 (this is my first ext4 partition /dev/sdh2)

tar xvzf ../4e8fd0c1-5409.tar.gz

cd /media

- BE VERY SURE ALL DATA IS TRANSFERRED TO THE CARD BEFORE PROCEEDING

sync

umount /dev/sdh2

- after the files are copied and transferred completely select "Unmount" in the recovery menu

- go back to the recovery main menu and select "Reboot system now"

The new init script will copy the files in /data/data to the new partition, this may take a few more seconds / minutes to boot, be patient!!!

If you start ddms and watch the boot process, you will see something like this:

12-19 21:38:41.730: INFO//system/xbin/busybox(64): +++ Starting Camera Prio +++

12-19 21:39:01.210: INFO//system/xbin/busybox(64): +++ Apps-to-SD-MOD successfully enabled

12-19 21:39:01.270: INFO//system/xbin/busybox(64): +++ Apps-to-SD successfully enabled

This tells you, that the app2sd-mod was successful!

Good luck, mates!

EDIT 24-12-2010:

Attached a new 03stuff2sd_mod.txt with modified mount options to remove any lag (data=writeback,commit=10).