Monday, September 4, 2017

external sd - How to decrypt Adopted Storage?


Using the SD card as Adopted Storage encrypts it. How can it be decrypted?



Answer





  1. Your device must be rooted.

  2. Using a file browser like ES Explorer, browse to /data/misc/vold.


  3. The .key file there is the encryption key of your adopted storage.

  4. Open that file with a hex editor to view the 16-byte key.

  5. On any GNU/Linux distro you can do this first mount your SD card, in my case SD card was mounted at /dev/sdb2.


  6. Then run this command:


    dmsetup create crypt1 --table "0 `blockdev --getsize /dev/sdb2` crypt aes-cbc-essiv:sha256  0 /dev/sdb2 0"

    Some types of errors/warnings can be ignored.





  7. If your key is correct you can mount it by mount -t ext4 /dev/mapper/crypt1 /mnt/1/



  8. Finally you can run cd /mnt/1 to browse the decrypted storage.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...