Ileska Tutorials

Reddit user mashuptwice stated that this is old method and it is no more recommended you should use patch boot.img method https://www.reddit.com/r/Magisk/comments/t851yw/help_magisk_gone_after_lineageos_update/hzlvecc/ I try to make tutorial for that

LigeageOS regain root priviledges

This tutorial is made to especially to linux computers, but will work on other operating systems with little modifications to commands.

I updated my LineageOS fajita (oneplus 6t) mircog phone and lost my magisk root. And I managed to regain my root without factoryresetting my phone thanks to guide in krispitech.com and forum post from xda-developers [1][2].

Here is a shorted quide how I did it:

Step 0 (Update):

Update your LineageOS phone. Most likely you have already done this.

Step 1 (Set up adb):

Set up `adb` on your computer. [3][4]

Step 2 (Dowload zip):

Download Magisk APK from github [5]. Rename the APK from Magisk-[version].apk to Magisk-[version].zip.

Step 3 (Reboot to recovery):

Reboot your phone to LineageOS recovery. It can be done by holdin down power button, then pressing `power` -> `reboot` -> `Recovery`

Step 4 (Connect phone to computer):

Connect your phone to your computer with usb cable and disable all trouble making software (like `usbguard`) on your computer.

Step 5 (Sideload your Magisk-[version].zip):

When you have booted to recovery press `Apply update` -> `Apply from adb`. At bottom of your screen is tutorial, but I will go through the step's in this tutorial also. On your computer (in same folder as Magisk-[version].zip) run command `adb sideload Magisk-[version].zip`. Most likely on your phone you will see popup saying warning but simply say yes. When it says `Done` your install is done and you can go back to your phone's real OS

Step 6 (Celebrate):

It's time to celebrate you have successfully regain your super user privilges on LineageOS.


Sources:

  1. https://krispitech.com/update-lineageos-magisk-regain-root/ read 23.02.2022
  2. https://forum.xda-developers.com/t/how-to-install-magisk-on-lineageos-18-1.4278285/ read 23.02.2022
  3. https://www.xda-developers.com/install-adb-windows-macos-linux/ read 23.02.2022
  4. https://wiki.archlinux.org/title/Adb read 23.02.2022
  5. https://github.com/topjohnwu/Magisk/releases/download/v24.1/stub-release.apk read 23.02.2022