Telegram

HOW TO DO MONTHLY UPDATES?

How to do monthly updates?

We understand the critical importance of maintaining a secure and stable operating environment, particularly for enthusiasts running custom ROMs like LineageOS. The process of applying monthly security patches and incremental version updates, such as moving from LineageOS 23 to 23.1, requires a methodical approach to preserve system integrity and root access. For users managing a device rooted with Magisk, the standard “Over-The-Air” (OTA) update mechanism found in standard Android builds cannot be applied blindly. We will provide a comprehensive guide on how to perform these updates correctly, ensuring that your Magisk modules and system modifications remain intact.

Understanding the LineageOS Update Ecosystem

Before initiating any update procedure, it is essential to understand how LineageOS manages updates for devices with unlocked bootloaders and custom recoveries.

Incremental vs. Full Updates

LineageOS updates generally fall into two categories: incremental and full updates.

The OTA Updater Limitation

The built-in LineageOS updater downloads the update package and places it in the /data/ partition. On a rooted device, the standard “Install” button attempts to apply the update using the Android system’s built-in updater, which cannot retain root access. Consequently, attempting to update through the standard UI without preparation will result in a loss of root and may trigger a boot loop if Magisk modifications were significant.

The Correct Workflow: Avert Boot Loops and Root Loss

To perform a monthly update without compromising your device’s stability, we must bypass the standard system updater and utilize the custom recovery environment. This ensures that the update is applied to the system partition while actively preserving the boot image, which is essential for Magisk.

Prerequisites for a Safe Update

Before proceeding, ensure the following conditions are met:

  1. Battery Level: Ensure your device has at least 60% battery charge to prevent power loss during the flashing process.
  2. Backup: We strongly advise creating a full backup of your current working setup in TWRP or your chosen custom recovery. This includes a backup of the Boot, System, and Data partitions.
  3. Magisk Installation: Confirm that Magisk is currently installed and working.
  4. Download the Correct File: Download the full update ZIP file for your specific device model from the official LineageOS download page. Do not rely solely on the OTA prompt; manually verify the file checksum to ensure data integrity.

Step-by-Step Guide: Performing the Update via Recovery

This is the method we recommend for users who value stability and root retention over convenience.

Step 1: Download the Update Package

Navigate to the LineageOS download page for your specific device codename. Locate the latest build (e.g., LineageOS 23.1). Download the full zip file. Save it to your device’s internal storage or an external SD card if available. Verify the MD5 checksum if provided to ensure the file is not corrupted during download.

Step 2: Boot into Custom Recovery

Power off your device completely. Once off, boot into recovery mode. This is typically done by holding the Volume Up + Power buttons simultaneously until the manufacturer logo appears, then releasing. You should see the interface of your custom recovery (e.g., TWRP, OrangeFox).

Step 3: Create a Backup (Safety First)

If you have not backed up recently, select the Backup option in your recovery. Select the partitions Boot, System, Data, and Vendor (if applicable). Swipe to perform the backup. This creates a safety net; if the update fails, you can restore this backup and return to the exact previous state.

Step 4: Flashing the LineageOS Update

  1. Select Install in the recovery menu.
  2. Navigate to the directory where you saved the LineageOS 23.1 zip file.
  3. Tap on the file.
  4. Important: Do not swipe to flash immediately. Look for the “Reboot to another slot” option if your device uses A/B partitioning (common on newer devices). If your recovery supports it, flashing to the inactive slot is the cleanest method.
  5. Swipe to confirm the flash.
  6. Wait for the process to complete. Do not interrupt the device during this phase.

Step 5: Flashing Magisk (The Critical Step)

This is the most important step for rooting enthusiasts. Do not reboot your system yet. If you reboot now, you will boot into LineageOS 23.1 with a temporary root or no root at all, as the active boot image has been overwritten by the stock LineageOS boot image.

  1. Go back to the main menu and select Install again.
  2. Navigate to the location where you saved the Magisk APK or the Magisk ZIP (renamed from .apk to .zip). We recommend using the Magisk app to “Install to Inactive Slot (After OTA)” if you updated via the OTA prompt, but in manual recovery flashing, you simply flash the Magisk package immediately after the ROM.
  3. Select the Magisk package.
  4. Swipe to flash.
  5. Once Magisk is successfully installed, you can now reboot to the system.

Handling the “Update Available” Notification in Settings

After updating to the new version, the LineageOS updater might still show an “Update Available” notification for the version you just installed. This often happens because the updater checks the build date or version string in a specific file that might not have been updated correctly during the manual flash.

How to Clear the Stale OTA Notification

We can resolve this by updating the updater app’s local metadata.

  1. Open the LineageOS Updater app.
  2. Tap the menu icon (three dots) and select Refresh.
  3. If the update persists, you may need to clear the cache of the Updater app via Settings > Apps > LineageOS Updater > Storage > Clear Cache.
  4. In rare cases, you may need to manually update the lineageos updater app via the Magisk Modules Repository, specifically if the issue persists due to a known bug in the build script.

Advanced Method: Updating via Magisk (Retention Method)

For users who prefer a slightly more automated approach, Magisk offers a method to preserve root during an OTA update without flashing the ROM manually in recovery.

The “Install to Inactive Slot” Feature

  1. Open the Magisk App.
  2. Tap Install next to the Magisk version.
  3. Select Install to Inactive Slot (After OTA).
  4. This patches the inactive slot’s boot image with Magisk.
  5. Now, reboot to recovery and flash the LineageOS update ZIP to the inactive slot (or use the LineageOS updater if it allows flashing via recovery).
  6. Reboot the system. The device will switch to the updated slot, which already has the Magisk-patched boot image.

Note: This method is device-specific and depends on your kernel supporting A/B partition switching. Not all custom ROM kernels support this seamlessly.

Troubleshooting Common Issues After Updating

Even with careful execution, issues may arise. Here is how we address the most common problems:

Boot Loop After Flashing

If the device gets stuck in a boot loop:

  1. Reboot into recovery.
  2. Wipe Cache and Dalvik Cache. (Note: On modern Android versions, Dalvik cache is part of the ART cache, but wiping cache is still recommended).
  3. If the loop persists, restore the backup you created in Step 3.
  4. Check if the LineageOS version you flashed is compatible with your current firmware (vendor firmware). Mismatched firmware versions often cause boot failures on Xiaomi and other devices.

Magisk Modules Causing Issues

After updating, some Magisk modules may become incompatible with the new system version.

  1. Boot into the system (even if rooted).
  2. Open the Magisk App.
  3. Go to the Modules section.
  4. Disable all modules and reboot.
  5. If the system is stable, enable modules one by one to identify the culprit.
  6. You can find updated or alternative modules in the Magisk Module Repository hosted on our site. Ensure you check the module description for compatibility with Android 14/LineageOS 23.

“Device is Corrupted” Warning

This is a common scare message on Xiaomi devices and some others. It usually refers to the vbmeta partition. If you encounter this:

  1. Reboot into fastboot mode.
  2. Flash vbmeta with verification disabled (if applicable to your device). fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
  3. Reboot and check if the warning disappears.

Managing Magisk Modules During Updates

We operate the Magisk Modules Repository at https://magiskmodule.gitlab.io/magisk-modules-repo/. When performing monthly updates, module compatibility is a primary concern.

Module Compatibility Checks

Before updating your ROM:

  1. Check the module.prop file of your installed modules (found in /data/adb/modules/<module_name>/).
  2. Look for minApi and maxApi lines. Ensure your target API (e.g., Android 14 corresponds to API level 34) falls within the supported range.
  3. If a module is outdated, search our repository for an updated version or an alternative.

Updating Modules

After you have successfully updated LineageOS and re-rooted with Magisk:

  1. Open the Magisk App.
  2. Navigate to the Modules tab.
  3. Tap Check for Updates.
  4. If updates are available, update them one by one.
  5. Reboot after updating all modules.

Why Manual Flashing is Superior for Custom ROM Users

While the convenience of the standard OTA updater is appealing, the manual flashing method offers distinct advantages for the power user:

Conclusion

Updating monthly is a non-negotiable aspect of Android maintenance, particularly when using custom ROMs like LineageOS. While the “good old days” of purely manual flashing are evolving, the principles remain the same for rooted users. We recommend always flashing the update zip via custom recovery, followed immediately by the Magisk zip. This approach guarantees the highest success rate and the least amount of downtime.

By following this structured workflow, you ensure that your device remains secure, stable, and fully rooted, ready to utilize the full potential of the Magisk ecosystem and the extensive modules available in our repository. Always prioritize backups and verify file integrity before proceeding.

Explore More
Redirecting in 20 seconds...