How to delete files from my indestructable memory card?

9

2

A week ago I started getting intermittent IO errors accessing the SD card on my rooted Evo 4g. I eventually plugged it into my windows machine and tried to format it. It appeared to work, but when I unmounted and remounted the card all the files came back. I tried formatting on my phone with the same result, and had a coworker try with the Mac diskutils suite. All the formats claimed to work, but the files came back when the card was remounted. Finally I ran dd if=/dev/zero of=/dev/block/mmcblk0; it completed, and the same thing happened again.

But here is where it gets crazy. I put a new recovery file on the sd card -- and it added the file without any issue. But now it can't be deleted, just like everything else. So I can write to the SD card, but I can't delete anything.

How can I fix this? Or if I can't, at least why is it happening?

Matthew

Posted 2011-09-13T19:17:38.477

Reputation: 671

Yes, the files are still very much there when you open them on the phone. As I said above, the very first attempt was deleting the files using the phone. They show as deleted, but then return when you refresh. The mount point is /mnt/sdcard which I think is a link to /sdcard. Moving from one machine to another, the files are still there. The card is Sandisk. – Matthew – 2011-09-13T20:16:06.200

Answers

7

Ultimately I replaced the card, and everything is now working. Multiple attempts to delete the files via different systems all failed. After more research it appears that some SD cards/flash memory are capable of changing a failed portion of the card to read-only, which allows the writable portion to still accept changes while not allowing any of the old items to be changed. Since the device was already full, it is pretty much useless as anything more than a permanent backup. Thanks for everyone's advice.

Matthew

Posted 2011-09-13T19:17:38.477

Reputation: 671

1Add some links citing this or documenting this if you can. This is interesting. – LawrenceC – 2012-04-16T02:15:28.070

3

I'll suggest you try a GNU/Linux box (a live CD should do) andshred all the files. Look for errors in kernel.log and dmesg when you do - if the device mounts read-only, the FS is corrupted, reparition it.

Broam

Posted 2011-09-13T19:17:38.477

Reputation: 3 831