[Samsung Epic 4G Touch] egingell:
I will now tell you how you can use the whole internal SD card for Link2SD's second partition and use your physical SD card in place of it with a 300MB "external sd". *Only works on non-emulated sdcard supported devices.

Requirements:

A rooted ROM that supports init.d scripts. I use The Blu Kuban.

Link2SD.

A physical compatible MicroSD card. If you don't have one, this will not work.

Either ADB with a text editor, PC, and USB or an on-phone text editor. For PC, I recommend PSPad. For on-phone, I recommend Jota.

[size=+1]I provide this information with no warranties or guarantees and I only tested it on the Sprint Epic 4G Touch and The Blu Kuban ROM. Use it at your own risk.

Please note that this *only* works if your ROM does *not* use the "hidden" partition (/dev/block/mmcblk0p12) for system apps.[/size]

Install Link2SD. It will yell at you because there's no second partition on the SD card. Just ignore that.

Two Options (Option 2 is untested and might not work at all given that the SD card(s) may or may not be mounted when the script runs and prematurely mounting them before the vold.fstab file is executed might break the bind when the vold.fstab file is executed):

Make a file named "11link2sd" with the following contents, copy it to /system/etc/init.d, and give it 777 permissions ("chmod 777 /system/etc/init.d/11link2sd"):

#!/system/bin/sh
#added by link2sd
LOG=/data/link2sd-11link2sd.log
echo "$(date) mounting..." > $LOG

mount -t vfat -o rw /dev/block/mmcblk0p11 /data/sdext2 1>>$LOG 2>>$LOG

mount >> $LOG
echo "$(date) mount finished" >> $LOG

Make a folder on your internal or external SD card named "link2sdext2" (the name is arbitrary, but I will be using it in the script) and make a file named "11link2sd" with the following contents, copy it to /system/etc/init.d, and give it 777 permissions ("chmod 777 /system/etc/init.d/11link2sd"):

#!/system/bin/sh
#added by link2sd
LOG=/data/link2sd-11link2sd.log
echo "$(date) mounting..." > $LOG

# Leave out "/external_sd" if you are using your internal SD card.
# And check the path, it may be different for your ROM.
mount -o bind /mnt/sdcard/external_sd/link2sdext2 /data/sdext2 1>>$LOG 2>>$LOG

mount >> $LOG
echo "$(date) mount finished" >> $LOG

Edit the file /system/etc/vold.fstab. Comment out (prefix the line with "#") every line that starts with "dev_mount" and add the following lines:

# Mount the physical SD card to /mnt/sdcard
dev_mount sdcard1 /mnt/sdcard auto /devices/virtual/block/cyasblkdevblk0

# Mount the "hidden" partition of the eMMC to /mnt/sdcard/external_sd.
# Depending on the ROM, you may need to change this to something else.
# Check the lines you commented out for the actual paths for your ROM.
dev_mount sdcard /mnt/sdcard/external_sd 12 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0

* Basically, you're just going to remove "encryptable_nonremovable," swap "/devices/platform/dw_mmc/mmc_host/mmc0/mmc0" with "/devices/virtual/block/cyasblkdevblk0," and change "11" to "12."

Reboot and start using Link2SD to move/link your data off the /data partition.

I have attached my 11link2sd and vold.fstab for your convenience and illustration. It is *not* a flashable ZIP on purpose, every ROM is different and flashing the scripts blindly may have undesirable consequences; however, both files work on my phone: an Epic 4G Touch from Sprint with The Blu Kuban 1.0.5.4 ROM (ICS FL24 4.0.4).