I did a factory reset and then realized that I didn't decrypt my SD Card. I know that the data is probably lost, but I did make a complete copy of the Internal Storage.

Is there a way to copy back to the phone, the encryption key? I also know the password I used to generate the encryption. Where is the encryption key file located?

Edit: I made a copy of Internal Storage folder connecting the Samsung J5 mobile to a PC, but I can't find /data/misc/vold. What am I doing wrong?

  • Internal Storage is /data/media/0 (therefore /data/* not included)
    – alecxs
    Commented Feb 7, 2021 at 9:17

1 Answer 1


The encryption key should be located in /data/misc/vold. If you backed up that directory, you should see a .key file with a long name inside. Open that file with a hex editor, and copy the 16-bit key. You can decrypt your storage using this command in a Linux distribution:

dmsetup create crypt1 --table "0 `blockdev --getsize <your device ID, ex:/dev/sdb>` crypt \aes-cbc-essiv:<key you copied> 0 <your device ID again> 0"

Source of the command

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .