FIRST OF ALL, do a Nandroid backup, as well as a backup of your sd-card content !

You're doing this at your very own risk, I'm not to be held responsible if something goes wrong

There's another little warning I need to add to this, using part of your sd-card as swap space will cause that part of your card to undergo lots of read/writes, thus shortening the life of that part of the card...

I've been using hard swap for quite a long time now, no issues to report, but don't tell me I didn't warn you

Now that said, let's get going

Initially this was a script and a guide that explained how to format and use a swap partition, but I've gone further in the meantime, since this now is a flashable MOD that will, if you have a swap partition on your SD-card, format that partition and install a swap activation script in system startup for you.

Here is how to use this mod :

1) Have I mentiond to backup your system (Nandroid) and SD-card ?! Cause now would be a real good time to do so

You can create as many partitions as you like/can, as long as all are primary partitions. This MOD will look for the swap partiton and find it even if it's not the last, though it's common practice for swap to be the last partition.

Just please don't create more than one swap partition, I don't know how the script would react if there were more than one ! You've been warned !

5) Reboot your phone, start a terminal again and type free, you'll need to see something different than 0 in your swap line, look at the attached print-screen

Swappiness will be set to 50 by the script, which is a rather conservative swap use, made sense to me since SD-swap is slower than ram, better not to use it too agressively. Feel free to experiment with the swappiness variable in the script (values between 0 and 100, 0 meaning "try not to swap", 100 meaning "try to swap all the time")