0

My pme's encryption has been flaky recently: it would ask for the pin a couple of times and reboot before finally loading the OS. And I wasn't able to mount /data in TWRP ("decryption failed").

Today something different happened: after a reboot the device doesn't ask for the PIN anymore - it just displays the Decryption Unsuccessful. The password you entered is correct, but unfortunately your data is corrupt message straight away. After booting into recovery I discovered that TWRP isn't asking for the password either anymore. Looks like now the device thinks it was encrypted with the default password, decrypts the partition, gets absolute garbage of course, and fails to mount it:

I:Device is encrypted with the default password, attempting to decrypt.
crypt_ftr->fs_size = 51314688
Using scrypt with keymaster for cryptfs KDF
Invalid hex string
Failed to convert passwd from hex, using passwd instead
keymaster module name is Keymaster QTI HAL
keymaster version is 256
Found keymaster1 module, using keymaster1 API.
Signing safely-padded object
Using scrypt with keymaster for cryptfs KDF
Invalid hex string
Failed to convert passwd from hex, using passwd instead
keymaster module name is Keymaster QTI HAL
keymaster version is 256
Found keymaster1 module, using keymaster1 API.
Signing safely-padded object
crypt_ftr->fs_size = 51314688
Using scrypt with keymaster for cryptfs KDF
keymaster module name is Keymaster QTI HAL
keymaster version is 256
Found keymaster1 module, using keymaster1 API.
Signing safely-padded object
Using scrypt with keymaster for cryptfs KDF
keymaster module name is Keymaster QTI HAL
keymaster version is 256
Found keymaster1 module, using keymaster1 API.
Signing safely-padded object
load_crypto_mapping_table: target_type = req-crypt
load_crypto_mapping_table: real_blk_name = /dev/block/mmcblk0p63, extra_params = fde_enabled ice
Password matches
Data successfully decrypted, new block device: '/dev/block/dm-0'
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'
I:Actual block device: '/dev/block/dm-0', current file system: 'ext4'
Updating partition details...
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'

Questions:

  1. Why does it think it's encrypted with the default password? What got corrupted? Is this a hardware issue?

  2. Is there any chance I can restore my data? I know my PIN, I downloaded both encrypted partition image and the 'decrypted' garbage partition image (just in case) from the device

  3. If I format the data partition, set the same password again, then reupload my original encrypted partition back - would that work? Or the new generated encryption key wouldn't match my original one?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.