[SCRIPT][CM7/9] /datadata/ low storage notification lagless fix - init.d script

Search This thread

millerm

Member
Mar 30, 2006
47
5
My chrome performance was better with the 2903 patch, but still much worse then original unfortunately. I loved the chrome browser but think of going back to opera because of this.

Sent from my GT-i9000 using Slim ICS 3.0
 

parhelion69

Senior Member
Mar 17, 2010
178
68
La Paz
I flashed slim 3.1 4.0.4 yesterday, and now I got the "low space" notification, I flashed this and hasn't solved the problem. Weird, since it worked on CM9.

I used DiskUsage to check my datadata partition and it's full at 170MB, the biggest offenders are:
System data: 60.4 MB
Chrome 30.9 MB
com.android.providers.media 21.9 MB

Any idea why this isn't working?
 

finnsonc

Senior Member
Nov 4, 2010
56
11
I flashed slim 3.1 4.0.4 yesterday, and now I got the "low space" notification, I flashed this and hasn't solved the problem. Weird, since it worked on CM9.

I used DiskUsage to check my datadata partition and it's full at 170MB, the biggest offenders are:
System data: 60.4 MB
Chrome 30.9 MB
com.android.providers.media 21.9 MB

Any idea why this isn't working?

Have you tried the link fixer that was posted awhile back?
 

kathees

Senior Member
Feb 8, 2012
145
13
Singapore
There was a lot of mistake in these previous files (who said it was bullsh*t ?? :D). Now I spent some time to correct it and it finally works (applied on my own phone).
Got around 95Mo free on /datadata (13Mo before) and only /lib subdirectories are still in /data/data, everything else is in /datadata (as suggested by @Kagadar). My phone is still smooth (Pre-CM9+glitch kernel).

Here is the precious : Datafix_29032012.zip


I made a datafix undo script too : undo_30datafix (only few lines of basic shell commands). Run it via adb (or terminal emulator) as root. Take care about warning : you have to edit the file before it works. Once done, run it again. You'll have then a lot of warning (file exists) : don't panic it's normal. ;)

As always, a nandroid backup is *NOT* an option before using this.

The initial version in the first post worked fine for me. Today I saw this thought it may be doing something good than the initial one.

So I flashed and checked strangely my datadata used was 0MB. I was wondering why so restarted the phone and removed the script using semaphore (0.9.5b) clear init.d option and restarted.

Too bad it was boot looping.

1) I tried to flash the initial version again and restarted
2) then semaphore 0.9.1 and restarted
3) then again script included above and restarted

Nothing worked. Just was looping the boot animation nearly 15 minutes....

I don't know what's wrong. Now restoring a nadroid backup which I took 2 weeks ago. (Too bad I haven't do a backup just before flash this)

Be aware. Can I know what could be the possible reason for this messup?
 

Wendigogo

Senior Member
Jun 14, 2010
614
327
Lyon
Samsung Galaxy Note 20 Ultra
I flashed slim 3.1 4.0.4 yesterday, and now I got the "low space" notification, I flashed this and hasn't solved the problem. Weird, since it worked on CM9.
This issue is known : it's a busybox linking problem. As @finnsonc you'll have to try the fix posted 3/4 pages before (installing busybox with the market app should work too).

The initial version in the first post worked fine for me. Today I saw this thought it may be doing something good than the initial one.

So I flashed and checked strangely my datadata used was 0MB. I was wondering why so restarted the phone and removed the script using semaphore (0.9.5b) clear init.d option and restarted.
I don't try it with previous fix applied. But it should be working as it only moved back more files to /datadata.

Having /datadata unused means the fix only apply partially : everything was on /data/data. Removing the script is not a good idea in this case. You should try reboot/run it once more and check /datadata. If it's still unused you could post error messages from command line here so I could see what's wrong ...
 

yalouf

Senior Member
Jan 24, 2011
229
24
Paris
How can i know the space available on datadata ?
And should i apply the patch before getting the low space message, or can i wait for the message to appear first ???
 

fylim

Senior Member
Sep 29, 2007
689
72
Auckland
How can i know the space available on datadata ?
And should i apply the patch before getting the low space message, or can i wait for the message to appear first ???

Just use root explorer. When you navigate to the folder. You will see free space of the partition at top left.

Sent from my SGH-I9000 using XDA
 

kathees

Senior Member
Feb 8, 2012
145
13
Singapore
I don't try it with previous fix applied. But it should be working as it only moved back more files to /datadata.

Having /datadata unused means the fix only apply partially : everything was on /data/data. Removing the script is not a good idea in this case. You should try reboot/run it once more and check /datadata. If it's still unused you could post error messages from command line here so I could see what's wrong ...

Thanks for your reply. I'll try again and update you. Possibly with error codes...
 

Skroif

Senior Member
Nov 10, 2010
91
7
Borne
Doesn't work on RC4.2?

Hi,

I tried (several times) to install this tweak. First I install (via CWM) the linkfixer.zip file from Kadagar. Then I install (via CWM) the datafix_29032012.zip. All goes well but when I reboot I still have the lowspace-warning. When I use Rootexplorer to check the usage I see that I have 16.19MB free on Datadata and also 16.19 free on data/data.
To me it seems like nothing happend?!
I use RC4.2 with Semaphore 0.9.5

Any ideas?
 

Wendigogo

Senior Member
Jun 14, 2010
614
327
Lyon
Samsung Galaxy Note 20 Ultra
I tried (several times) to install this tweak. First I install (via CWM) the linkfixer.zip file from Kadagar. Then I install (via CWM) the datafix_29032012.zip. All goes well but when I reboot I still have the lowspace-warning. When I use Rootexplorer to check the usage I see that I have 16.19MB free on Datadata and also 16.19 free on data/data.
To me it seems like nothing happend?!
I use RC4.2 with Semaphore 0.9.5
It seems the fix hadn't been applied. To be sure, check if /data/data is a symlink to /datadata (with "ls -al /data"). But you could read what's coming next ... :D



I've been working hard to make a new version of this datafix. It works the opposite as current datafix (as @Kagadar suggests it) : it only move to ext4 partition (default in /data/local/staticdatadata) selected subdirectories ( lib and libs by default but you could easily add subdirectories like cache (not recommended, lag problems) or so).
As everything has to be moved on /datadata before applying the datafix, it checks if avalaible space is sufficient and does nothing if not. So if a datafix is used (with lots of apps) it may warns and fails. You'll have to uninstall some apps (and/or clean cache etc.) to decrease size of /datadata in order to use this datafix. You could reinstall them once the datafix has been worked, using the script if you've got another lowspace-warning.
If there's enough space on /datadata, it reverts all previous datafix and apply this one.

You could find it here : DataFix_04042012.zip.

As always, make a nandroid backup before using this. Titanium Backup has to be configured correctly to follow symlink etc.

PS : As it works the opposite of others datafix, /data/data is still a symlink. So if you wanna use another datafix it may break your phone : if it doesn't follow symlinks when copying files it will (ie DataFix_11032012.zip ).
 
  • Like
Reactions: millerm and Skroif

Skroif

Senior Member
Nov 10, 2010
91
7
Borne
@wendigogo
Thanks for your answer. Link does not work however. You have an alternative?


EDIT: i got it in another way! Thanks!
Verstuurd van mijn GT-I9000 met Tapatalk

---------- Post added at 06:57 PM ---------- Previous post was at 06:23 PM ----------

It seems the fix hadn't been applied. To be sure, check if /data/data is a symlink to /datadata (with "ls -al /data"). But you could read what's coming next ... :D



I've been working hard to make a new version of this datafix. It works the opposite as current datafix (as @Kagadar suggests it) : it only move to ext4 partition (default in /data/local/staticdatadata) selected subdirectories ( lib and libs by default but you could easily add subdirectories like cache (not recommended, lag problems) or so).
As everything has to be moved on /datadata before applying the datafix, it checks if avalaible space is sufficient and does nothing if not. So if a datafix is used (with lots of apps) it may warns and fails. You'll have to uninstall some apps (and/or clean cache etc.) to decrease size of /datadata in order to use this datafix. You could reinstall them once the datafix has been worked, using the script if you've got another lowspace-warning.
If there's enough space on /datadata, it reverts all previous datafix and apply this one.

You could find it here : DataFix_04042012.zip.

As always, make a nandroid backup before using this. Titanium Backup has to be configured correctly to follow symlink etc.

PS : As it works the opposite of others datafix, /data/data is still a symlink. So if you wanna use another datafix it may break your phone : if it doesn't follow symlinks when copying files it will (ie DataFix_11032012.zip ).


Although I got the file, it does not work for me. I still have the warning...:(
 
Last edited:

rahatbek

Senior Member
Sep 13, 2008
157
16
i'm on gamerz 9.0, have about 350 apps now. tried to install a new version of Titanium, but there's say low storage. move some apps to sdcard, and hav about half free space. but it still say low storage. where's the problem?
 

Wendigogo

Senior Member
Jun 14, 2010
614
327
Lyon
Samsung Galaxy Note 20 Ultra
Although I got the file, it does not work for me. I still have the warning...:(
Which one ? Not enough space on /datadata ?
Could you run the script through adb shell (as root) : sh /system/etc/init.d/30datafix ?



---------- Post added at 07:09 PM ---------- Previous post was at 07:06 PM ----------

i'm on gamerz 9.0, have about 350 apps now. tried to install a new version of Titanium, but there's say low storage. move some apps to sdcard, and hav about half free space. but it still say low storage. where's the problem?
The problem is not where the app is located (/data is a 2Go partition) but where their datas are (/datadata is a 172Mo partition). Unforunately moving everything on /data will make your phone lag a lot ...

There're different scripts here to solve this problem.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 137
    Hello fellow I9000 users.

    tl;dr - This fixes your low storage notification problems just by flashing it on CWM.

    Disclaimer
    First of all, I'd like to inform you that this post is a compilation of the work done by drafnel on the CyanogenMod forums, revthanki on the XDA-Developers forum, and as such I take little to no credit in it, as all I've done was ask for drafnel to help me in the cleanup code for me to put it in a flashable zip.

    Sources:
    http://forum.cyanogenmod.com/topic/39718-workaround-for-small-datadata-partition/
    http://xdaforums.com/showthread.php?t=1444333

    Also, as you should know, you take full responsability should data loss or other kinds of damage occur.

    Introduction
    Lot's of people have encountered the problem where their /datadata partition fills up and then apps begin force closing. This is often confusing since there is usually a lot of space available on the internal 2GB storage partition. But these are two different partitions on cyanogenmod. The created the datadata partition on the fast internal memory so that apps would start up and run faster (i.e. less lag), but it is only about 170MB (which can't be helped).

    One thing that can be done is to move the contents of /datadata onto the 2GB /data partition. That will solve the space problem, but then you have the lag problem. So, what we need is for the files that take up a lot of space to reside on the 2GB partition and the files that are accessed frequently by an app to reside an the fast 170MB partition. The files that are accessed often, or that affect app startup speed are the sqlite database files and the xml preferences files. These reside in the databases and shared_prefs sub-directories in each app directory. Drafnel has written a script to perform these operations.

    Requirements
    • Samsung Galaxy S based phone (GT-I9000, Vibrant, Fascinate, Captivate, etc.)
    • Kernel that supports init.d scripts

    How to use it?
    As you would flash a ROM update or a Kernel:
    1. Download the file to your sdcard.
    2. Reboot your phone into CWM.
    3. Choose 'install zip from sdcard', and choose the script from there.
    It will run on boot everytime. It's pretty light so your total boot time shouldn't suffer. It will only do the operations if they are needed, and it will clean up after itself. No need to worry about broken links or stale resources.


    What it actually does?
    On every boot:
    1. Runs a check to see if /data/data is still symlinked to /datadata/
    2. Moves everything that isn't performance critical from /datadata/ to unlinked /data/data/
    3. Cleans up old databases from uninstalled apps

    Other stuff to watch out for
    • Titanium Backup users should tick the Preferences > Troubleshooting settings > Follow all symbolic links option
    • SlimICS users should follow this procedure

    Changelog
    11032012 - First working release.
    11
    For those of you who are having trouble getting the script to run, I have created a small flashable zip that will ensure that the missing busybox applets are symlinked. For whatever reason SlimICS doesn't have busybox linked properly.

    TL;DR - Flash if on SlimICS
    9
    I get rm failed for -rf when I manually run the script. Any ideas? I'm on a Samsung captivate and cm9.
    Just remove the "f" from each "rm" command.
    But it seems you're using the April script which is not recommended and buggy.

    I'm working on a "next generation" script running flawlessly since 3 days. Like the 2903 datafix libs are on /data and everything else is on /datadata. But now, you could move selected applications cache (like Chrome or so) to /data. And this could be reverted ;-)
    I have to test this when updating rom then create a new topic here. :p.

    Sent from my GT-I9000 using XDA
    6
    Please help me working datafix for slim ics 3.4 with devil kernel 2_0.74 thanks....
    Has anyone got this to work on AOKP build 33 yet? And if so, which kernel are you on, which version of this script did you use and exactly how did you install it?
    Actually, make that build 34 since I'm currently looking at the bug fixes that one introduces and I'm probably going to update now...
    Did you try to rename the /system/etc/init.d/30datafix to /system/etc/init.d/S30datafix ????

    I think I should make another zip file with this mod ...


    EDIT : done DataFix_29032012v2.zip
    6
    Does this script move the cache to /data/data aswell, or does it stay in /datadata?

    I hope it does as it's annoying having to delete the cache all the time.
    As some apps lag if their cache wasn't on /datadata you could choose (by editing a text file) which apps store their cache on /data. This could be reverted if app becomes laggy ...

    EDIT : Here is my new datafix : http://xdaforums.com/showthread.php?t=1665742