how-to_‎ > ‎

Free NAND memory in CM9 on Samsung I-9000

posted Aug 27, 2012, 6:34 AM by Daniele Albrizio   [ updated May 22, 2014, 9:36 AM ]
Samsung I-9000 comes with a narrow NAND partition where a lot of apps puts their "need to be read fast" data.
When you get some 100 apps installed, the phone warns you it's running low in memory. It's quite difficult to understand that the memory that is going to be filled is the NAND memory. You can point out this using the "df -h" command inside "adb shell": the command from the platform-tools of the Android Software Developement Kit.

I did a script, called it convert.sh and put in /datadata directory using adb.
I then created the /data/datadatamoved/ directory to keep bigger applications.

Contents of the script follows:

# example:
# . ./convert.sh com.google.android.apps.reader
mkdir -p /data/datadatamoved
[ -L $1 ] && exit || \
 cp -Rp /datadata/$1 /data/datadatamoved/ && \
 \rm -r /datadata/$1 && \
 ln -s /data/datadatamoved/$1 $1

Don't forget to "chmod 700 convert.sh".
This script will move and link the files used by selected applications (even if this procedure is going to store data in internal SDcard, please select applications that do not crash or corrupt the phone if the sdcard is removed (e.g. mounted on pc) )


Also, setting default installation to external SD may help:
shell@android:/ # pm get-install-location
0[auto]
shell@android:/ # pm set-install-location 2
shell@android:/ # pm get-install-location                                    
2[external]


Comments