2

A couple of days ago the SD card (which is the "expanded filesystem" from android 6.0) on my phone stopped working. The phone still boots and works, but all my data (especially photos and WhatsApp conversations - yes, I didn't make a backup, shame on me) are gone.

I removed the SD from the phone and put it in my PC, where Fedora recognizes the partitions but cannot mount them.

Here's the output of fdisk -l:

fdisk -l /dev/sdc
Disk /dev/sdc: 29 GiB, 31104958464 bytes, 60751872 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: 938FFB3B-CA49-45D0-89B3-BE22ADAAD86E

Device     Start      End  Sectors Size Type
/dev/sdc1   2048    34815    32768  16M unknown
/dev/sdc2  34816 60751838 60717023  29G unknown

Whenever I try to mount one of those partitions, I get

mount /dev/sdc1 /mnt/test
mount: /mnt/test: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.

Same result if I use the -t option with auto, vfat or ntfs.

If I open gparted and attempt the data rescue this is what it finds:

Gparted's Attempt Data Rescue

and when I click the "View" button it correctly recreates the Android filesystem, but with no file inside:

tree
.
├── Android
│   ├── data
│   │   ├── com.android.vending
│   │   │   └── files
│   │   ├── com.google.android.apps.maps
│   │   │   └── files
│   │   ├── com.google.android.gms
│   │   │   └── files
│   │   ├── com.google.android.googlequicksearchbox
│   │   │   └── files
│   │   │       ├── download_cache
│   │   │       └── pending_blobs
│   │   ├── com.google.android.music
│   │   │   ├── cache
│   │   │   └── files
│   │   ├── com.google.android.videos
│   │   │   └── files
│   │   │       └── Movies
│   │   ├── com.google.android.youtube
│   │   │   ├── cache
│   │   │   └── files
│   │   └── com.motorola.migrate
│   │       └── files
│   │           └── Pictures
│   └── media
│       ├── com.android.providers.media
│       ├── com.google.android.talk
│       └── com.motorola.MotGallery2
├── bluetooth
├── DCIM
│   └── Camera
├── Download
├── LOST.DIR
├── media
│   └── audio
│       └── notifications
├── Music
├── Ringtones
├── System Volume Information
│   └── IndexerVolumeGuid
└── WhatsApp
    └── Media
        ├── WhatsApp Audio
        ├── WhatsApp Images
        └── WhatsApp Video
44 directories, 1 file

Has anyone any idea?

  • @acejavelin Unfortunately, I'm not root. The situation described in the link you gave me is exactly what I need, but if I root the phone it will wipe all my data, including the encyption key. Is there any other way around this? – Cynical Dec 4 '17 at 15:57
  • I agree. I just don't see the point of not having ANY way of recovering a lost key. It is even not very clear that there is actually an encryption happening, in my opinion. – Cynical Dec 4 '17 at 22:36
  • In the end, I gave up and made my phone "forget" the SD, thus throwing away the key. I still think that this encryption should be stated in a clearer way, maybe some kind of "recovery passphrase", but that's a whole different problem. Anyway, @acejavelin, if you want to put your comments as an answer, I'll mark it as accepted and "close" the case. – Cynical Dec 5 '17 at 7:05
  • I have deleted my comments and made it an answer. – acejavelin Dec 5 '17 at 12:52
1

The issue here is that Marshmallow and newer Android external storage is encrypted when it is adopted by the system as internal storage.

You need the crypto key from your device to mount the volume, does your phone have an unlocked bootloader and/or are you rooted? If not, you are not going to be able to access the key and decrypt the volume.

Similar questions which may be useful as reference: Moto G3 (android marshmallow) not detecting SD card anymore (solution?) and Recovering data from corrupted SD card formatted as internal storage (Marshmallow)

Remember that this is not unique to the Moto G 2015, most Android devices with Marshmallow and newer have this capability (and issues). Honestly, it best to not use adopted storage if at all possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.