[Script]New "Low Storage" Notification fix

Search This thread

Vertron

Senior Member
Jul 30, 2010
688
96
Try sdmaid (available on the play store) for that.

Sent from my SGH-T959 using Tapatalk 2

Thanks, it works! It's alot slower than my old cache cleaning app, but that's doesn't work with the datafix anyway.

It's also useful for cleaning all the old files left from uninstalled apps on your sd card too.

The only problem is you have to buy the pro version to get the cache cleaning feature. Depends how much you want it I guess.

Sent from my SGH-I9000 using xda app-developers app
 
  • Like
Reactions: ew and upichie

Silentbob999

Senior Member
Apr 6, 2012
1,063
728
Montréal
Try sdmaid (available on the play store) for that.

Sent from my SGH-T959 using Tapatalk 2

Thanks you, that did a cleanup I would never achieved manually.
Good to see an that see more than 0kb of cache for all apps :p

And bonus, even the mysterious "system data" goes from 65.1M to 51.0M.. Sweet... Even more free space :)



Envoyé depuis mon GT-I9000 avec Tapatalk
 

Attachments

  • _SpaceData_3.script.txt
    5.4 KB · Views: 24
  • _SpaceData_3_Result.txt
    3 KB · Views: 12
Last edited:

Wond3r

Senior Member
Aug 24, 2008
1,457
179
Hm, I dont really understand which apps we would want in the "move_cache.txt" and which would go in the "skip_apps.txt"

is this more for speed or...size?
 

Silentbob999

Senior Member
Apr 6, 2012
1,063
728
Montréal
Hm, I dont really understand which apps we would want in the "move_cache.txt" and which would go in the "skip_apps.txt"

is this more for speed or...size?

Applications that you don't enter in any of the files will be faster.

These files are to save space... Libs are always move.. move_cache.txt will also move cache. skip_apps.txt will move everything. skip_apps.txt is definitely useful for applications that have big database...


Envoyé depuis mon GT-I9000 avec Tapatalk
 

upichie

Senior Member
Nov 15, 2010
1,354
287
Hm, I dont really understand which apps we would want in the "move_cache.txt" and which would go in the "skip_apps.txt"

is this more for speed or...size?

Silentbob999 is correct. Those are for saving more space. Don't enter any apps for either if you don't have to. They will both hurt performance just to save more space.
 

Wond3r

Senior Member
Aug 24, 2008
1,457
179
They would only impact performance on those specific apps though right?

And are we talking about a drastic decrease in performance, or just a decrease to stock samsung rom-like performance?
 

SolGarlic

Senior Member
Jul 4, 2011
286
61
Hm, I dont really understand which apps we would want in the "move_cache.txt" and which would go in the "skip_apps.txt"

is this more for speed or...size?
For instance, Chrome has a very big cache (move cache), while email stores attachments in another folder in datadata (move all, or skip).
With the email app (with exchange email), I sometimes get a momentarily "could not download attachment", but it goes away...
Other than that, no lag in performance on these two apps.
 

dastinger

Senior Member
Dec 2, 2010
895
307
Some users said they use DiskUsage app to check which apps are using a lot of space so they can wipe their caches afterwards. I downloaded DiskUsage but all I see is all my apps and the space they're taking but it almost always says apk in front of it. What does that mean? That it is the apk that is taking space? Some say Dalvik Cache. Which ones should I keep an eye on? How do I look at it and know which ones to clean?
 

upichie

Senior Member
Nov 15, 2010
1,354
287
They would only impact performance on those specific apps though right?

And are we talking about a drastic decrease in performance, or just a decrease to stock samsung rom-like performance?

Correct. Only those apps.

Apparently have cache on /data will make the app slower, but to be completely honest with you, I've never noticed any performance degradation from doing this. Of course, I only add an app to move_cache.txt if the app has an excessively large cache (which I check with the app Disk Usage).

---------- Post added at 10:41 PM ---------- Previous post was at 10:38 PM ----------

Some users said they use DiskUsage app to check which apps are using a lot of space so they can wipe their caches afterwards. I downloaded DiskUsage but all I see is all my apps and the space they're taking but it almost always says apk in front of it. What does that mean? That it is the apk that is taking space? Some say Dalvik Cache. Which ones should I keep an eye on? How do I look at it and know which ones to clean?

Open Disk Usage. Click root and then select /datadata. It will then scan all the files there. Disk Usage works by showing a visual representation of the size of each folder. So the left column will be one folder (/datadata), and each column to the right of that will be whatever folders/files are inside. The bigger the box, the bigger the file—and the largest ones will be on top.

So if you're looking at the /datadata folder, it will show the package names for your apps. The largest ones will be at the top. It's pretty straight-forward if you ask me.
 
  • Like
Reactions: dastinger

Bejda

Senior Member
Feb 12, 2011
2,869
1,946
Anyone noticed the way recents cm9 handles datadata?
Space is automatically freed up when there's about 15/20Mb left.
Only issue i can see is chrome browser sometimes telling me "cache reading error" so i just have to refresh page.
 

upichie

Senior Member
Nov 15, 2010
1,354
287
Anyone noticed the way recents cm9 handles datadata?
Space is automatically freed up when there's about 15/20Mb left.
Only issue i can see is chrome browser sometimes telling me "cache reading error" so i just have to refresh page.

Interesting! Does CM9 have a fix built right into the ROM now?
 

Bejda

Senior Member
Feb 12, 2011
2,869
1,946
Took me time to realise, was seeing my datadata about 15mb left then thought "hmm, don't forget your datafix" but kept forgetting and finally see that every time chrome gav me that cache reading error datadata got more space left.
Kept wondering about this and finally saw someone saying Pawitp talked about this.
I didn't found Pawitp's words or changelog stating it but that's it.
It's about a week that i flash cm9 based rom with no wipe and still i have approximately between 15 to 25mb left even opening new apps.
 

Vertron

Senior Member
Jul 30, 2010
688
96
Will there be any further development to the datafix script in the future? If not I recommend updating the original post with the latest test version.

I don't think the script needs any more work doing to it myself. Only thing I can think of is a user interface to make moving cache & apps to /data/data easier.
 

dastinger

Senior Member
Dec 2, 2010
895
307
Correct. Only those apps.

Apparently have cache on /data will make the app slower, but to be completely honest with you, I've never noticed any performance degradation from doing this. Of course, I only add an app to move_cache.txt if the app has an excessively large cache (which I check with the app Disk Usage).

---------- Post added at 10:41 PM ---------- Previous post was at 10:38 PM ----------



Open Disk Usage. Click root and then select /datadata. It will then scan all the files there. Disk Usage works by showing a visual representation of the size of each folder. So the left column will be one folder (/datadata), and each column to the right of that will be whatever folders/files are inside. The bigger the box, the bigger the file—and the largest ones will be on top.

So if you're looking at the /datadata folder, it will show the package names for your apps. The largest ones will be at the top. It's pretty straight-forward if you ask me.
My bad, dude. I always chose App Storage so that's the reason. Thanks a lot for the explanation :)
 

Wendigogo

Senior Member
Jun 14, 2010
614
327
Lyon
Samsung Galaxy Note 20 Ultra
Took me time to realise, was seeing my datadata about 15mb left then thought "hmm, don't forget your datafix" but kept forgetting and finally see that every time chrome gav me that cache reading error datadata got more space left.
Kept wondering about this and finally saw someone saying Pawitp talked about this.
I didn't found Pawitp's words or changelog stating it but that's it.
It's about a week that i flash cm9 based rom with no wipe and still i have approximately between 15 to 25mb left even opening new apps.
That's a good news but if I understand correctly, it "only" flush the apps'cache if space left on /datadata is under 10%.
But what's happen when installing many apps with big libs (like Dice Player or so) ? I mean if no more cache is present and low free space left ?
I think CM dev thought about this but I'm curious. If someone could point to the appropriate bug it should be great ! :laugh:

Will there be any further development to the datafix script in the future? If not I recommend updating the original post with the latest test version.

I don't think the script needs any more work doing to it myself. Only thing I can think of is a user interface to make moving cache & apps to /data/data easier.
There is developpement of the test version (as I've got a lot of personnal work not really fast :angel: ). And there's (at least) 2 bugs in test version : first if installing with previous datafix and second if space separated directories exists ...
Both corrected in current version. I think upload a new zip tomorrow including these fixes (and creation of default txt files in /data/local/datafix directory).

Plus Zatta and I are working on big improvements. Stay tuned ! ;)
 

ibrubeer

Senior Member
Aug 6, 2009
133
17
Nebraska
I may be the only one who didn't fully comprehend the whole picture of this script and what it does, but I am willing to bet there is someone else out there having the same problem?

I am running teamhacksung's ICS port for Fascinate with the kernel that comes with it. I initially installed it and then started having the low memory messages after about a week. I found this thread and ran the Datafix zip in CWR (20120524 version). After about another week, and after updating several apps in the market, my phone started to get laggy and a bit buggy. I think that the problem is that you need to periodically run the script again, right? Specifically, you should run the script (or reboot if you have the datafix installed via CWR) after updating a handful of apps or when it starts to lag again. Do I understand this correctly?

I was having some major problems so I decided to go back to stock, reflash the ICS rom, and Google apps. The problem was that I thought I would also save time and flash the datafix right after before the first boot. I think this probably causes some problems. First off, I haven't restored any apps yet for the datafix to affect. This seems obvious now, but not when I was trying to save time while flashing a rom. :( The real problem was when I would finally reboot my phone the next time. It would get stuck on the animation screen for at least 35 minutes if I let it! I am assuming that I waited too long to reboot/run the script after updating a bunch of apps?

I am not totally aware of all my errors, but I suspect that flashing the datafix right after the rom/Google apps and then not again until after updating several (approx 40) apps was causing problems...

---------- Post added at 08:21 PM ---------- Previous post was at 07:49 PM ----------

I am thinking of using Script Manager to automate this whole process without having to actually reboot the phone. Just so I am sure I understand it...

1) the Datafix should run every time I reboot the phone if it was flashed via CWR, correct?

2) It is also possible to use Script Manager to automate the process without having to reboot via this procedure: http://xdaforums.com/showpost.php?p=26408157&postcount=23

Do I understand it correctly? Thanks for the advice!
 

upichie

Senior Member
Nov 15, 2010
1,354
287
I am thinking of using Script Manager to automate this whole process without having to actually reboot the phone. Just so I am sure I understand it...

1) the Datafix should run every time I reboot the phone if it was flashed via CWR, correct?

2) It is also possible to use Script Manager to automate the process without having to reboot via this procedure: http://xdaforums.com/showpost.php?p=26408157&postcount=23

Do I understand it correctly? Thanks for the advice!

The ZIP file that you flash places the script in /system/etc/init.d. All scripts within this folder are run at boot. That is how it works. You can, of course, also run the script manually (with an app). I personally use Script Manager to run the script whenever I need to; I never reboot my phone just to run the script. Doing this also gives you the luxury of seeing what exactly the script does—what files it moves, what errors it encounters, when it runs out of space, etc.

I would definitely use Script Manager if you're having troubles. If you have flashed the zip, you can simply point Script Manager to /system/etc/init.d to find the script (the GUI is pretty much a file manager). Otherwise, as the post you quoted states, you can pull the script from the zip and have it anywhere you want on your sd card.

I'm not sure if flashing the script before the initial boot of a new ROM would cause problems, but I would probably give the phone a clean boot before doing anything to it—scripts, kernels, etc.

As for your other problems, if you install a bunch of apps without running the script, the apps' data will be in /data (the slower partition). When you run the script, it will move the necessary files to /datadata. So if you haven't run the script after installing a lot of apps, those apps may be slower.

Also, if you ever run out of space on /datadata, any apps that try to write data will force close, causing a lot of problems. Make sure you have some room on /datadata before running the script.

Always here to help. Let me know if you still have any questions. :)
 

itenos

Senior Member
Jul 28, 2010
262
46
Bali
Reading this thread I just installed Script Manager from the market to give it a try.
After pointing it to system/etc/init.d and choosing our s30datafix_ng_busybox file, I clicked on RUN.
The execution window opens and states that permission is denied
Do I have to set something else before running this script through Script Manager? :confused:
 

Wendigogo

Senior Member
Jun 14, 2010
614
327
Lyon
Samsung Galaxy Note 20 Ultra
The execution window opens and states that permission is denied
Do I have to set something else before running this script through Script Manager? :confused:
I suppose you have to run it as root ...




As promised a new test version attached here, only two fixes here :
  • Solved a problem that can occurs if coming from another datafix version
  • Improve installation script in zip file :
    -creation of default txt files
    -adding gmail and market cache in move_cache.txt if not present
  • Fix issue with space separated directories in datafix script

Some others things to include/improve and the undo_datafix to finish.

Have a nice (end of) day ! :D
 

Attachments

  • SDataFix_test_20120704.zip
    152.6 KB · Views: 117
  • DataFix_test_20120704.zip
    152.6 KB · Views: 95
Last edited:

martinomac

Senior Member
Jun 28, 2011
586
158
Toronto
As promised a new test version attached here, only two fixes here :
  • Solved a problem that can occurs if coming from another datafix version
  • Improve installation script in zip file :
    -creation of default txt files
    -adding gmail and market cache in move_cache.txt if not present
  • Fix issue with space separated directories in datafix script

Some others things to include/improve and the undo_datafix to finish.

Have a nice (end of) day ! :D

Thank you for this...just a few questions: what do you suggest is the process if coming from datafix_test.zip. Do you even suggest I flash this is things are running OK with latest test version? Things are running quite well for me with about 65MB free in Datadata after adding a few items to move_cache.txt and skip_apps.txt. I started off with 80MB, but even cleaning cache using TiBu Pro doesn't make it smaller, not sure where this is accumulating from?

BTW, thank you for bringing new life to my Captivate (i896)...I was ready to toss it seeing all the fancy OneX and SIII talk out there.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 124
    Here we go ! :D

    Starting point is from CyanogenMod Captivate forum and some improvement were added here and there. Credits are recalled and came from this thread : [SCRIPT][CM7/9] /datadata/ low storage notification lagless fix - init.d script.

    Background :
    CyanogenMod (CM) based roms on our I9000 (and brothers) uses a small and fast flash chip to store application datas. This make the rom smooth and sweet ... This chip is mounted as /datadata and is about 170Mo.
    With a lot of apps (or apps storing lots of stuff there) we faced a "Low storage" notification and our phone becomes laggy.
    • The first idea was to move this /datadata to /data (about 2Go) whose have a lot of free space. This works but the phone became laggy.
    • Then some others devs think about moving back to /datadata frequently accessed files (sqlite database and xml preferences files). First as scripts part then as flashed zip file. The phone becames smoother but not like a "vanilla" CM rom. This is the 1103 datafix in thread linked previously.
    • An xda user suggested to let on /data only library files and move back all other stuff to /datadata. These lib files are only accessed (when used by users) in read mode so the ext4 /data partition is efficient in this way and phone becomes smoother as "vanilla" CM roms. This is the 2903 datafix I made and post in previously linked xda thread.
    • But with this latest datafix, applications cache are stored in /datadata and recent Google apps (like Chrome) fulfilled it quickly : the "Low storage" notification is back ! :mad:

    Next solution :
    Like 2903 datafix, only libraries ("lib" and "libs" subdirectories) stay on /data by default.
    BUT unlike it you could choose which apps will also store their cache in /data. And this is REVERSIBLE : if one of selected app becomes laggy you could move back its cache onto /datadata

    How to use it :
    Make a nandroid backup
    Just grab the zip file and flash it in recovery
    At reboot, it will revert previous datafix (if there is one) and apply this one. So first boot could take more time (5 minutes max) than "normal" boot.
    It also creates a "datafix" directory in /data/local with two files : "move_cache.txt" and "skip_apps.txt".
    Just edit the first file (root needed) to add apps whose cache will go back to /data at next boot :
    Code:
    com.android.chrome
    org.mozilla.firefox_beta
    will put Google Chrome and Firefox Beta cache on /data. All others apps cache will go to /datadata.
    If you want Firefox cache to go back on /datadata, just remove its line in the file and reboot.

    In the "skip_apps.txt" file, just put apps you want to fully stay on /data/data. If apps was previously moved to /datadata by the datafix it won't apply; you have to add its name in "skip_apps.txt" file after installing it and before rebooting the phone. On the other hand, if you remove the apps name from "skip_apps.txt" file all but libraries will be moved to /datadata at next reboot.

    Requirements :
    • Samsung Galaxy S based phone (GT-I9000, Vibrant, Fascinate, Captivate, etc.)
    • CM based rom (including CM7/9, MIUI and maybe ao(k)sp etc.)
    • Kernel that supports init.d scripts (latest CM9 nightly support it)
    • Busybox installed
    • A fresh nandroid backup

    FAQ :
    Q : There is 2 zip files, who's the good one ?
    A : It depends of your kernel. With stock CM9 kernel use the Datafix20120521. With others like Devil etc., use the SDatafi20120521. The only difference is between the script name : 30datafix or S30datafix. Some recent kernels add a "S" before the init.d script name. Why ? No idea !!!

    Q : Will this wipe my phone ?
    A : No, it should not delete any data on your phone. But as it's not tested with every phone xda user have it's a good idea to have a fresh nandroid backup

    Q : Do I need to reflash the zip file ? When ?
    A : The datafix will be erased each time you upgrade/change your rom (including Nightly Builds) or your kernel (many of them "clean" the init.d directory). But if you don't install lots of apps after upgrading you don't really need to install the datafix again : without full wipe, a nandroid restore or an Odin full installation te datafix will stay on.

    Q : Is there something to do when backuping my apps ?
    A : Nandroid should work without specific option; Titanium Backup users should tick the Preferences > Troubleshooting settings > Follow all symbolic links option. I don't use other backup apps ...

    Q : Can I use this on Samsung based rom ?
    A : No ! And it's irrelevant cause Samsung roms don't have the "Low storage" issue !

    Q : I'm using Slim ICS rom, do I need some busybox fixer etc. ?
    A : I don't use SlimICS but all commands in my script call busybox directly so it should work. Let me know if there is still a problem with this !

    Q : Why do you change naming of the zip file ?
    A : Cause I want ! And it's listed directly in chronological order in terminal (or recovery) in this way.

    Q : How can I know which apps use most space on /datadata :
    A : Just run as root (in adb or terminal) :
    Code:
    du -s /datadata/*|sort -n

    Downloads :
    Box : https://www.box.com/s/6783d86f3840c02db911
    Dropbox : https://www.dropbox.com/sh/rwibb0r0fhhyvh6/KaoBoC1BtB
    Please don't mirror this.

    I put the shell script in attachement here. Just grab it on your sdcard, remove the ".txt" extension and you could run it using Scripter or equivalent (root needed). Please post here if something gone wrong when using it.

    Donations :
    As I spent some time (and coffee) for this (and april datafix for those following previous xda thread) I think about a donation button. Give me your advise on that please ...
    Link for donations ;)

    But just a little "Thanks, it works great !" would be great ! :D
    8
    Took me time to realise, was seeing my datadata about 15mb left then thought "hmm, don't forget your datafix" but kept forgetting and finally see that every time chrome gav me that cache reading error datadata got more space left.
    Kept wondering about this and finally saw someone saying Pawitp talked about this.
    I didn't found Pawitp's words or changelog stating it but that's it.
    It's about a week that i flash cm9 based rom with no wipe and still i have approximately between 15 to 25mb left even opening new apps.
    That's a good news but if I understand correctly, it "only" flush the apps'cache if space left on /datadata is under 10%.
    But what's happen when installing many apps with big libs (like Dice Player or so) ? I mean if no more cache is present and low free space left ?
    I think CM dev thought about this but I'm curious. If someone could point to the appropriate bug it should be great ! :laugh:

    Will there be any further development to the datafix script in the future? If not I recommend updating the original post with the latest test version.

    I don't think the script needs any more work doing to it myself. Only thing I can think of is a user interface to make moving cache & apps to /data/data easier.
    There is developpement of the test version (as I've got a lot of personnal work not really fast :angel: ). And there's (at least) 2 bugs in test version : first if installing with previous datafix and second if space separated directories exists ...
    Both corrected in current version. I think upload a new zip tomorrow including these fixes (and creation of default txt files in /data/local/datafix directory).

    Plus Zatta and I are working on big improvements. Stay tuned ! ;)
    6
    The execution window opens and states that permission is denied
    Do I have to set something else before running this script through Script Manager? :confused:
    I suppose you have to run it as root ...




    As promised a new test version attached here, only two fixes here :
    • Solved a problem that can occurs if coming from another datafix version
    • Improve installation script in zip file :
      -creation of default txt files
      -adding gmail and market cache in move_cache.txt if not present
    • Fix issue with space separated directories in datafix script

    Some others things to include/improve and the undo_datafix to finish.

    Have a nice (end of) day ! :D
    5
    now i cannot download from play store,first i had the low storage notification,i flashed the datafix..it was good after the flash,no lag n no problem...but from today i cannot download from play store,i checked datadata by root explorer,there were just 166KB of space left..then i flashed the datafix again,now i have 9MB of space left but still cannot download from play store...any clue what to do?
    This is a problem I see before. You need to add "com.android.providers.downloads" and "com.google.android.gm" in "move_cache.txt" as said before. The first app is for market cache (so if /datadata is full you can't install/upgrade anymore apps) and the second is for Gmail cache.

    For whatever reason I can't clear any app's cache anymore, besides going in and manually deleting files. Apps don't work, doing it via Android's Manage Apps doesn't work—hell, not even Titanium Backup works.

    This is annoying.
    This could be "forced" by an external rooted app I think :)D @Zatta )

    Hey Wendigogo, do you follow the discussion here (plus read some posts back)?

    An uhh, you are okay, aren't you? Sent you a small update per mail, looks like you didn't get it again?
    Thanks for point this. I could use another directory in /data/local. The best way is to use a directory in /sdcard to prevent factory reset removing config files and to permit users editing it kindly.

    I install you update but don't have time to try it for now (no datafix installed as I don't have time to play with my phone now so few apps installed) .

    I'll be busy for about 2 weeks (preparing exams). I'll try to give a shot (and to YPhoto suggestions too) before this.

    Thanks for answering in this thread to people having problems. :cool:
    5
    Ok, it worked!
    For user that cannot get this mod to work:
    -Download Script manager.
    -With root explorer (or any other program) extract the script from the .zip file
    -Open Script Manager and run the script giving it root permissions and allowing it to run on boot.
    And that's it! Now everytime you reboot the phone the script will run.
    I've noticed the difference a lot, now my Galaxy S is a lot faster, and I do not have the low storage bug :cool:
    I will see if I face problems with Google Chrome (although I think the stock browser is a lot better)
    ;)
    EDIT: I'm running cm9 with Semaphore 1.2.0 kernel