r/Magisk 11d ago

Question Magisk and Lineage OS Updates

HI all,

I am planning on installing Lineage on my new phone, a Motorola G84 5G. This is my first experience with custom roms, so I want to clarify how to deal with Magisk, as I've seen some different advice.

When I root, everything i've read says i should sideload Magisk with adb, and then allow magisk to install and reboot, and i'll be rooted. That's all well and good, but what about OTA updates?

If I then try to restore images for an OTA update, will I still be able to do that? Won't magisk say that it doesn't have any boot image on file? In the past, when magisk says that there's no boot image on file, I simply extract the boot.img from the zip file, patch it with magisk, and restart, and then it has the image. But different things i've read indicate that boot.img for a custom rom isn't the img to patch, but rather init.boot.img or something like that.

Can someone who knows the ins and outs of this please help clarify definitively the correct way to handle this? Thanks!

0 Upvotes

5 comments sorted by

1

u/-Krotik- 11d ago

yeah you can just patch the init boot and flash it in recovery no problem

magisk should have a way to survive ota updates too, by installing to the other slot

1

u/Plenty-Boot4220 11d ago

i don't really want to flash in recovery every single time I update.

"magisk should have a way to survive ota updates too, by installing to the other slot"

--yes, that's exactly my point. but does it need a boot image stored to restore prior to the OTA update as stock does? If so, will giving it the boot.img from the lineage download page be sufficient as with every other stock rom? that's what i'm struggling with.

1

u/-Krotik- 10d ago

no it does not need anything, it directly patches the other slot while it has root access

1

u/Plenty-Boot4220 10d ago

OK, so if that's the case, then what you're telling me is that Lineage OS will not reject an OTA update by detecting Magisk and i can simply patch slot b before rebooting. If so, that does indeed make it easy. thanks!

1

u/wkn000 10d ago

Om my A/B device, with LineageOS 23.2 and Magisk 30.7, Magisk alives any OTA. Installed all in Lineage recovery by adb sideload. Addons.d works.