Magisk: Keep rooted after Lineage upgrade

Created on 16 Apr 2017  路  9Comments  路  Source: topjohnwu/Magisk

Is it possible with magisk, like SuperSU, to patch the system not to be forced to flash the magisk zip again after upgrading Lineage?

All 9 comments

@matlink Maybe

Yes it is. Kinda

'Yes it is' and 'Kinda'. Can't be more precise :D

Yes sorry I wanted to test it before going more into detail. Inspired by @osm0sis flashafterupdate script I made an addon.d script that flashes the latest Magisk installer zip located in /sdcard/MagiskManager/ whenever an system update gets installed.
Here I made a zip to flash in recovery:
Magisk OTA persistence-v1.zip
Actually I think it would be great if similar functionally would be implemented in Magisk by default. @topjohnwu

You could also just direct Magisk Manager to download the zip to /sdcard/FlashAfterUpdate and cut out the middle man. :)

I would really love for this to be a feature natively added to magisk!

Edit: Tested the script. I can use the official Lineage OS updater now! No need for a third party app to auto flash Magisk want update.

Good news:
An excellent addon.d solution has been implemented with the latest Magisk [BETA] v13.0(54e6a79). So from here on Magisk will survive updates by default (as long as the rom supports addon.d scripts of course).
@matlink issue can be closed.
@topjohnwu thanks for your amazing work!

Thanks a lot!

I'll try that !

Was this page helpful?
0 / 5 - 0 ratings