[SCRIPT] No-lag solution to CM7/9 "low memory" notifications (STEP BY STEP,FIXED TB)

Search This thread

androidmonkey

Senior Member
Mar 3, 2009
1,206
38
How can I revert back to the way things were before using this script? Ive been using it for 2 weeks and my phone is just dog slow. It reminds me of using a 486 computer back in the day...
 

Paulroberts

Senior Member
Jun 29, 2009
719
199
A fully automatic system for implementing this would need a change to the Android system or a background app that scans the system and moves folders across as they appear. I'm not skilled enough to make the app and there's no way that pawitp would change the way Android works.

A second best is to have a system option that would allow you to switch between putting everything on data (the simple but laggy .nodatadata option) and this script (which it would do by creating an init.d script, that would move folders across at boot time). This might be achievable (but would need the stock CM kernel to support init.d scripts...).

pawitp said the latest nightlys support init.d scripts

Stock kernel does support init.d, but it would be more wise to install stuff to /data/local/userinit.d where it doesn't get wiped everytime you flash.
 

DaveBG

Senior Member
Mar 18, 2011
183
11
Hi everyone. If i do not care about the lag and just want to move /datadata to the 2GB partition and have no space problem i just need to execute:

su
touch /datadata/.nodatadata

Then reboot and on reboot everything will be moved and all my apps will work right?

EDIT:
Yes it works! datadata is empty and all apps work. Reboot took 1-2 minutes longer :) Everything is FINE for now! Thank you!
 
Last edited:

r0b0

Member
Dec 22, 2011
32
0
Seattle, WA
I followed the steps in post#1 and after that I see /datadata empty, so this script looks like didn't work for me. All data are still in /data/data.

---------- Post added at 04:12 PM ---------- Previous post was at 03:58 PM ----------

I followed the steps in post#1 and after that I see /datadata empty, so this script looks like didn't work for me. All data are still in /data/data.

When I run the script from gscript it exits instantly, seems like it didn't do anything. Then I run that script by using romtoolbox, and then I saw it moving stuffs from /data/data to /datadata. So script itself is good, some problem with its execution.
 

stven

Member
Aug 22, 2011
19
4
Hey guys. Im doing test today. After i running this script and database has been move into /datadata partition, i try to delete "android system info" app database on /data/data. Of course i have running it before and change the default setting. After that, i run again and the app start like it first newly install without my previous setting. Did i make a mistake with the procedure in op? Im using ics aokp rom

Sent from my SCH-I500 using Tapatalk
 

buresh.kevin

Senior Member
Jan 19, 2011
352
6
I followed the instructions, and after I format datadata (step 5) it never reboots. It stays at the bootscreen. I did everything up to step 5 as it was listed...
 

Partridge86

Senior Member
Jul 8, 2012
151
19
Shawnee
wifi issue

Not sure if anyone else has had this issue however since performing this my phone has not given me any fc's or low memory warnings. However, I have not been able to connect to any wifi that is password protected. It goes through the process and then says authentication failed. Does anyone have an idea as to how I can fix this?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 41
    [SCRIPT] No-lag solution to CM7/9 "low memory" notifications (STEP BY STEP,FIXED TB)

    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:

    • su
    • 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:

    • su
    • 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 :D ).

    Phase 2

    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.

    Good luck

    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).
    2
    Yup I've tried both and the script approach is definitely much quicker in my case. I'm going to see if I can simplify this procedure somewhat.
    2
    Seems to me that the biggest problem with /datadata are the per-app cache's of webviewCacheChromium class data.

    This is an Android supplied method to provide a WebView, i.e. it's how apps can easily display some web content. So often used e.g. for changelogs, help pages, and anything else the app wants to display from the web without firing up a full browser.

    By default, this seems to cache about 5.6MB per app that uses it. So it doesn't take too many of those to stuff up the 170MB /datadata partition, even without the other cache uses (e.g. database dirs) etc.

    The app can clear the cache itself, but it seems that many do not do this, at least in my experience.

    Settings - Apps - - Clear Cache *does* clear it fortunately, so you can try that, and then as long as the app doesn't do it again, you might keep the space thus recovered. e.g. if it's only used by the app occasionally... worth keeping an eye on, at least.


    Edit: http://xdaforums.com/showthread.php?p=23485715

    I've also got the impression that moving apps to SD doesn't *always* move their associated data/cache from /datadata. I need to re-test this a bit...
    2
    Is that normal to have 2040 points at Quadrant after using this no-lag solution, without overclock. Before that I could only reach 1700 with 130% Live oc.
    I'm using teamhacksung's CM9 ALPHA, BETA 16 with Icy Glitch V14.

    That's normal, with /datadata on /data partition, you will get a big score in database read/write test. This is why quadrant score is useless ;)
    2
    I've tried everything that you've said but it still didn't work.. I still got the same error.. i tried both but nothing worked.. :(

    Than how about:
    rm -rf /datadata/lost+found
    rm -f /datadata/*
    And proceed?

    Edit: do the format trick, more easy (why didn't I come up with that :))
    Taptalked u see