Android - Recovering data from corrupted SD card formatted as internal storage (Marshmallow)

1) will rooting delete the encryption key so that the card can't be accessed?

No, actually "rooting" will not delete anything. Rooting is just adding an application for superuser or root-level access. That being said, in order to root your device you must have an unlocked bootloader. Unlocking the bootloader will wipe the entire device, including the encryption key, and all other data on the device. On the Moto G 2015 there is no way around this. Oh, and removing the card and performing the operation will not work, once it is rooted, the system will be different and the encryption key will change.

2) is there a way to get fsck working?

Not without root access. To be honest, even if you did get it to run the chances it would correct this type of problem are very low.

3) any other ideas for getting the media off this card?

Unfortunately no... once media has been adopted by the system, it is encrypted with a unique key to that system. If you can access the key, it is possible to access the data via Linux assuming the data is not corrupted. If the data is corrupted the chances of recovering encryped, corrupt data are extremely small.

As much as I would like to be able to give you an answer to recover your precious photos and videos, I don't believe there is one. All I can say is that moving forward I suggest NOT using adopted storage if possible (if this card was simple external/portable storage, the chances of recovering media from it would raise exponentially) and use a cloud backup solution like Google Photo which has the ability to maintain a backup of your photos and video automatically.


Having seen the same problem more than once and after giving up on trying to root my phone (runtime root), I've opted for a method that I hoped would work and actually worked.

The method I've chosen will require an identical SD card and a card reader, however I believe it should work also with any SD card as long as it is larger - haven't tested it though.

Remove the supposedly corrupted SD card from the phone and plug it into a Linux machine. After finding what device was representing it (commonly /dev/mmcblk*), use dd to extract its contents:

$ sudo dd if=/dev/mmcblk0 of=/tmp/sdcard.dump bs=4M

sdcard.dump will be absolutely useless as it is encrypted and you don't have the encryption key, but it doesn't matter. Eject that SD card and insert the new, probe the SD card device (say /dev/mmcblk1) then run:

$ sudo dd if=/tmp/sdcard.dump of=/dev/mmcblk1 bs=4M
$ sync; sync

Eject the new SD card and plug it in your phone. In my case the phone was tricked into using that new card as its existing storage, thus mounting it and allowing me to gain access to its contents.

If you get errors while reading the corrupted SD card, try using ddrescue instead of dd when creating the initial image. Chances are that despite the errors you will still get access to a large portion of the data on the card.