0

When trying to upgrade to a newer rom, my system got a little messed up and I had to format my /data partition. I had made TitaniumBackup and twrp backups but they were on the encrypted data partition. When I flashed the new rom, this partition became all hashed folders and TWRP stopped asking me for the password. I took the time to do an adb pull of the /dev/block/sda21 (which is the device that is mounted on sdcard/. How would I go about decrypting this on a linux device?

4
  • 1
  • 1
    This solution works for Adoptable Storage, but the things could differ for /data. First of all the key isn't in /data/misc/vold, instead in crypto footer of userdata partition (usually last 16KB). Secondly the encryption algorithm may be different e.g. on Qualcomm devices aes-xts is used with dm-req-crypt while on others its aes-cbc-essiv with dm-crypt target. And the key is also bound to hardware. Commented Jul 6, 2019 at 15:11
  • in fact, they keys are gone. it is not possible to decrypt data (otherwise TWRP would do the job)
    – alecxs
    Commented Jul 6, 2019 at 15:30
  • Yes, TWRP uses same code from vold which encrypts/decrypts /data on main Android OS. Commented Jul 6, 2019 at 17:36

0

You must log in to answer this question.

Browse other questions tagged .