If the error persists after flashing stock, use the official Magisk Uninstaller (often the renamed Magisk.apk to uninstall.zip or the internal "Uninstall" button) to clear old binaries. : Open the latest Magisk App. Select Install > Select and Patch a File .
Choose your stock boot.img (or init_boot.img for newer Android 13+ devices). : Boot Image Extra Was Patched By Old Unsupported Magisk
If you previously used a very old Magisk version (say, v16 or v17) and never fully uninstalled it before upgrading, your boot image retains legacy signatures and patches in the "extra" area. The new Magisk refuses to overwrite these because doing so could lead to boot loops or corruption of device-specific OEM data stored in that section. If the error persists after flashing stock, use
fastboot boot twrp.img # or any custom recovery # In recovery, check /proc/self/mounts for "magisk" adb shell "magisk -c" # Should fail if clean Choose your stock boot
You must have the original boot.img file for your exact device and ROM version. Download it from your manufacturer's firmware page or XDA Developers forums.