[G2 and Desire Z Android Development] kbeezie:
Tested Roms (will not test SD-SWAP on most)

These are some roms I've tried the enabler on, since I don't use a swap partition on my SD card I don't bother testing it and usually don't advise using SD-Swap. It's only in the enabler for sake of completeness. All sd-ext tests are done as ext4 unless otherwise specified.

Andromadus Slim Bean Build 6 (JB 4.2.2)

DataSwap - OK

SD-EXT - OK

SD-Swap - Untested

Andromadus Mimicry 1.3+ (CM9 ICS)

DataSwap - OK

SD-EXT - OK

SD-SWAP - Not Tested

Andromadus Test builds - Jelly Bean(CM10) - Build #61+

DataSwap - OK

SD-EXT - OK

SD-SWAP - Not Tested

Virtuous Infinity 1.31.0 Alpha3 (Full Sense 4.0)

DataSwap - ISSUES*

SD-EXT - OK

SD-SWAP - Not Tested

*The init script in /system/init.d/80dataswap didn't automatically execute upon boot. However when running it manually it worked fine. (might be fixed in 1.3, have not tested yet).

ILWT CM7 (Build 471) with ILWT CM7 Kernel

DataSwap - OK

SD-EXT (as ext4) - Not Working *

SD-EXT (as ext3) - OK

SD-SWAP - Not Tested

* When /sd-ext formated as ext4 was not working, I used 4EXT recovery to format it to ext3 under tools -> wipe/format => ext3, rebooted and it worked.

Gen.Y VisionX B4

DataSwap - FIXED*

SD-EXT - OK

SD-SWAP - Not Tested

*Fixed in 1.3 to include the busybox prefix, 1.4 to include shebang (#!) string.

UPDATED Aug 19th 2012

v1.4 Changes from 1.3

Added shebang (#!) string to dataswap scripts

Changed init script permissions from 750 to 755

v1.3 Changes from 1.2

Updated dataswap script to use busybox prefix for swapon/mkswap

Updated SD-Swap to use busybox prefix

v1.2 Changes from 1.1

Added addon.d support for supporting Roms

v1.1 Changes from 1.0

Fixed a bug where 96MB option installed 64MB

Added 128MB DataSwap Option

Added ability to enable SD-Swap (choose w/ Sd-Ext if SD-Ext partition exists, without w/o)

Changes from previous version (1.0):

Migrated to Aroma 2.50 Installer

Removed SD-Swap activation from SD-Ext Enabler Script

SD-Ext Init Script made smaller (Specific to HTC Vision/G2/Desire-Z now)

Now with the Aroma installer allowing for an easier selection of mods to be applied.

DataSwap Enabler

64MB DataSwap (Recommended for some Roms)

96MB Option (heavier multitasking)

Skip/Off (do nothing, skip to next mod)

Remove (removes the swap file and swap script)

SD-Ext Enabler

Enabled (detects and migrates /data/app and /data/app-private to /sd-ext)

Skip/Off (Do nothing, leaves as-is)

Revert (Moves all apps from sd-ext back to /data and removes script)

SD-Swap Enabler

Enabled w/ SD-Ext - does not enable Sd-EXT, simply enables SD-Swap correctly if SD-Ext partition also exists

Enabled w/o SD-Ext - enables SD-Swap when no SD-Ext partition exists on the SD card

Skip/Ignore - Does nothing/skips

Remove - Removes the SD-Swap enabling script

Do not enable SD-Swap if your Rom Already supports SD-Swap out of the box (elitemod, etc), so double check first.

If you don't have an SD-Ext partition, then Swap partition will be the 2nd partition on the SD Card, otherwise it's the 3rd. Thus why the installer makes the distinction for with and without SD-Ext when it comes to SD-Swap options.

Regarding addon.d support

In roms that support /system/addon.d, during an upgrade (flashing a new rom) shell scripts in /system/addon.d would be utilized by the backuptool allowing the ability to upgrade the rom without having to re-flash the extra roms.

For example in my /system/addon.d/ folder there will be a 60-kbeezie.sh script when flashing version 1.2. If you were to upgrade your rom (for example Mimicry 1.3.2 to 1.3.3), the dataswap, sd-ext, sd-swap init scripts will be backed up, and then restored after the new rom has been upgraded (the same way google apps is preserved in the 1.3.3 upgrade, so no need to re-flash google apps).

So on any roms that support addon.d, you'll be able to upgrade your rom to the next version without having to reflash the dataswap/sd-ext enabler.

What is DataSwap

Dramatically improves multitasking. (Can be used with or without SuperChargerV6).

In layman's terms it's a swapfile placed in the /data partition, where it should be faster than using a swap partition on the SD card. Unlike SDSwap repartitioning is not needed. Every reboot removes and re-adds the file so that the file isn't working on one specific part of the emmc chip all the time (one of the downsides to SD Swap).

More information can be found on the original DataSwap post by Nik3r

http://xdaforums.com/showpost.php?p=27608489&postcount=153

What is SD-EXT

The /sd-ext mount is a partition on the SD card formatted as ext4 allowing you more app storage space. Unlike other means of running apps off an /sd-ext partition, this mod/script only maps /data/app and /data/app-private to the /sd-ext leaving caching and other features on the internal memory where it is most efficient.

Because SD-EXT in this case is replacing your /data/app and /data/app-private you want to ideally make it bigger than your /data partition (no less than 1.5GB, 2GB is a good fit). However bear in mind that if you wish to revert back to using only internal storage, you'll want to make sure that your /data partition has enough room for the applications to be moved back.

Why Both Together?

When all the user apps are placed on /sd-ext you are typically freed of roughly 600-700MB of storage on your /data partition. Doing so gives the swap file more room to move about the /data partition, but also splits the I/O (input/output traffic) between your SD card for apps, and internal memory for swap/cache, which may improve the overall experience (and may also prolong the life of your device... in theory).

Also You are not as likely to run the risk of /data suddenly running out of memory because a 64MB swap file is created on top of your app space. (i.e.: say you only have 70MB free in /data from all your apps, and you reboot to apply DataSwap but not SD-EXT, your /data would become dangerously close to being full when the swapfile is created). Hence DataSwap should be used in conjunction with SD-Ext.

Tips

If you currently use EliteMod ICS, you should be able to use this zip to revert a SD-Ext installation back to internal memory. Just make sure you re-partition the SD card after reverting so that EliteMod's init script doesn't automatically move the applications back to sd-ext upon the next reboot.

The effect of DataSwap will greatly depend on how your rom handles memory. For example on Mimicry with SuperChargerV6 option selected, the DataSwap will rarely be used, but it is handy for rapid burst of memory when apps need it. Without SuperChargerV6 the dataswap does get used a bit more often with more apps active in memory, but the extent of it varies on your rom's configuration.

If you're considering reverting SD-EXT apps back to the internal memory the following command will show you partition usage (can be run in either terminal emulator, or adb shell):

busybox df -hm

With an output similar to this:

Filesystem Size Used Available Use% Mounted on
tmpfs 183.6M 60.0K 183.5M 0% /dev
tmpfs 183.6M 0 183.6M 0% /mnt/asec
tmpfs 183.6M 0 183.6M 0% /mnt/obb
/dev/block/mmcblk0p25
549.2M 236.1M 313.1M 43% /system
/dev/block/mmcblk0p26
1.0G 239.8M 834.1M 22% /data
/dev/block/mmcblk0p27
295.3M 25.5M 269.7M 9% /cache
/dev/block/mmcblk0p28
20.6M 14.7M 5.9M 71% /devlog
/dev/block/mmcblk1p2 2.0G 374.4M 1.6G 19% /sd-ext
/dev/block/mmcblk1p2 2.0G 374.4M 1.6G 19% /data/app
/dev/block/mmcblk1p2 2.0G 374.4M 1.6G 19% /data/app-private

Note how above /data has 834MB available, and /sd-ext is using 374MB, meaning /data will have enough room for the apps if you wish to revert.

DISCLAIMER

There is no guarantee this will work with all Roms, I've only tested it on a small handful of ICS roms (mimicry 1.3.1, EliteMod ICS). It is known to be skittish/non-working with most GB roms.

Do not ask if this would work on JellyBean, there's quite a bit of work that still needs to be done with JellyBean, and trying this on an alpha/preview JB rom will not likely work, plus I won't provide any support for someone complaining that it doesn't work on JellyBean as I'm not using JB right now.

Credits and Thanks

Thanks to Nik3r who originally wrote both scripts for his own EliteMod ICS Rom which provides both of these features natively to the rom (DataSwap is a seperate zip, but the rom itself already has SD-Ext/Swap support built in).

Thanks to blk_jack for providing support and information regarding the Aroma installer and assistance in testing swap on mimicry.

Checking if it worked

Typing free in either Terminal Emulator or adb shell, should show the approximate dataswap size on the swap line:

total used free shared buffers
Mem: 375916 372156 3760 0 4352
-/+ buffers: 367804 8112
Swap: 65532 17132 48400

For checking to see if SD-EXT is active, you can use the following command in terminal emulator or adb shell

adb shell busybox df -hm

Filesystem Size Used Available Use% Mounted on
tmpfs 183.6M 60.0K 183.5M 0% /dev
tmpfs 183.6M 0 183.6M 0% /mnt/asec
tmpfs 183.6M 0 183.6M 0% /mnt/obb
/dev/block/mmcblk0p25
549.2M 235.9M 313.3M 43% /system
/dev/block/mmcblk0p26
1.0G 287.8M 786.1M 27% /data
/dev/block/mmcblk0p27
295.3M 73.9M 221.3M 25% /cache
/dev/block/mmcblk0p28
20.6M 8.8M 11.8M 43% /devlog
/dev/block/mmcblk1p2 2.0G 362.5M 1.6G 18% /sd-ext
/dev/block/mmcblk1p2 2.0G 362.5M 1.6G 18% /data/app
/dev/block/mmcblk1p2 2.0G 362.5M 1.6G 18% /data/app-private
/dev/block/vold/179:65
12.8G 7.8G 5.1G 61% /mnt/sdcard
/dev/block/vold/179:65
12.8G 7.8G 5.1G 61% /mnt/secure/asec

You'll see that /sd-ext /data/app /data/app-private are identical in their capacity, usage and free space.

AGAIN there is no garantee it will work in every rom, if you do find success with it, post what rom and version you are using.

ALWAYS PERFORM A NANDROID BACKUP BEFORE APPLYING MODS JUST IN CASE

MD5 Checksum for kbeezie_dsext_enablerv1.4.zip: b0d00d89f265c57ba2aee0d7dc5ead24