0
dmsetup create crypt1 --table "0 `blockdev --getsize /dev/sdb2` crypt aes-cbc-essiv:sha256 <Put the 16-byte hex key here> 0 /dev/sdb2 0"

I got it from step 6 of the first answer here.

I am trying to view the files on an android adopted SD card.

The card suddenly stopped working on my phone and I'm now trying to retrieve my files before I press on "forget" to unmount it from my phone and go back to using my phone normally on it's Internal memory.

JJrussel
  • 411
  • 4
  • 15

1 Answers1

1

`blockdev --getsize /dev/sdb2` (in backticks) is a command to get partition size, where /dev/sdb2 is the (encrypted) partition and most likely has a different name on your pc
<Put the 16-byte hex key here> is a placeholder for the real encryption key you have previously extracted from /data/misc/vold
dmsetup create crypt1 is the actually command to decrypt /dev/sdb2
when successfull a new (decrypted) block device /dev/mapper/crypt1 (ext4) will created

Note: root permissions required. open root shell with sudo -i before running this Linux command

alecxs
  • 4,034
  • 3
  • 16
  • 34