A really old Smartphone having Cyanogenmod on it provides only about 400 MB space for data/data.
Now this space is full. df
shows 0.0K of free space. The homescreen doesn't even appear, only errors appear on this smartphone.
It is a rooted phone (cyanogen) so I opened adb, got into an unused directory - whatsapp directory to be exact, it's already uninstalled but all data is left there - and tried to remove files to recover some space. I used a really large file with many MB.
First try
Sadly when I remove a file using rm
I get Directory not empty
.
This is disturbing because I don't remove a directory but a single file. The file doesn't appear any more but df
still shows no free space.
Second try
On a website I found I better don't rm the file but empty is using the command
> filename
= write nothing into the file.
I did - the file appears with size 0, du -sH
tells me a different usage of this directory but df
doesn't change.
Both doesn't work
After both tries I rebooted because who knows, perhaps things are rearranged after a reboot. But it's getting stranger - all files are back and have their original size.
Whatsapp is uninstalled, thus can't hold any references to the files.
What's going on here? It looks like my changes are kind of cached and don't affect the actual filesystem.
How can I get out of this and free some space in /data/data?
Btw I had this before. Then it helped to remove something unimportant from data/data and after the system rebooted without problems, I uninstalled unused apps and the whole thing went fine again.
Trying to delete files from other directories in /data/data/ also will not work.
Later...
I thought why not keep doing > filename
for a while. Perhaps the filesystem needs time to spread the changes to all it's modules? (Stupid idea but I was desperate enough to try)
After some more large files I really got a change not only with du
but finally some free space with df
too.
After booting - the same as before. But I got curious what happenes if I do that for even more files. Wow ... after I freed ~100MB (of 400 - quite much) I noticed Trebuchet came back to work!
Space keeps beeing free after booting and I am able to remove the no longer needed folders in /data/data with rm -r
.
But the initial question still is the same. Why did this have no effect after I started it for only a few files, why was everything reset after booting?
rm
.