[Captivate Android Development] GGXtreme:
*For those getting "Low on space"/FC's from full /datadata partition*

I've found an alternative to moving apps to SD (mainly because this is not an option for me). I found the workaround here, so credit goes to those that came up with it and worked on it.

Here are the steps to implement the workaround, cleaned up a bit for CM9 use. Implement this workaround at your own risk. This may negatively impact the performance of your device, but the impact won't be as severe moving apps to your SD card or using only the 2GB partition for app data.

*Some of your apps (such as your homescreen launcher) may lose user data after you complete these steps. If you have the Nook app installed, please uninstall it before starting and reinstall it afterward.*

After re-entering the data and setting up my homescreens again, I haven't had any issues with data being lost or reset.

Using a terminal emulator or adb shell, run the following commands to replace the symlink to the /datadata partition located on 2GB /data partition with the actual contents of /datadata (the last 3 lines won't run until you've entered all 3, hitting the enter key between each line):

su
cp -a /datadata /data/data.new &&
rm /data/data &&
mv /data/data.new /data/data

Reboot the device.

Using a terminal emulator or adb shell, run the following commands to delete the contents of the /datadata partition:

su
rm -r /datadata/*

You may receive an error about a directory named "lost+found", but this is OK.

Copy and paste the following script into a text editor and save it as a .txt file with any name onto your internal SD card. Do not save it as a .sh file or attempt to load it with Script Manager or place it in init.d. This script (copied from the original thread I mentioned above) will scan the app data on the 2GB /data partition and move the appropriate databases and files back to the faster but smaller partition, while leaving most of the larger files where they are:

#!/system/xbin/sh
# move_data_to_yaffs.sh
#
# Move select subdirectories from the ext4 /data/data directory onto the
# quicker yaffs /datadata directory and create symbolic links in their place.
#
#
# This script is designed for Cyanogenmod 7.X on Samsung Galaxy S (tested
# with Vibrant) for users who have moved their app data from /datadata back
# to /data/data using a procedure like:
#
# cp -a /datadata /data/data.new &&
# rm -f /data/data &&
# mv /data/data.new /data/data
#
# This script then moves select subdirectories from each app back onto the
# faster yaffs filesystem. It should improve app startup and runtime
# interactivity.
#
# This script may be run multiple times and should be run after one or more
# new apps are installed. I just keep this script in /datadata and run it
# whenever I need to from a terminal, but you can put it in /system/bin, or
# someplace else, if you like.
#
# Background
# On Samsung Galaxy S, cyanogenmod 7 creates a ~175MB yaffs partition which
# holds all app data. This partition is mounted at /datadata and the usual
# location of this directory at /data/data is a symbolic link that points
# to /datadata.
#
# $ ls -l /data/data
# lrwxrwxrwx 1 system system 9 Oct 8 19:34 /data/data -> /datadata
#
# The app apk itself does not reside here, but data created by the app resides
# here, especially, the app's sqlite databases and user preference xml files.
# The cyanogenmod developers did it this way to address the lag experienced on
# the stock Galaxy S firmware. But, this produces a problem.
#
# The /datadata partition is quite small and may be filled up quickly by an
# app that caches a lot of data (g+ for example). Once /datadata fills up,
# apps will begin force closing since they will not be able to create any new
# data on /datadata. The ext4 /data partition, which is about 2GB, has plenty
# of space free. So, it is attractive to move /datadata onto this large
# partition. But then we have the lag problem again. That's where this script
# comes in. It moves certain subdirectories from each app back onto the low
# latency yaffs partition (mainly sqlite database files and xml config files)
# and keeps the large cached files that an app may create or download on the
# much larger 2GB ext4 partition.

# Move these app subdirectories
dirs_to_move='databases shared_prefs opera app_databases'

# Skip these apps
# Barnes & Nobles keeps a few processes running in the background *all-the-time*
# for some reason. If you move its databases while these are running,
# then the app no longer works correctly, so skip it.
# * You can clear its data (or maybe log out) which will stop these processes,
# and then create the symbolic links by hand if you want. Once you log in,
# the new files will be created in /datadata and the app will work correctly.
# The Amazon Kindle app and Google Books app do not have this problem.
skip_apps='bn.ereader'

datadata='/data/data'
yaffs='/datadata'

test -L "$datadata" && {
echo 1>&2 "Error: <$datadata> is a symbolic link, aborting"
exit 1
}

cd "$datadata" &&
for app in *; do
echo " $skip_apps " | grep " $app " && continue
for d in $dirs_to_move; do
if [ ! -L "$app/$d" -a -d "$app/$d" ]; then
echo "Processing $app/$d..." &&
if [ -d "$yaffs/$app/$d" ]; then
rm -r "$yaffs/$app/$d"
fi &&
tar -cf - "$app/$d" | tar -C "$yaffs" -xf - &&
rm -r "$app/$d" &&
ln -s "$yaffs/$app/$d" "$app/$d" &&
chmod 775 "$yaffs/$app" ||
echo 1>&2 "Error: failed moving $app/$d"
fi
done
done

Install the Scripter app from the Android market. You must use either Scripter or GScript for this script to run; it will fail if you use Script Manager or busybox sh to run it.

Using an Android text editor (such as Jota Text Editor), open the text file you saved containing the script, long-press to Select All of the text and Copy the entire script onto the Android clipboard.

Open Scripter. When you get a popup message, choose "Browse as root" and Allow the superuser prompt. Close the popup message and choose Create script. Name the script whatever you want (ie. 'App Data Optimizer') and long-press Paste the script you copied into the box labeled Commands. Hit Save.

Tap your script in the Scripter app and hit yes when asked if you want to run the script. The script should run successfully (you can choose 'More Info' to check if there were any errors). Reboot your device.

It is recommended that you open Scripter and run this script after installing all of your apps, or after installing a lot of new apps.

This fix has solved my "low on space" problem and allowed me to install all of my usual apps (more than twice the number I was able to with the default setup) without taking the same performance hit as the other workarounds. I hope this helps those who were having the same problem. I personally think the Cyanogenmod team should implement an option like this in their ROM for those who are too restricted by the size of the oneNAND chip, but if not, I'm fine with this method.