Thanks Meter 7
Join Date: Aug 2010
Location: San Francisco, California
[mod] How to reduce the threshold for displaying “Low on Space” warnings
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”:
*** don't include the # or sqlite>, those are the console prompts... ***
# 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');
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 ^^
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.