TeamWin / android_device_nextbit_ether

For building TWRP for Nextbit Robin ONLY
2 stars 6 forks source link

Unable to decrypt data with LineageOS 14.1-20170828-nightly and TWRP 3.1.1-0 #2

Open Fusl opened 6 years ago

Fusl commented 6 years ago

Setting up encryption on LineageOS installed on the Nextbit Robin seems to cause issues for TWRP trying to decrypt the partition.

What I tried so far:

dmesg in the recovery prints this while trying to unlock the phone:

<3>[  119.776227] QSEECOM: qseecom_query_app_loaded: App id 3 (keymaster) already exists
<3>[  120.818700] QSEECOM: qseecom_query_app_loaded: App id 3 (keymaster) already exists

recovery log:

I:Set page: 'mount'
I:Set page: 'decrypt'
I:Set page: 'decrypt_pattern'
I:Set page: 'trydecrypt'
I:operation_start: 'Decrypt'
crypt_ftr->fs_size = 53239743
Using scrypt with keymaster for cryptfs KDF
Trying to convert ascii string of odd length
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
Error starting keymaster signature transaction: -24
Signing failed
kdf failed
failure decrypting master key
Failed to decrypt master key
crypt_ftr->fs_size = 53239743
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
Error starting keymaster signature transaction: -24
Signing failed
kdf failed
failure decrypting master key
Failed to decrypt master key
Failed to decrypt data.
spinda commented 6 years ago

I've run into the same issue with lineage-14.1-20171114-nightly-ether. This means I'm unable to upgrade unless I decrypt my device first, then re-encrypt after the upgrade process completes. @deadman96385 and @Dees_Troy, are you still actively maintaining this?

spinda commented 6 years ago

...Ugh, replace "decrypt my device" with "perform a full wipe and reset", as Android doesn't offer a way to decrypt directly. Fantastic.

spinda commented 6 years ago

It would appear error code -24 corresponds to KM_ERROR_KEY_NOT_YET_VALID.

spinda commented 6 years ago

Looks like this happens because TWRP thinks it's sometime in 1970.

edit: Hmm, but setting the clock to the correct date and time via the terminal doesn't fix it...

osopolar commented 6 years ago

I have the same problem with my huawei honor 5 and LinageOS 14.20170809-NIGHTLY-kiwi. I wanted to update the OS to a new version and found that I cant decrypt the HD. Any workarounds? Or do I need to perform a full wipe?

Edit: Sorry, I just found the right issue for my phone. Anyway it seems to be a more general problem with TWRP.

Alex9001 commented 6 years ago

Issue persists in 3.2.0-0