[mod] How to reduce the threshold for displaying “Low on Space” warnings

Aug 30, 2010
San Francisco, California
or: How to avoid rejected text message errors with lots of free space available


This post helped me a bunch and alleviated my issue with lost text messages due to "low space" errors. I'm using cMTD + eFOS [forum.cyanogenmod.com/topic/8711-read-this-recovery-and-installing-cyanogenmod6-firerats-cmtd-ennons-fso-gapps/] + magpie [forum.cyanogenmod.com/topic/9731-magpie-2010-12-07] on my nexus one and my "low space" threshold jumped from ~20mb (stock) up to ~40mb with all the mods. Clearly 40mb is more than enough space for receiving text messages [hell 20mb was more than enough, but I digress...]. Since my internal memory is much, much larger than default (~320mb on /data) I've set my threshold to 2% of the total space available instead of the 5% suggested in the post. At this ratio that drops my "low space" threshold down to ~10mb which is what I would expect it to be at by default.

So if you're having issues and need a real solution that isn't "just remove some of your apps so you have more free space" then try this mod. I would suggest making a copy of settings.db just in case you need to go back to default, but really there isn't much that you could break by doing this. Keep in mind that the number you're changing is a percentage and not a fixed number value, so mileage will vary from device to device. Play with the numbers and see what works best for you. The way I tested it was dropping a bunch of dummy files (actually just multiple copies of an .apk, don't forget to delete these when you're done testing ^_~) into /data/local/tmp until the free space message was displayed, then texted myself using gVoice [voice.google.com] and altered the threshold percentage until I got to a comfortable level.

As a side note, it would be *awesome* if there was an option in the Settings > CyanogenMod Settings menu that let us alter this value through a gui so we don't need adb. I would do it, but I have no confidence in my java programming skills =p *hint hint*

Anywho on to the meat of this post...


Low on Space – Phone storage space is getting low.

Its a cursed message on my Android HTC Hero, but there is 16MB free on /data partition! I want my email to sync a bit more and I want to receive text messages and I dont want to delete any apps.

You need to have rooted your android device and have the android sdk installed and debugging enabled on your phone. I might package this recipe up into an apk for easy installation.

The default limit is 10% of free space, i’ve reduced mine to 5%, I don’t know if there are any terrible side effects. As you’ve already rooted your phone you’ve already probably voided your warranty

To reduce from 10% to 5% warning from your “adb shell”:

# sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite> insert into secure (name, value) VALUES('sys_storage_threshold_percentage','5');
sqlite> insert into gservices (name, value) VALUES('sys_storage_threshold_percentage','5');
sqlite> .quit
# reboot
*** don't include the # or sqlite>, those are the console prompts... ***

Some firmwares seem to look for the setting in gservices but the latest android source looks like it looks for it in the secure settings, so i’ve included both for good measure.



reposted (with a few edits) from [bryars.eu/2010/10/how-to-reduce-the-threshold-for-low-on-space-android-warnings/]


This is not my work / information / blog, but since it was a huge help to me and I couldn't find the information anywhere else I thought I'd post it here for others to use ^^

Additional information:

If you want more information or a gui to edit the settings.db file, use adb to pull the file from /data/data/com.android.providers.settings/databases/settings.db, edit settings.db using a program like SQlite db browser [blog.dreamcss.com/dev-tools/sqlite-database-browser/], then push the file back to the phone using adb and reboot.


Senior Member
Sep 6, 2008
Sorry for reviving an old thread but this is an excellent find, especially on my S-Off Desire when the phone complains about the lack of space at 30 MB!


New member
Jun 11, 2008
Apps won't install or update, insufficient storage, 200MB free

Same here, sorry for reviving the thread, maybe I should have started a new one, but this topic has half the answer... this works perfect to stop the notification, but...

I still get the "Insufficient storage available." notification when I try to update or install an app.

I've looked around and searched here and on Google

I have the Galaxy S2 Skyrocket, with 2GB for /data, so it still has 200MB free. I know I've gone app crazy with over 200 apps installed, but that's not the point. I plan to organize and thin them out once I get some time to see which ones I want to stick with, but since there is plenty of space left, that shouldn't be a problem.

This is not related to the other issues I found on the forum (like this one or this one), and I know I can gain some space back by clearing caches and obviously by removing some apps or getting an sd card and moving apps to it. That's not the correct solution, those are all just workarounds.

Any ideas? Based on this topic, it would make sense that there is another key I can add to the database somewhere to lower the same threshold but for installing/updating apps.


Nov 22, 2007
@WebGuru, I am also interested in finding a way to lower the point at which my device start telling me insufficient storage. My S-OFF HTC Desire with custom HBOOT has 387MB /data and therefore I get insufficient storage prompts when I have ~35MB of space remaining. Most annoying. I've applied the DB update and I confirm it silences the notification only.

If I find anything useful I'll post it here.

Regards, Martin.
Aug 30, 2010
San Francisco, California
From what I understand the problem with app installs is due to the free space threshold value being hard coded into some aspect of the ROM itself and therefore no DB value exists nor can be created which will allow for adjustments. The issue would have to be taken into account by the ROM developer or by someone willing to hunt down the values and create a custom build with the appropriate fix.


Feb 21, 2011
I agree with WebGuru, the topic is still relevant and I have LG G2 5.0.1 16 GB version and have free ~500 MB and receiving insufficient memory. . . Has anyone knows any ROM files for solving this problem?
  • Like
Reactions: sUsH667


Senior Member
Jul 1, 2011
stupid low storage threshold value

I agree with WebGuru, the topic is still relevant and I have LG G2 5.0.1 16 GB version and have free ~500 MB and receiving insufficient memory. . . Has anyone knows any ROM files for solving this problem?
i think it is still relevant too, because i still experience on several modern devices.

the only possibility i found after hours and hours of crawling the web is to change value sys_storage_threshold_percentage and/or
sys_storage_threshold_max_bytes in /data/data/com.android.providers.settings/databases/settings.db which would be easy enought to do, if this settings.db would still be used and would not be deprecated by now (as far as i have understood).

based on the information i found the standard value is "10" for the percentage which for our modern devices nowadays is unnecessary much. additionally it is quite iphone-y imo to force this value on us without an easy possibliity to customize it to our own preferences/use cases, but that's another story of course. ^^

i would really appreciate any information, suggestion or help on this issue, i am quite desperate by now and have no more ideas where to look or what to try.

thx and greetz,

Last edited: