Every time I update LineageOS, I lose root access and need to patch the new boot image with Magisk again.
Install Magisk APK:
https://github.com/topjohnwu/Magisk/releases/latest
More details:
https://topjohnwu.github.io/Magisk/install.html
For POCO F3 (alioth) using LineageOS for microG:
https://download.lineage.microg.org/alioth/
Follow these steps:
- Check the LineageOS build installed on the phone:
adb shell getprop ro.lineage.build.version
adb shell getprop ro.build.date.utc
adb shell getprop ro.build.fingerprint
- Download the
boot.imgfrom the same build installed on the phone.
For example:
lineage-23.2-20261002-microG-alioth-boot.img
Older versions of this guide used recovery.img, but current alioth builds provide a separate boot.img, which is the image used here.
Do not use vendor_boot.img, dtbo.img or vbmeta.img for this procedure.
- Copy the image to the phone:
adb push lineage-23.2-20261002-microG-alioth-boot.img \
/sdcard/Download/boot.img
Open Magisk and select Install.
Select Select and Patch a File and choose:
/sdcard/Download/boot.img
Click LET'S GO and wait until Magisk finishes.
Check the generated filename:
adb shell ls -lh /sdcard/Download/magisk_patched*
- Copy the patched image back to the computer:
adb pull /sdcard/Download/magisk_patched-[random-string].img \
~/patchedboot.img
- Reboot the phone into the bootloader:
adb reboot bootloader
- Check that fastboot can see the device:
fastboot devices
- Flash the patched image:
fastboot flash boot ~/patchedboot.img
- Reboot:
fastboot reboot
After the phone starts, open Magisk and check that root access is working again.
Important: always use the boot.img from the exact same LineageOS build installed on the phone. Do not reuse a boot image from an older build.
Top comments (0)