0

Old versions of TWRP would prompt for the password to decrypt the phone prior to performing an ota, however new versions are able to apply otas without requiring decryption. This is great in practise but does mean that magisk is removed by the ota (when decrypted it would run some scripts after the ota installed, this doesn't happen when the phone is still encrypted) Is there anyway to tell TWRP I want it to always decrypt the phone?

Edit: the feature was added in twrp 3.2.2)

Running Lineage 15.1 and magisk v18.0 on a op3t

  • Possible duplicate: android.stackexchange.com/a/189716/116800 – Bo Lawson Jan 23 at 20:39
  • Not a duplicate, that question was asked in Jan 18, the version of twrp which installs otas without decryption was only released in July 18 (version 3.2.2) – Max Jan 24 at 9:35
  • I understand that's why possible. The command line interface is still same decrypt password : decrypt /data with provided password. Password could be numeric, alphanumeric. Pattern: Use the table bellow to determine what your password will be: 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 : ; < = > ? @ 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I Example: if your pattern is a "U" shape in the middle of the 5x5, enter twrp decrypt '7<ABC>9' in the terminal or ADB shell. Note that characters ;<>? are special to the shell and require backslash escaping or single quotes around the string – Bo Lawson Jan 24 at 13:21
  • That's not the question though, OTAs install fine automatically and just hitting the mount button prompts for a password if I'm installing manually so that's ok, I'm asking if there's a way to tell twrp 3.2.2 + to promote for the password during the automatic installs so the magisk post update scripts can run (or equally a way to move magisk somewhere it can run without requiring decrypt) – Max Jan 24 at 14:18
0

There doesn't currently seem to be a way to tell TWRP to decrypt /data before an OTA. As you've said, this prevents the Magisk addon.d script to work, since the main part of that script itself resides in the /data partition. (But it also seems to require other things from the /data partition, so we can't just move it).

Here's a workaround:

Since you're on LineageOS, you can install your OTA update manually in TWRP, after decrypting. First download (not install) the OTA in the LineageOS updater. Then reboot to recovery manually and select the OTA zip from /data/lineageos_updates.

It's a bit more cumbersome than automatic-recovery-OTA, but at least it doesn't require adb or manually downloading the zip to your internal storage, where it is writable by any app with Storage permission...

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.