[G1 Android Development] mascian:
I need a little help, please...

I have partiotioned my Sd:

Fat_32= 6 Gb / ext3=1,2 Gb / Linux_Swap= 16 Mb

Is this correct?

Now I modified the script/file "a2sd" in the rom (3.5.2), in this mode (set swap files in the linux_swap partition).

Start:

#!/system/bin/sh

#

# Apps2SD using symlinks and bind mounts

# shade@chemlab.org (cyanogen)

#

sysctl -p

# execute any postinstall script then kill it

if [ -e /data/firstboot.sh ];

then

/system/bin/sh /data/firstboot.sh;

rm -f /data/firstboot.sh;

fi;

if [ -e /dev/block/mmcblk0p2 ];

then

# fsck the sdcard filesystem first

e2fsck -y /dev/block/mmcblk0p2;

# set property with exit code in case an error occurs

setprop cm.e2fsck.errors $?;

# mount and set perms

busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p2 /system/sd;

busybox chown 1000:1000 /system/sd;

busybox chmod 771 /system/sd;

# clean up any old symlinks, create data directories

for i in dalvik-cache data;

do

if [ -h /data/$i ];

then

rm /data/$i;

fi;

if [ ! -d /data/$i ];

then

mkdir /data/$i;

busybox chown 1000:1000 /data/$i;

busybox chmod 771 /data/$i;

fi;

done;

# don't allow /data/data on sd because of upgrade issues - move it if possible

if [ -d /system/sd/data ];

then

busybox cp -a /system/sd/data/* /data/data/;

busybox rm -rf /system/sd/data;

fi;

# move apps and dalvik cache from internal memory to sdcard

for i in app app-private dalvik-cache;

do

if [ ! -d /system/sd/$i ];

then

mkdir /system/sd/$i;

fi

busybox chown 1000:1000 /system/sd/$i;

busybox chmod 771 /system/sd/$i

if [ -d /data/$i ] && [ ! -h /data/$i ];

then

busybox cp -a /data/$i/* /system/sd/$i/;

busybox rm -f /data/$i/*;

fi;

done;

# symlink app dirs - they must be on the same filesystem

for i in app app-private;

do

if [ -d /data/$i ] && [ ! -h /data/$i ];

then

busybox rm -rf /data/$i;

busybox ln -s /system/sd/$i /data/$i;

fi;

done;

# bind mount dalvik-cache so we can still boot without the sdcard

busybox mount -o bind /system/sd/dalvik-cache /data/dalvik-cache;

busybox chown 1000:1000 /data/dalvik-cache;

busybox chmod 771 /data/dalvik-cache;

# clean up old whiteouts

for i in local misc property system tombstones data;

do

if [ -h /system/sd/$i ]; then rm -f /system/sd/$i; fi

done;

# call a userinit.sh script if it's present on the sdcard

if [ -e /system/sd/userinit.sh ];

then

/system/bin/sh /system/sd/userinit.sh;

fi;

setprop cm.a2sd.active 1;

else

# replace symlinks with directories so we can boot without sd

for i in app app-private;

do

if [ -h /data/$i ];

then

rm -f /data/$i;

mkdir /data/$i;

busybox chown 1000:1000 /data/$i;

busybox chmod 771 /data/$i;

fi;

done;

setprop cm.a2sd.active 0;

fi;

========> modification:

if [ -e /dev/block/mmcblk0p3 ];

then

echo 10 > /proc/sys/vm/swappiness;

swapon /dev/block/mmcblk0p3;

fi;

if [ -d /system/media ] && [ ! -h /system/media ] && [ -e /system/sd/media ];

then

busybox mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

busybox rm -rf /system/media;

busybox ln -s /system/sd/media /system/media;

busybox mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system

fi;

modification: =========<

sync;

setprop cm.filesystem.ready 1;

End.

This setting isn't correct...(No problem with flashing, but the swap is not set).

will you teach me how to do this?

Thank you.