Score:3

How to access contents of an old Android SD card?

us flag

I have an SD card with lots of important personal documents on it. I've used it with an Android phone as an 'Adoptable Storage' so it showed up as internal storage on that device, which, according to this post makes it very likely to have been encrypted. I do not remember the exact version of Android the phone used. I still have the phone lying around, but I'm afraid it has had a factory reset since the SD card was taken out from it. The reason it was taken out is it showed up at one point (during copying a large amount of photos to it) as 'corrupted'.

My problem is that I'd like to try and access the contents of this SD card, but I don't know how. I have Ubuntu 20.04.3 LTS and my computer has a card reader slot. Upon insertion I can detect it using multiple methods:

  1. It shows up in Disks, with two partitions, I guess one is an Android system partition and the other is data: enter image description here

  2. If I do sudo fdisk -l I get the following output:

Disk /dev/mmcblk0: 14,89 GiB, 15962472448 bytes, 31176704 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1E8F73CE-8792-4F95-B650-5EF20FB39D8A

Device         Start      End  Sectors  Size Type
/dev/mmcblk0p1  2048    34815    32768   16M unknown
/dev/mmcblk0p2 34816 31176670 31141855 14,9G unknown
  1. And if I run sudo mkdir /sdcardmount; sudo mount /dev/mmcblk0 /sdcardmount, I get this:
mount: /sdcardmount: wrong fs type, bad option, bad superblock on /dev/mmcblk0, missing codepage or helper program, or other error.

So it seems to me at least all is hopefully not lost, but I'm not able to read the contents. I've seen and tried to interpret this question here and this article already, but they did not help me.

Any tips how to move forward with this?

EDIT: Upon sudo file --keep-going /dev/mmcblk* I get:

/dev/mmcblk0:   block special (179/0)
/dev/mmcblk0p1: block special (179/1)
/dev/mmcblk0p2: block special (179/2)

EDIT2: With sudo file -s /dev/mmcblk0p1 I get:

/dev/mmcblk0p1: data

No matter if I run sudo modprobe sdhci, I get the same result.

With sudo gdisk /dev/mmcblk0 I get:

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

With sudo parted /dev/mmcblk0 print I get:

Model: SD  (sd/mmc)
Disk /dev/mmcblk0: 16,0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name            Flags
 1      1049kB  17,8MB  16,8MB               android_meta
 2      17,8MB  16,0GB  15,9GB               android_expand

EDIT3: After reading the linked blog post carefully and several other related questions on various StackExchange sites I'm fairly certain the issue is the encryption - I'll need to decrpyt the contents somehow. I do not have access to the key however.

waltinator avatar
it flag
Use `sudo file --keep-going /dev/mmcblk*` to see more info. Please [edit] your Question, don't reply with Add Comment.
Benjamin Márkus avatar
us flag
Thanks, I've done the edit.
cn flag
oh since it says gpt. try `gdisk /dev/mmcblk0` and see if that shows the fstype
Benjamin Márkus avatar
us flag
I got: GPT fdisk (gdisk) version 1.0.5 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT.
sudodus avatar
jp flag
Is it possible that the file systems on the card are encrypted?
Benjamin Márkus avatar
us flag
It is more than likely as it was used as an 'Interal Storage' / 'Adoptable Storage' on an Android device. Sorry I did not make this more clear in my question, I'm editing the question now to make it more clear.
Score:0
cn flag

Use either of these...

sudo file -s /dev/mmcblk0p1
sudo parted /dev/mmcblk0
sudo gdisk /dev/mmcblk0

to find the filesystem type and you can do...

mount -t {fstype} /dev/mmcblk0p1 /mnt

where {fstype} is the filesystem type found at the first command.

  • Your commands show UNKNOWN, That will be because it was not created on Ubuntu. You need to find the matching module and add it. I would assume it is likely sdhci and that would be added with ...

    sudo modprobe sdhci
    

    and then try the previous commands again.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.