PhoenixBoot

Magisk KSU APatch

PhoenixBoot is an automatic fail-safe module designed to protect your device from unexpected bootloops. It works by automatically backing up your boot partition before risky operations and safely restoring it if a successful system boot is not detected.

Ultimate Bootloop Protection

Never fear flashing a bad module again. PhoenixBoot operates silently in the background to ensure your device always recovers safely without user intervention.

Auto-Restore

Automatically detects failures and flashes back the original, verified boot image using a 15-minute watchdog timer.

Universal Support

Seamlessly works on both modern A/B partition slots and legacy single-slot devices. Works out-of-the-box with Magisk, KernelSU, and APatch.

Integrity Checks

Ensures that corrupted backups are never flashed. It strictly verifies the SHA1 hash of the boot image before any restoration attempt.

Under the Hood: How It Survives

Upon installation, PhoenixBoot unpacks your boot image and injects panic=5 into the kernel command line. This crucial instruction forces the Linux kernel to automatically reboot after 5 seconds instead of freezing on a black screen when a fatal crash occurs.

During the boot sequence, a robust script checks for the sys.boot_completed property every 10 seconds for up to 15 minutes. If a successful boot is detected, the module cleans up all background processes and deletes the backup. If the 15-minute timeframe passes without a successful boot (indicating a bootloop), the script safely restores the original boot partition using dd, uninstalls itself, and reboots the device safely to recovery mode.

# Conceptual logic path for Bootloop Recovery
magiskboot unpack -h # Extracts boot image
inject "panic=5" into kernel cmdline
# On every system boot
if (sys.boot_completed == 1):
clean_backup()
else if (time_elapsed >= 15_minutes):
restore_backup_via_dd()
reboot_to_recovery()

Frequently Asked Questions

Unlike traditional safe mode options that rely on precise physical button presses during boot, PhoenixBoot operates entirely automatically. The combination of kernel parameter injection and a 15-minute watchdog timer ensures zero user intervention is required to recover from a bad flash.

No, it features self-cleaning capabilities. Once the Android system reports a successful boot, PhoenixBoot immediately terminates its monitoring script and leaves no permanent background processes running during your session.

The original boot image is automatically exported and safely stored in your internal storage at /sdcard/PhoenixBoot_Backup/ during installation.

Module Info

  • Version v1.4
  • Module By
    Lysine000
  • Contributors Lysine000
  • Source Code View Repository
  • Tags
    #PhoenixBoot #Bootloop Protection #Rescue #Fail-safe #Magisk Module #KernelSU #APatch
  • Requirement
    Magisk KernelSU APatch
  • Latest Update