exFAT SD card some files disappeared, but testdisk still finds them as existing Topic is solved

Using TestDisk to undelete files
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
prof
Posts: 12
Joined: 12 Oct 2022, 04:02

exFAT SD card some files disappeared, but testdisk still finds them as existing

#1 Post by prof »

I experienced a very odd situation with an exFAT SD card used in an Android phone.
In the directory where the Camera app saves the photos it created, all of a sudden around half of the files disappeared. (~1500 of 3000).
I removed the card, inserted into the reader in my PC, the files seem to be gone just the same. I only see the same files as in any file management tool on the device itself.
However, if I run testdisk and browse the files in that directory I still see all 3000 files listed and can copy them to my PC, they seem to be not corrupted even. (Only tried with a few so far.)
Any idea what might be the issue with these files? I assume something went wrong in the file allocation table, but somehow testdisk is not affected by it. No other directory seems to be affected so far either.
Is there any other way to restore the files apart from off-loading all the files by testdisk first then copy back? I do have backups, so I could even spare the testdisk copy, but I would prefer to restore the files locally if possible instead of copying a lot of data back and forth.

EDIT: Just to clarify, testdisk shows the files as existing, not as deleted (so white, not red).

prof
Posts: 12
Joined: 12 Oct 2022, 04:02

Re: exFAT SD card some files disappeared, but testdisk still finds them as existing

#2 Post by prof »

Update: CHKDSK in windows does report issues specifically with that directory (and one single another). But I do not trust CHKDSK to fix the issues, I suspect it will permanently remove the files currently visible by testdisk and free the allocated space instead of restoring them.

An example error (reports a couple dozens like this for the two directories):

Code: Select all

Corruption was found while examining files in directory \DCIM\101ANDRO\ (6383).

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: exFAT SD card some files disappeared, but testdisk still finds them as existing

#3 Post by recuperation »

Sure there is!
You could hire a forensic expert and operating system analyst to find out what the difference is that makes windows fail when it comes to reading your data.
Price: starting at four digits, maybe.
Your copy job costs nothing.

No, there is not a repair solution for you. Repairing is not professional anyway. You can be lucky of having some repair features with Testdisk.

prof
Posts: 12
Joined: 12 Oct 2022, 04:02

Re: exFAT SD card some files disappeared, but testdisk still finds them as existing

#4 Post by prof »

recuperation wrote: 06 Feb 2023, 14:13 Your copy job costs nothing.

No, there is not a repair solution for you. Repairing is not professionell anyway. You can be lucky of having some repair features with Testdisk.
My "copy job" costs a lot of time, (10 GB data at least) and as mentioned, I don't really trust CHKDSK either, it doesn't really help with understanding the issues it "fixes".

I am actually an IT professional (been that for 25 years), and I can assure you, root cause analysis of errors is the most professional way. I came here to understand how it is possible that testdisk sees the files as existing while any other file managers (both in android and in windows) don't, and if there's any way to restore the seemingly corrupted FAT to the original one (as seen by testdisk).

I was hoping that others might have seen a similar situation and have an idea. Unfortunately I'm not an expert of file systems.

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: exFAT SD card some files disappeared, but testdisk still finds them as existing

#5 Post by recuperation »

prof wrote: 06 Feb 2023, 18:12
recuperation wrote: 06 Feb 2023, 14:13 Your copy job costs nothing.

No, there is not a repair solution for you. Repairing is not professional anyway. You can be lucky of having some repair features with Testdisk.
My "copy job" costs a lot of time, (10 GB data at least) and as mentioned, I don't really trust CHKDSK either, it doesn't really help with understanding the issues it "fixes".
If copying only 10 GB costs "a lot of time" you should consider buying quality SD cards instead. That is cheaper than having an expert only touching your SD card. :)
Finding out what causes your problems will cost you 10 to 100 times more than starting a copy job - which doesn't require you to sit aside and watch it.

I am actually an IT professional (been that for 25 years), and I can assure you, root cause analysis of errors is the most professional way.
From an IT professional I would have expected an error report containing maker and model to see if your case belongs to Shenzen crap class products.

I came here to understand how it is possible that testdisk sees the files as existing while any other file managers (both in android and in windows) don't,
It might the same reason why a LibreOffice might be able to open a corrupted Excel file which won't be opened by Excel anymore.
and if there's any way to restore the seemingly corrupted FAT to the original one (as seen by testdisk).
Please keep in mind that Testdisk contains only basic repairs. The rest of the recovery world doesn't even bother trying to repair a logically broken device. In your case you did not even copy the device which would have isolated logical errors from physical ones.
I was hoping that others might have seen a similar situation and have an idea. Unfortunately I'm not an expert of file systems.
If you go beyond what Testdisk does there is simply no one-button-repair possible. That's why other software only recovers and does not write to the source.

prof
Posts: 12
Joined: 12 Oct 2022, 04:02

Re: exFAT SD card some files disappeared, but testdisk still finds them as existing

#6 Post by prof »

recuperation wrote: 06 Feb 2023, 18:54 If copying only 10 GB costs "a lot of time" you should consider buying quality SD cards instead. That is cheaper than having an expert only touching your SD card. :)
Finding out what causes your problems will cost you 10 to 100 times more than starting a copy job - which doesn't require you to sit aside and watch it.

From an IT professional I would have expected an error report containing maker and model to see if your case belongs to Shenzen crap class products.
Finding out the cause of the problem could prevent me from a lot of future headache. If it turns out that my phone (a top of the line Sony Xperia) has a hardware issue that causes SD Card corruption for example... Hence my intention to figure out what happened, not only try to recover the files. I was also surprised by the poor file copy performance on the PC actually, it must be down to the built in card reader. The PC is quite old (7 years), I suspect the reader is sill on the USB2.0 bus. I don't have a USB3.0 reader at hand, I don't regularly move around a lot of files between cards and devices. (I only have an even older reader from the times when I had a dedicated camera. Before phone cameras became fairly decent.)
As mentioned, I'm not a pro in the storage area, so I'm not familiar with common issues and what additional data you would have needed to help with my problem.
By the way it's a 500GB Kingston Canvas Select Plus SDXC Class 10 UHS-I U3 A1 card, so I think crap manufacturing can be ruled out, I did not even think of it for the same reason. It's 1.5 years old and been using it in my phone with no issues so far.
It might the same reason why a LibreOffice might be able to open a corrupted Excel file which won't be opened by Excel anymore.
And what is that reason? I'm not aware, I'm not a file system/recovery expert, as mentioned.
Please keep in mind that Testdisk contains only basic repairs. The rest of the recovery world doesn't even bother trying to repair a logically broken device. In your case you did not even copy the device which would have isolated logical errors from physical ones.
Yeah, this is a 500GB card, so I don't even have a place to immediately copy an entire image to. (Not to mention the time it would take.) Hence my intention for an in-place fix if one can be figured out. I did not expect testdisk to fix it. I thought that some software issue on the phone caused the files being deleted, that's why I turned to testdisk in the first place, I was hoping that they could be undeleted. And I was surprised to see that testdisk sees the files as existing ones. And this is the reason why I actually came here for potential advice.
If you go beyond what Testdisk does there is simply no one-button-repair possible. That's why other software only recovers and does not write to the source.
Sure, I get that. I was hoping this is some fairly common issue with the exFAT filesystem that can be fixed with recovering the portion of the allocation table that tetsdisk apparently still sees, but all other file managers on both OS (Android/Windows) don't. Or something similar. If there is no any idea on doing something like that, I will go ahead and do the next available option. (Salvage, fix with chkdisk, restore files, and hope this doesn't repeat.)

prof
Posts: 12
Joined: 12 Oct 2022, 04:02

Re: exFAT SD card some files disappeared, but testdisk still finds them as existing

#7 Post by prof »

Just a final update.
I did take the leap of faith with chkdsk /F.
To my great surprise, it did fix most of the issues, 99% of the files reappeared. I only lost about 80 or so. Which I had backups of, so all is well in the end.
This thread can be closed.

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: exFAT SD card some files disappeared, but testdisk still finds them as existing

#8 Post by recuperation »

Thanks for posting a feedback, any feedback, even a failure notice is good.

Locked