When I use adoptable storage on my device, then my SD card will be encrypted. Is there a way to get the "encryption key" with root access? So if my phone dies, I can still retrieve my data from the SD card by using the key?

Related: How does Marshmallow encryption work technically?

I am running Cyanogenmod 13, rooted.


There's some interesting pointer found in Decrypting Android M adopted storage (emphasis mine):

Android M allows for adoptable storage, which is implemented similarly to internal storage FDE -- using dm-crypt with a per-volume, static 128-bit AES key, stored in /data/misc/vold/. Once the key is extracted from the device, adopted storage can be mounted and read/written on any Linux machine. Adoptable storage encryption is done purely in software (at least in the current preview build), so its performance is likely comparable to encrypted internal storage on devices that don't support hardware-accelerated FDE.

Also take a look at Corrupt SD card formatted as internal storage, which gives a quite detailed tutorial on how to do it :)

  • I see the file in ES Explorer. Its size is 16 Byte. How can I extract the key from it? Assume I am not a Linux user. Thank You. – Royi Mar 7 '17 at 10:59
  • @Royi assuming you're not a Linux user, I cannot help you. See the emphasized part of my answer: the proposed solution only works with Linux. Apart from that, the file content is the key, as far as I understood. – Izzy Mar 7 '17 at 11:03
  • I installed Linux on a computer just for that. I meant I am not experienced. I can see the file on ES Explorer which states its size is 16 Byte. Now, how can I extract the key from the file in my Android? All say HEX editor. Which HEX Editor can ask for root access to access that file? Is the size of 16 Byte correct? – Royi Mar 7 '17 at 11:17
  • @Royi Have you seen the linked guide? Take a closer look at the first comment there, which should answer your question. I don't use adoptable storage myself (and don't plan to), so I cannot test and verify. And yes, 16 byte is correct – according to the linked answer. – Izzy Mar 7 '17 at 12:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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