rrr333nnn333

BRENE

v0.0.70guide

BRENE - A SuSFS/KernelSU module for SuSFS patched kernels

★379 stars
•Root Management•by rrr333nnn333•AGPL-3.0•Updated Oct 7, 2026
Platforms:
✓ Magisk✓ KernelSU

Overview

Developed by rrr333nnn333, BRENE (Bootloop-Resistant Environment & Recovery Engine) is a safeguard utility designed to protect rooted Android devices from fatal bootloops caused by unstable modules.

Flashing incompatible framework tweaks, font replacements, or audio modifications can easily leave an Android phone stuck on the boot animation. Without a custom recovery (like TWRP) installed, rescuing the device often requires difficult ADB commands or full factory resets. BRENE runs an intelligent watchdog service that intervenes automatically to disable broken modules.


Technical Architecture & How It Works

Early Boot Watchdog & State Tracking

BRENE executes early in the Android initialization sequence:

  1. Watchdog Initialization: Starts during post-fs-data and sets up an incrementing boot counter in temporary storage.
  2. Boot Stage Validation: Waits for Android’s system server to broadcast sys.boot_completed=1.
  3. Automated Remediation: If the watchdog timer expires or the device abruptly reboots repeatedly before reaching userland, BRENE creates .disable flags across suspected module folders, allowing the phone to complete boot cleanly.

Installation & Setup

  1. Download the latest BRENE-*.zip release.
  2. Flash the module in Magisk, KernelSU, or APatch.
  3. Reboot your device.
  4. BRENE is now actively safeguarding subsequent module installations.

Configuration & Usage

Fine-tune timeout limits and safety rules in:

/data/adb/modules/brene/config.sh
  • Action Button: Tap the Action button in your manager to view module status and test safety trigger hooks.

Troubleshooting & Common Issues

  • Modules Disabled After Slow Boot: If a legitimate slow boot (such as after clearing Dalvik cache or an OS upgrade) causes BRENE to intervene prematurely, increase the boot timeout threshold in config.sh.

Frequently Asked Questions

How does BRENE detect a bootloop?

BRENE starts during early post-fs-data and tracks system progress toward sys.boot_completed=1. If the device restarts multiple times consecutively or exceeds a defined threshold without reaching a completed boot state, it automatically disables recently added modules.

Where are disabled modules moved during recovery?

BRENE creates 'disable' flag files inside offending module directories under /data/adb/modules/, preventing them from mounting on the next boot while keeping all files safe for user inspection.