Micro SD Card Formatted as Internal Storage on Android Possibly Corrupt

Using PhotoRec to recover lost data
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
Post Reply
Message
Author
Hatrick8
Posts: 3
Joined: 20 Jul 2018, 02:33

Micro SD Card Formatted as Internal Storage on Android Possibly Corrupt

#1 Post by Hatrick8 » 20 Jul 2018, 02:50

I have a 32GB Micro SD Card I used in my Android 7.1 phone and had it formatted as internal storage. I have nightly back-ups of my data - if I'm connected to wifi. A week ago, I was on a road trip, took about 70 pictures during the day, did not connect to wifi, so my photos didn't back up. In the morning, I noticed some of my apps were crashing. I realized the apps that were installed on the card were the ones that were crashing. I took the card out and set it aside until a few days ago when I had time to try to recover the files.

I put the card into an SD Micro Card Adapter and plugged that into a computer. The computer could see two partitions, the first was an Android file structure, but no files. The second partition was showing a 0 bytes and Windows prompted me to format the card. I did not. I haven't written anything to the card since it became unstable in my phone.

A colleague used the card reader and we plugged that into his Linux box and he ran PhotoRec. He could see files, but could not open any of them and PhotoRec only recovered 1 file, which was not any of the data files I had on the card.

I then ran PhotoRec from my Windows computer and had the same result.

When I plug the card back into my phone, my phone sees the card is there. It shows me apps are installed (but I cannot actually access them). It tells me there are no image files (yet, the used space on the card is the same as it was when the issues started). I can see other files that are on the card. If I attempt to access the files from my phone, my phone reboots.

I put the card in, then plugged my USB cable to my phone and my computer. I can see the SanDisk drive, with the amount of space free showing what I expect. When I run PhotoRec, it doesn't recognize my phone or the card.

I believe that because the card was formatted as internal storage, the only way to see the data is to have the card in my phone. When an SD Card is formatted as internal storage, it is encrypted so that the only way to view the files is if the SD Card is in the phone. I think that may be why my colleage said he could see some files on his Linux machine, but couldn't access them, and why PhotoRec didn't recover any of the files.

With the card not in my phone, my phone works, but I cannot take any pictures because my phone thinks I don't have any internal storage. I don't want to "Forget" the card on my phone because then the encryption key on the phone to unlock the card will be deleted.

Is there a way to run PhotoRec and have it recognize my phone and the SD card so it can access the files? Have you encountered this issue previously and know a way to pull the data from the card without the phone?

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 4420
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Micro SD Card Formatted as Internal Storage on Android Possibly Corrupt

#2 Post by cgrenier » 20 Jul 2018, 06:26

Try TestDisk, Advanced, List. Can you copy your files ?
If it doesn't work, when using PhotoRec, choose [Whole] instead of [Free]. Does it work better ?

Hatrick8
Posts: 3
Joined: 20 Jul 2018, 02:33

Re: Micro SD Card Formatted as Internal Storage on Android Possibly Corrupt

#3 Post by Hatrick8 » 20 Jul 2018, 12:55

Thank you for your reply. Here is some additional information based on your reply:

I did choose the [Whole] when I had the card inserted into the card reader when using PhotoRec. That didn't recover the files that are on the partition that has all the data.

When I ran TestDisk yesterday, I didn't get much to work with. Most of the log file shows approximately 2000 lines of this:
file_pread(5,1,buffer,62335999(3880/60/20)) lseek err Invalid argument
file_pread(5,1,buffer,62333952(3880/27/52)) ReadFile The drive cannot find the sector requested.

The "ReadFile The drive cannot find the sector requested" line appears 28 times, the other 2000 or so lines are the Invalid argument lines.

I will attempt to run the Advanced, List commands in TestDisk. (I can't remember exactly what commands I ran yesterday, everything has been a blur lately!)

With the card inserted into my phone, I can see some of the contents on my phone, but cannot access the contents, as the phone reboots the instant I try to access any of the contents on the card. When the phone is connected to my computer via USB cable, I can see the drive in Windows Explorer, with the correct amount of space available, but I cannot view any of the contents.

Both PhotoRec & TestDisk cannot see the drive when the card is inserted into my phone and my phone is connected to my computer via USB cable.

Hatrick8
Posts: 3
Joined: 20 Jul 2018, 02:33

Re: Micro SD Card Formatted as Internal Storage on Android Possibly Corrupt

#4 Post by Hatrick8 » 20 Jul 2018, 18:08

I wanted to provide you with an update.

Because the card was formatted as internal storage, the only way to access the data on the card was to have the card connected to the computer via USB cable.
PhotoRec and TestDisk do not see the phone as storage, and therefore, I could not use them to recover the files.

My colleague was able to mount the phone in Linux and run some commands to see the data and was able to pull the files I needed.

A feature request for PhotoRec and TestDisk would be to see the file structure of a phone so that someone could run those tools against the storage on their phone.

I thank you for your time and for the software. I'm glad I was able to recover my files without it, but will definitely keep this in the event I need to recover other files in the future.

sasaborg
Posts: 1
Joined: 10 Aug 2018, 13:40

Re: Micro SD Card Formatted as Internal Storage on Android Possibly Corrupt

#5 Post by sasaborg » 10 Aug 2018, 13:44

Hi.
I have a similar problem. However, mine phone is completely wiped in the meantime so there is no encryption key and the phone does not recognize the card.
PhotoRec scanned the card and found only one .jpg file (there is over 12GB of photos and videos).
Does anyone have an advice? I guess the Linux solution by OP is valid only if the card is recognized by the phone?

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests