Last night, I messed up my LineageOS 16 install on my Galaxy S5 and had to reinstall it, starting essentially from scratch. I wanted to see if there was any way I could decrypt the 128 GB microSD card I used as adopted storage and found this tutorial. I got the key from a backup made using TWRP and tried it on Linux Mint 20 MATE (booting from USB), but it didn't work. The following command gave me an error:
dmsetup create crypt1 --table "0 `blockdev --getsize /media/mint/4B2E-1F13` crypt aes-cbc-essiv:sha256 [16-BYTE HEX KEY] 0 /media/mint/4B2E-1F13 0" blockdev: ioctl error on BLKGETSIZE: Inappropriate ioctl for device /dev/mapper/control: open failed: Permission denied Failure to communicate with kernel device-mapper driver. Incompatible libdevmapper 1.02.167 (2019-11-30) and kernel driver (unknown version).
Doing it with
sudo gave me this error:
blockdev: ioctl error on BLKGETSIZE: Inappropriate ioctl for device Invalid format on line 1 of table. Command failed.
I couldn't even mount the SD card with Termux when after putting it back into my phone. Is my data unrecoverable? Do I have the wrong key? Thanks.