TeamWin / Team-Win-Recovery-Project

Core recovery files for the Team Win Recovery Project (T.W.R.P) - this is not up to date, please see https://github.com/TeamWin/android_bootable_recovery/
http://twrp.me
1.95k stars 741 forks source link

TWRP 3.2.3-0 Fails to decrypt Nexus 6 on LineageOS 15.1 (12-28-18) #1372

Open nate2014jatc opened 5 years ago

nate2014jatc commented 5 years ago

shamu: 3.2.3-0:

WHAT STEPS WILL REPRODUCE THE PROBLEM?

Have an encrypted device, and try to boot to recovery.

WHAT IS THE EXPECTED RESULT?

Being able to decrypt my device.

WHAT HAPPENS INSTEAD?

Decryption failed. Triple checked that it's the correct pattern. LOS accepts it to boot.

ADDITIONAL INFORMATION

No additional information is recoverable, as TWRP cannot write to the disk.

I'm aware that it's up to the individual maintainers to fix device-specific blobs. I'd like guidance on a fix, or guidance on how to fix it myself.

zem commented 5 years ago

+1 but my phone is xiaomi mix 1 with lineage 15

CaptainThrowback commented 5 years ago

https://twrp.me/faq/encryptionsupport.html

The "how to fix" is a complicated question. If you contact the TWRP team on IRC in #twrp on Freenode, you may be able to get some live help there, if someone is available.

nate2014jatc commented 5 years ago

I appreciate that you edited your comment to provide more fleshed out information. I'll attempt to reach out there.

hanswurst31 commented 5 years ago

+1 same here with my s9 startlte

b1mt3 commented 5 years ago

Experiencing the same behaviour on dora (Sony Xperia X Performance) with the same TWRP version. Here are the log files for my device (running AOSP Oreo 8.1 with kernel v4.9). Installing Magisk 18.0 and unchecking Preserve data encryption flag makes no effect. Here are the logs for my device: /tmp/recovery.log: https://paste.omnirom.org/view/d8b90e9e dmesg: https://paste.omnirom.org/view/4098e867

CaptainThrowback commented 5 years ago

@b1mt3 are you going to try updating TWRP yourself to support decryption? Or are you looking for your device maintainer?

b1mt3 commented 5 years ago

@CaptainThrowback thank you for reaching out. I don't mind trying to update TWRP myself, but would really appreciate a recommendation of the direction to look into, i.e. some wiki or source code snippets to look for. Maybe a sample of what the part should look like ideally to support the decryption properly, so I can get my head around this stuff. I need a bit of guidance of what to look for, even a rough idea is good for me. It's exciting to tinker it myself, but just don't know how to even approach it...

Thank you again for your time, With kind regards.

CaptainThrowback commented 5 years ago

Look through the device repos here on TeamWin and you'll get an idea of what blobs are typically included for working decryption, and what rc files are needed. If you go back to IRC some people can probably offer more assistance.

EDIT: Actually, @b1mt3 I think you just need to rebuild TWRP with the updated FDE patch, found here: https://gerrit.omnirom.org/c/android_bootable_recovery/+/32689

b1mt3 commented 5 years ago

@CaptainThrowback reporting back: cherry-picked the commit you specified and everything's working perfect now!

Thank you very much for your assistance!

nate2014jatc commented 5 years ago

@CaptainThrowback With the new FDE patch from omnirom.org, do you think that TWRP will see more support for encrypted devices?

CaptainThrowback commented 5 years ago

Some devices may work with the existing blobs, but I suspect many either don't have the blobs included, or they will need to be updated based on the installed Android version. I don't think it'll make much of a difference unless some device maintainers step up to update the device trees. But that will remain to be seen, I suppose.

persmule commented 5 years ago

Before the new format FDE is officially supported by twrp, is it possible to use executables shipped with twrp to create an (empty) old-formatted FDE (encrypted with default password) upon data partition?

If so, using "backup (saved outside data partition) ->(create an old-formatted FDE)->restore" can effectively encrypted the data partition, and the FDE could be decrypted with either android system or twrp, with password changeable with android system.