Recovering data from a corrupted microSD card 7

Yesterday, my mobile phone politely informed me that my 8 GB microSD card was missing, although it was clearly inserted in its slot. Restarting the phone and reseating the card made no difference. Worse yet, Windows refused to recognize the card, too, saying there was no file system on it and it needed to be formatted.

Since half the card was filled with photos, videos, documents and music that were only partially backed up, I decided to recover the data, without spending money. This is the Internet Age. Free stuff is everywhere!

I’ll cut to the chase. My savior in this case was TestDisk 6.14. None of the GUI-based free solutions I tried worked, even my old standby, PC Inspector File Recovery, which usually does a great job.

The TestDisk download comes with two programs: TestDisk, which you can use to recover corrupted file systems and FATs, and PhotoRec, which locates and saves files that are still intact. I used both successfully, but TestDisk is not for beginners. You should know something about Windows FAT32 filesystems, which is the de facto filesystem used on SD cards. TestDisk makes good suggestions for settings, however, so the green user can make some educated guesses.

How it happened
Remember the advice that you should eject/unmount a USB drive in Windows before physically removing it? Well, I kinda forgot. I was in a hurry, and disconnected my phone from the USB port on my laptop without first turning off the USB mode on the phone and ejecting the USB drive from Windows. Sometimes, you can away with being sloppy. This time, I wasn’t.

Important things to know
Even if Windows and your phone (or camera) say there is nothing on the SD card, it’s still there. It’s usually the File Allocation Tables (FATs) that have been lost or corrupted. It’s a bit like someone trashing the card catalogue (or its electronic equivalent) at the public library. The books are still there, but now no one can find them easily.

So, don’t reformat the card! Then your data probably will be lost forever. (Even then, sometimes you can still recover it, since the usual reformat just deletes old FATs and creates new, empty ones.)

The files are still there. You just need a way to find them, and copy them to another storage device.

Using TestDisk
TestDisk uses a console window, rather like DOS in the pre-Windows 95 days. It will scan the system for physical drives. If it finds the SD card, then there is hope. If not, have a sad.

I had my microSD in a card reader. TestDisk found it, and reported the correct capacity. So, I was confident the files were recoverable. There were no usable FAT tables, however. Both were corrupted, but TestDisk found them on the card. Using that data, and the suggested CHS (cylinder, head, sector) parameters of the card, TestDisk was able to recreate enough of the FATs so that file recovery was possible.

It did not recover the folders, at least in my case. Another program I tried, Zero Assumption Recovery, did find most of the folders once TestDisk reconstructed the file allocation tables. It costs $60, though, and I was of necessity doing this recovery on the cheap. Interestingly, when I tried ZAR’s trial software before using TestDisk, it found nothing. After TestDisk, it did. Maybe the paid version of ZAR would do a better job.

The end result was a usable, if somewhat jumbled “library” card catalogue. It knew where the “books” were shelved in the library, but it didn’t know their names or filetypes. [Incidentally, Windows now recognized the card as drive I:, but still believed it to be empty.]

Enter PhotoRec
While it is called PhotoRec, this program recovers more than just photos. It can also find and recover music, video and documents. I used the default settings to copy everything it found on the SD card to a folder on my computer’s hard drive. There was a lot of junk: pngs, jpgs, javascript fragments — the detritus that collects when you use your phone for social media, IM and the World Wide Web. But, the files I had not yet backed up were available again, so I was a happy camper.

Back in the saddle again
After PhotoRec was done (about an hour in my case), I used chkdsk in Windows to fix any drive errors and recover any data still missing. Then I used Windows’ format command to reformat the SD card. Both of these are console programs, but you can also use Windows graphical interface (the right-click menu) to do the same operations.

My card is working, my phone now sees it, and I still have my files. Granted, they’re still in a big jumble on my hard drive, but that’s a task for another day. Or week.

Possibly Related Posts:

  • No Related Posts

7 thoughts on “Recovering data from a corrupted microSD card

  1. Reply kdavon Jan 9,2015 6:54 pm

    I am using Mac for last 3 years and last week, I was trying to copy my son’s first birthday ceremony photographs folder to an external drive. I lost all the pics by an unknown reason. When I ran Stellar Phoenix Mac Data Recovery software it quickly showed all those pics during scanning process. After completion of scanning I was able to recover all those.,2817,2415392,00.asp

  2. Reply Oliver Jan 16,2015 5:49 pm

    I’ve lost an important files once form the old SanDisk SD card (2 GB in size) and tried PhotoRec from TestDisk as well as Recuva from Piriform. Unfortunately, none of them were helpful and not a single file has been recovered whatsoever. Stellar Phoenix Photo Recovery is a definitely a life savior and powerful which safely recovered almost 100% of files from the SD card. You can also check out this and share your results with site readers so that they can also prevent themselves from using bogus utility around:

    Thanks for a detailed and in-depth article though!!

  3. Reply Lazza Jul 27,2015 12:49 am

    The first steps you did with Testdisk in your case were useless, you could have jumped straight to Photorec. Let me explain: Testdisk is a software that tries to reconstruct partition information from damaged drives. If it works, you get back the complete FS metadata, which includes file names and directories.

    On the other hand, the companion Photorec performs an operation called carving: it basically ignores file systems (except for some minor details in simple cases) and looks for patterns of data that “look like” photos or documents. This is the reason why you don’t get folder names and file names back. Photorec does not need Testdisk to operate. Viceversa, if you succeed with Testdisk, there is no need to use Photorec afterwards.

  4. Reply eljefe Jul 28,2015 8:36 pm

    Thanks for your advice.

  5. Reply Jen Hensley Oct 20,2015 7:53 pm

    I tried the test disk/photo recovery twice on a bad SD card. Both times state the recovery was complete; however, both times, it states zero (0) files were recovered. I know there are several pics on the card that ZAR retrieved as JPEGs; however, they will not open in any picture application. Any other ideas on how to recover these? There are several vacation pictures.

  6. Reply eljefe Oct 22,2015 6:05 pm

    I’m afraid I’m stumped by that problem. When a jpeg file loses some part of its code, applications cannot read it. Have you tried IrfanView? Also, are you sure the original files were jpegs, and not some other file format?

  7. Reply Sherpa1 Dec 23,2015 12:50 pm

    If the card is damaged no software will be able to recover the data. I had many photos on my SD card and when transferring to my computer, the computer would not even recognize the card, probably due to a damaged controller. I sent the card to a data recovery service but they were unable to recover any files. Another service offered to do it for $600 (32 G). I then sent my card to Recoverfab Leopold was able to recover all of my photos and at less than half the price. If you are unable to recover files with software I would highly recommend Recoverfab.

Leave a Reply




This site uses Akismet to reduce spam. Learn how your comment data is processed.

WP Facebook Auto Publish Powered By :