Magisk-Modules-Alt-Repo

YetAnotherBootloopProtector

v8.138-6537c16guide

A Magisk Module to monitor and fix potential Bootloops and SystemUI failures.

★192 stars
•Root Management•by Magisk-Modules-Alt-Repo•Proprietary•Updated Apr 7, 2026
Platforms:
✓ Magisk
Download v8.138-6537c16Starting download...GitHub Source
YetAnotherBootloopProtector-138-v8.138-6537c16.zip

Overview

Yet Another Bootloop Protector (YABP), developed by rhythmcache (triple_fault), is an automated watchdog module designed to protect rooted Android devices against bootloops, boot animation freezes, and SystemUI crashes caused by problematic Magisk, KernelSU, or APatch modules.

When modifying Android system components, incompatible SELinux rules, framework overlays, or vendor props can cause the operating system to stall during boot or crash in a loop. YABP acts as an automated safety net: it tracks boot completion state machines, enforces a maximum allowable boot duration, and automatically neutralizes rogue modules and scripts if the system cannot reach a stable interactive desktop.

Prerequisites & Compatibility

  • Root Environments: Magisk, KernelSU, and APatch.
  • Custom Recoveries: Compatible with TWRP, OrangeFox, and PBRP for emergency rescue flashing.
  • Device Support: Universal architecture compatibility across ARM, ARM64, and x86 devices.

There are no documented module conflicts.

How YABP Works

1. Progressive Marker Mechanics

  • At each boot startup, YABP checks for existing marker files in its working directory.
  • If the previous boot did not reach the boot_completed stage, a marker file is recorded.
  • If three markers accumulate (marker1, marker2, marker3), YABP declares a confirmed bootloop:
    • It creates a disable flag in every installed module directory in /data/adb/modules/.
    • It strips executable permissions from all custom scripts in /data/adb/service.d/, /data/adb/post-fs-data.d/, /data/adb/post-mount.d/, and /data/adb/boot-completed.d/ (chmod 644).
    • It triggers a clean reboot so the device can boot into Android without third-party interference.

2. Boot Completion Timeout

YABP checks system status every 5 seconds. If Android does not broadcast sys.boot_completed=1 within 2 minutes (120 seconds), YABP assumes the device is hung on the boot animation, executes the disarm routine, and reboots.

3. Optional SystemUI Crash Monitor

During module installation, users can enable the SystemUI Monitor. This watchdog checks the status of com.android.systemui every 5 seconds. If SystemUI remains crashed or inactive for more than 25 seconds, YABP neutralizes active modules to recover the display.

  • To disable the monitor:
    su -c touch /data/adb/systemui.monitor.disable
  • To re-enable the monitor:
    su -c rm -f /data/adb/systemui.monitor.disable

4. Recovery Rescue Flashing

If a device is stuck in recovery and you cannot access a shell, simply flashing YetAnotherBootloopProtector-*.zip in TWRP immediately disarms all modules and restores standard script permissions without requiring terminal commands.

Configuration & Whitelists

To prevent mission-critical security or diagnostic modules from being disabled during automated recovery, add their IDs to:

  • Allowed Modules: /data/adb/YABP/allowed-modules.txt
  • Allowed Scripts: /data/adb/YABP/allowed-scripts.txt

Runtime execution logs are written to:

/data/local/tmp/service.log

Troubleshooting & Limitations

  • Kernel-Level Hangs: If a custom kernel panics before the filesystem is mounted or during early init, YABP cannot run. Such kernel panics require fastboot kernel reflashing.
  • Direct System Partition Modifications: YABP guards against systemless modules; it cannot repair destructive modifications made directly to physical /system or /vendor partitions.