Even though there already are many answers, there is actually none answering two main questions and the third one just for a case of dumpstate problem. Read just bigger text if you're in a hurry.
Also, I'll explain why solutions mentioned in other answers help only sometimes. And offer another solution in case cat is not your problem.
Why do I get Storage space error if there is a lot of available space?
It's not an error, it's by design. The trigger for low space is quite high, usually 10% OR 500MB, whichever is lower.
"some system functions may not work" - that's not precise, some WILL NOT work.
Synchronize, some download functions, installing apps, hangouts and many Google apps.
If you'll ask:
- Why there is less than 500MB available?
then the answer is, that it's either that you used it up unknowingly, or that there is a problem with something stuffing up your storage space.
If you used it up and want to check with what, follow the answers saying clean up your space, if you didn't, it might be variety of other problems, but most likely it's logcat which is leaving huge dumpstate files behind. In that case follow the answers mentioning logcat or log or dumpstate. Or jump to my last paragraph below.
Which parts of memory are monitored for free space.
we may distinguish two model situations according to the FS structure in an Android phone:
(Note, that what I call INTERNAL STORAGE is not standardized name, usually it's weirdly called sdcard, might also be called USB storage as it possibly is in your case.)
- DATA partition is separate partition from INTERNAL STORAGE
INTERNAL STORAGE is not monitored and you can fill it up to zero free bytes and nothing happens. DATA storage is monitored, on galaxy S2 it's 10%, from 1500 MB, 150MB must be always available.
- one partition for both DATA and INTERNAL STORAGE
INTERNAL STORAGE is emulated as a separate partition with different permission rights. It also has a "fuse" or reserve, which will not allow all space of the real partition be used. Files on INTERNAL STORAGE are actually located in /data/media/
old models, maybe up to Android v2.3, also has DBDATA partition, which was separately monitored - if I remember this correctly
A change from one system to another might have been done by a FW update. I still remember when such update removed thousands of my holiday pictures on Galaxy Note2. An INTERNAL STORAGE partition was removed and mounted on DATA partition using FUSE, there was 100MB difference when I checked free space on each.
So, depending on a data structure you have, you need to keep for example 400MB of free space on an INTERNAL STORAGE which might, using df or a free space analyzer app, show as 500MB free space on DATA partition.
- the minimum size is different for each model and sometimes also FW version.
- You need to wait for about a minute to see if the notification will clear itself after you make some more space available.
Can I join device and and USB memory? Will it help or at least delay the time while the problem return?
Fast answer, NO. And if it would help? Yes, it would help to avoid the problem of low space, by means of having bigger total storage.
IF "USB memory" is pluggable SD card, or a pluggable device in your case,
or if it's located on a separate memory chip, as it's on Tab 1 and phones from similar age, then it's not possible to join it with DATA partition.
IF "USB memory" is an INTERNAL STORAGE in your case, you can join them but it's not an easy or safe process. In other words, if there is not a guide by someone who have successfully done that on the same model of a phone as is yours, we might also figuratively say, NO, it's not possible.
While searching the Internet for the guide, be aware that it wasn't a clever idea to name the INTERNAL STORAGE as "USB storage", because there is also a real USB storage. You'll find a lot of solutions for enabling USB for storage drives, so called USB OTG feature, don't get diversed.
basically you need to:
re-partition your memory chip, called eMMC for some reason, delete USERDATA - what is a partition name for INTERNAL STORAGE and merge the freed space with DATA partition.
then find/compile fuse module which would take care of emulating the partition with full permissions for media_rw or some other user,
edit init script, to create a mount point for new INTERNAL STORAGE,
many more changes and tweaks which I can't think of.
Any other advice how I can deal with this problem?
The best option, if you have a root access, is to
lower the threshold of the minimum free space.
You can put it down to 1%, possibly even less. That means 20 - 120MB of minimum free space.
It involves sqlite3 editing but although it might look difficult, it's very straightforward process. Just follow any good guide and you'll do it alright. THIS guide looks splendid or there also are sqlite3 editor apps, or find another guide using THIS gugl link.
There are two things to note:
- different guides are mentioning different table names. 'Secure', 'system', 'global' or even 'gservices'. The truth is, it was applicable in different tables through different Android versions. Now it should be in 'global' before it was in 'secure' and before that 'system'. My advice is, just put it in all of them, you will not hurt anything. That means follow the guide you'll find and repeat the steps while replacing the table name with each of those names I mentioned above.
- you might find settings.db file locked and not writable even with root, it happened to me when ICS came out. But didn't happened since. Anyway, in that case, boot into recovery, pull the file out, edit on PC and push back in.
If 1% (around 100MB if you have 16GB chip) is still too much for you to waste, as it was for me, add sys_storage_threshold_max_bytes value too, I have 20000000 = around 20 MB and never had much of a problem, although many apps don't have available space checking and will error without stating the reason, so you need to keep in mind it might always be free space issue. There is -OR- statement between those two variables. Don't put less than 20 there because if a certain system file which resides in /data folder will fail to write, your phone might not boot. I find 20MB quite safe as there are no files larger than that in /data, while excepting /data/data, /data/app/ and dalvik. and if a file will get broken in /data/data, no big deal. Data reset of that app will solve it.
If something is eating up the free space
If you suspect that there shouldn't be so much space taken, or you just want to clean up space, as in a couple of other answers here, I also recommend DiskUsage to help with the job of visually locating what is taking how much space.
In the DiskUsage app, in the second column, the 'media' stands for INTERNAL STORAGE and Apps represent /data/app and /data/data - space taken by apps.
The 'System data', in green color, on the bottom is the rest of /data folder and shouldn't be too high. 300MB is fine, over 1GB is probably a problem.
If this System data is too high, it's possible your logcat has gone wild and created tons of dumpstate postmortem poems. In that case, and only in that case, will all of the other answers here be applicable. Meaning that deleting this gigs of wasted space in folder /data/log or dialing a *#9900# , which by the way is not a valid command for every device, will bring your Android back to a good mood.
For how long is a question of whether the culprit which caused the excessive logging has been patched, or removed.