Open yurtesen opened 5 years ago
I am thinking that the issue is that the LineageOS puts update file into /data/lineageos_updates
so how can TWRP apply the update without asking the encryption pattern???
Decryption isn't needed to apply an OTA. However, if you have other addons installed, these will not be able to install while data is encrypted, which may lead to an unbootable system. There are already several issues related to this open (See: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1478 and https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1459), and there's a patch on Gerrit that allows decryption prior to processing of the OTA file to help circumvent this issue. If you can build a TWRP with that patch included and see if it fixes the issue (and then post feedback on the patch), that would be helpful for getting it merged.
https://gerrit.omnirom.org/c/android_bootable_recovery/+/34338
@CaptainThrowback I did not know that it does not need decryption and assumed it would as the update file is larger than the /cache partition and I could not imagine how it could apply it otherwise...
If somebody builds TWRP for zl1 with the patch, I can test it. I am not able to build it myself right now.
Thanks!
For your edification, here's the patch that enabled installing OTAs without first decrypting /data: https://github.com/omnirom/android_bootable_recovery/commit/72638b6437822300fefd77569d98fbad3dad5c28
I once meet this problem while using LineagesOS's OTA(an updater apk built in the OS) and only reboot TWRP automatically over and over again, cannot enter system. System and TWRP are both dead. I remember the OS version is 0724 nightly.
Now I change to the latest TWRP 3.3.1-2(older one is 3.3.1-0), and I flash the all new system zip(still the LineageOS, 0726 nightly), I find I can get into system but still sticking at the recovery boot loop. System is alive, TWRP is dead. But I am not sure if I update the OS, what will happen.
See my reported issue: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1492
@timeneverdie There is no newer TWRP for zl1. Also this is a problem only if the encryption is enabled. https://dl.twrp.me/zl1/
Obviously this is a known issue as @CaptainThrowback explained. Mine sounds similar to issue https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1478
Device codename: zl1 TWRP version: 3.3.1
WHAT STEPS WILL REPRODUCE THE PROBLEM?
1- Install TWRP 2- Install LineageOS 16 and addonsu 16 and opengapps pico arm64 android 9.0 3- Encrypt phone with 4x4 pattern 4- Upgrade LineageOS using OTA
WHAT IS THE EXPECTED RESULT?
1- System boots into TWRP 2- Asks encryption pattern. (as update is in
/data/lineageos_updates
) 3- LineageOS is upgraded 4- Reboot 5- Ask decryption pattern then boot into OS.WHAT HAPPENS INSTEAD?
1- System boots into TWRP 2- LineageOS is upgraded without asking encryption pattern! 3- Reboot 3- Asks decryption pattern. Then tries to go into OS but gets stuck forever at boot animation. If I reboot into recovery and clean cache/dalvik cache and reboot. It tries to boot for a while but it reboots into recovery.
ADDITIONAL INFORMATION
I am able to recover the system by manually entering TWRP, giving the decryption pattern, then flashing the LineageOS installation package. However after reboot I find out that some apps lost their permissions and phone starts the installation finalization wizard.
When I boot into recovery, it normally asks the decryption pattern and there is no problem decrypting the data partition.
Clearing dalvik/cache manually does not fix the issue.
I checked /system partition after rebooting to recovery and it is empty.?!
Recovery log from upgrade operation:
/tmp/recovery.log
: https://paste.omnirom.org/view/1564f2a5dmesg
: https://paste.omnirom.org/view/9a9cae23