Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions how to fix: LineageOS OTA update wipes out magisk if /data is encrypted #1501

Closed
TjrGithub opened this issue May 24, 2019 · 2 comments

Comments

@TjrGithub
Copy link

TjrGithub commented May 24, 2019

(New issue because I cannot reopen #1500)

The LineageOS OTA update uninstalls Magisk, and here are four ideas how Magisk can fix that:

  • The Magisk addon.d script could look at the external SD card, which usually isn't encrypted.
  • You could store the .zip in the same place as the addon.d, so that OpenRecoveryScript copies it over. If need be, it can even be stored inside the addon.d script, as TWRP supports both here-docs and base64. (Perhaps store only the boot partition part of the zip.)
  • The addon.d script could look for the .zip in the recovery partition. It has 434 Megabytes of free space (size difference between Mido recovery parition and twrp image).
  • Magisk Manager could somehow ask the Lineage Updater app to trigger it, and unpack the flashable .zip into the same place as the OS update.

Just one idea needs to be workable. I'm sure there are lots of other possibilities.

The cause is that the OpenRecoveryScript does not decrypt the userdata partition. The Magisk addon.d-script then cannot find anything there and refuses to reflash Magisk.

The bug happens with the most recent versions
Magisk v19.2
Manager 7.2.0
lineage-15.1-20190515-microG-mido

@TjrGithub
Copy link
Author

If you want, I can even hack up a proof-of-concept with the here-document approach. But I'd like to hear your opinion first.

@topjohnwu
Copy link
Owner

There is no way to fix it. I have LineageOS devs in my Slack group, so there is no need for additional discussion on this issue. Magisk requires /data for addon.d, there is NO way around that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants