Restoring FAT32 filesystem after accidentally formatting it
Posted: 16 Jul 2016, 02:11
As a background to what happened: I installed a custom recovery on my Android phone, and I wanted to restore the phone's state from a backup after I experimented with something. Before restoring a backup, I usually do a factory reset, and that's what I also did this time, but this time I accidentally set it to wipe the SD card and the Phone's internal memory too...
Luckly it didn't do a secure wipe, as it took less than 4 secs to format everything, however it did make a new (blank) partition. I tried so far to recover the partition with testdisk, but all it would do is to recover the blank partition. Also I tried recovering the files with photorec, and while I did get most of the data back, the filenames and folder structure wasn't retained, so all the files were dumped in a single folder with (what I assume to be) inode reference number as filenames.
Is there any way to recover the data and restore it intact, the way it was on the SD card before wiping it? Or at least to be able to recover the files the photorec way with the proper filenames and directory structure.
I didn't do any modifications to the filesystem itself so far, left it intact as it was previously. Also did a backup with dd of the whole SD card.
Luckly it didn't do a secure wipe, as it took less than 4 secs to format everything, however it did make a new (blank) partition. I tried so far to recover the partition with testdisk, but all it would do is to recover the blank partition. Also I tried recovering the files with photorec, and while I did get most of the data back, the filenames and folder structure wasn't retained, so all the files were dumped in a single folder with (what I assume to be) inode reference number as filenames.
Is there any way to recover the data and restore it intact, the way it was on the SD card before wiping it? Or at least to be able to recover the files the photorec way with the proper filenames and directory structure.
I didn't do any modifications to the filesystem itself so far, left it intact as it was previously. Also did a backup with dd of the whole SD card.