[Desire Android Development] Zeljko1234:
I played with this all day. I learnd a lot but unfortunately it doesn't work for me. I still have about 70MB free for applications.

Look my log and try to find bug :)

C:\android-sdk-windows\tools>adb shell
~ # mount /system
mount /system
~ # exit
exit

C:\android-sdk-windows\tools>adb push c:\busybox-armv6l /system/xbin/busybox
1253 KB/s (0 bytes in 1062992.000s)

C:\android-sdk-windows\tools>adb push c:\01data /system/etc/init.d/
5 KB/s (0 bytes in 367.000s)

C:\android-sdk-windows\tools>adb shell
~ # mount /data
mount /data
~ # mount /sdcard
mount /sdcard
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)
/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,relatime)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,relatime,fmask=0000,dmask=0000,all
ow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
~ #
~ # chmod 755 /system/etc/init.d/01data
chmod 755 /system/etc/init.d/01data
~ # cd /
cd /
~ # mount /dev/block/mmcblk0p2 /sd-ext
mount /dev/block/mmcblk0p2 /sd-ext
~ # dd if=/dev/zero of=sd-ext/ext2 bs=1048576
dd if=/dev/zero of=sd-ext/ext2 bs=1048576
dd: writing 'sd-ext/ext2': No space left on device
914+0 records in
912+1 records out
956448768 bytes (912.1MB) copied, 351.134399 seconds, 2.6MB/s
~ # chmod 755 /system/xbin/busybox
chmod 755 /system/xbin/busybox
~ # /system/xbin/busybox mke2fs -m 0 -F -L userdata /sd-ext/ext2
/system/xbin/busybox mke2fs -m 0 -F -L userdata /sd-ext/ext2
Filesystem label=userdata
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
58496 inodes, 233508 blocks
0 blocks (0%) reserved for the super user
First data block=0
Maximum filesystem blocks=4194304
8 block groups
32768 blocks per group, 32768 fragments per group
7312 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

~ # mkdir /sd
mkdir /sd
~ # /system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
~ # cd /data
cd /data
/data # cp -a * /sd
cp -a * /sd
/data # cd /
cd /
~ # ls -l /sd
ls -l /sd
drwxrwxr-x 2 system system 4096 Nov 28 15:14 anr
drwxrwx--x 2 system system 4096 Nov 28 15:15 app
drwxrwx--x 2 system system 4096 Nov 28 15:15 app-private
drwx------ 4 system system 4096 Nov 28 15:14 backup
drwxrwx--x 2 system system 4096 Nov 28 15:18 dalvik-cache
drwxrwx--x 178 system system 8192 Nov 28 15:15 data
drwxr-x--- 2 root log 4096 Sep 17 20:26 dontpanic
lrwxrwxrwx 1 root root 11 Nov 28 20:08 drm -> /data/local
drwxrwx--x 4 shell shell 4096 Nov 28 15:15 local
drwxrwx--- 2 root root 16384 Sep 17 20:26 lost+found
drwxrwx--t 10 system misc 4096 Nov 28 15:15 misc
drwx------ 2 root root 4096 Nov 28 15:14 property
drwxrwxr-x 8 system system 4096 Nov 28 19:33 system
drwxr-xr-x 2 system system 4096 Nov 28 15:15 tombstones
~ # df -h
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 199.4M 0 199.4M 0% /dev
/dev/block/mtdblock4 40.0M 1.6M 38.4M 4% /cache
/dev/block/mtdblock3 250.0M 243.1M 6.9M 97% /system
/dev/block/mtdblock5 147.6M 70.8M 76.8M 48% /data
/dev/block/mmcblk0p1 2.8G 2.3G 549.4M 81% /sdcard
/dev/block/mmcblk0p2 912.2M 912.2M 0 100% /sd-ext
/dev/loop0 897.8M 69.9M 827.8M 8% /sd
~ # /system/xbin/busybox umount /sd
/system/xbin/busybox umount /sd
~ #