23/01/12 - Now with Titanium Backup support!
The Titanium Backup team is awesome. I contacted them and within 3 days they had a working fix. To make sure that titanium backup works properly all you need to do is download the latest version from the market, go into 'preferences' and select 'follow all symbolic links' in the 'Troubleshooting' section at the bottom. That's it. Now you'll be able to backup normally and then restore your apps in any other rom. Neat!
Okay, I've found a rather excellent solution to the low storage problem that plagues the CM7 and CM9 roms - without causing the lagginess of the ".nodatadata" approach. It's not my work but was posted by drefnel on the Cyanogenmod forum. It's very smart: instead of moving the whole of /datadata (fast yaffs2) to /data (slower ext4) and so introducing lag it keeps most apps' non-performance critical data on /data and moves performance critical sqlite databases and xml preference files to the fast /datadata.
Installing this fix is a two step process:
- Phase 1 - some prep, takes around 10 minutes to complete. Only has to be done once.
- Phase 2 - running the script whenever you've installed new apps and used them once or twice. this just involves hitting a shortcut on your home screen. boom!
The original guide can be found here we need to make a few alterations and I've done a step-by-step below:
Step by step guide
- I take no responsibility if using these instructions messes up your phone. They worked for me and you should always be able to restore using the clockworkmod backup. But you can't say you haven't been warned.
- Make sure you're running CM7 or TeamHacksung's CM9 or Onecosmic ICS.
- This will NOT work on encrypted phones.
- DO A NANDROID BACKUP BEFORE YOU BEGIN.
Phase 1 - (if you've already used the ".nodatadata" method then start at step 4)
1. Download Terminal Emulator
2. Open terminal emulator and then enter each of the following followed by return:
- touch /datadata/.nodatadata
3. Reboot (this might take a while as the OS will be making changes to your filesystem).
4. Open terminal emulator and then enter each of the following followed by return:
- rm /data/data/.nodatadata
5. Reboot into recovery, go to "mounts & storage" and then select "format datadata". Reboot normally.
6. Go to the market and download GScript Lite. Open it and close it again - this should create a folder called "gscript" in your sdcard. Unzip the file attached in this post and place the script in it in that folder.
7. Open up GScript Lite, press menu and add script. Click load file, select the script file, make sure that "needs SU" is selected and click save.
8. Run the script by tapping it. You should see GScript report its progress and finally the script should finish. Press close and gscript will crash out (can't have it all ).
Add a shortcut to this script on your desktop.
- CM7 - long-press and hold a blank area of your home screen, select 'add shortcut', and then select 'gscript lite'. select the script you've just added.
- CM9 - go into your app drawer, select the 'widgets' tab, find 'gscript lite', press and hold it and move it onto your home screen. select the script you've just added.
You should use the shortcut after you've installed new apps and used them a few times. There's no harm in not using the script for a while, all that will happen is that app may become a bit laggy until you use the script to move its data to /datadata.
That's it. Congratualtions!
You can flash new CM roms and the script will carry on working fine, but if you wipe data in recovery then you'll have to start from the beginning
You won't be able to easily go back to the original configuration or use the ".nodatadata" method (you'll need to Titanium Backup, wipe everything and then restore), but you'll never miss them.
I hope this helps people out. We should find a way of better automating the steps to make it more noob friendly and maybe Team Hacksung and One Cosmic could incorporate it into their ROMs. (Essentially the script needs to be run periodically to make sure that the performance critical /data/data elements of new apps are copied across to /datadata - apart from that it's not too different from the ".nodatadata" approach).