DFRoot Headless is an automated, headless fork of DFRoot leveraging the DirtyFrag vulnerability (CVE-2026-43284).
This fork completely eliminates the need for any on-device GUI interaction or installed SU Manager app (such as KernelSU / KernelSU-Next APK). It operates as a silent Headless Foreground Service orchestrated entirely from your PC via ADB, granting instantaneous su root access to ADB shell (UID 2000).
- Headless Worker Architecture: All Activities, Settings screens, and launchers have been stripped. DFRoot runs as an exported Android Foreground Service (
df.root.headless.RootService). - No Manager App Required: You do not need to install KernelSU or KernelSU-Next APK on your device. The service dynamically extracts
libksud.sofrom a local APK or downloads the official release directly from GitHub in memory. - Immediate Shell Root (
--allow-shell): Patches the userspace bootstrap to launchksud late-loadwith--allow-shell, allowingadb shellto executesuwithout requiring a GUI grant dialog. - Kernel Vermagic & Safety Audit: Features an embedded ELF64
.modinfoparser inbootstrap.cthat validates kernel module vermagic againstuname -rprior to execution, preventing kernel panic/bootloops. - Interactive 1-Click PC Tool (
tools/adb_headless_root.py):- Auto-Build: Detects missing APK and automatically compiles it using local Gradle wrapper.
- Interactive Device Selector: Multi-device selection with arrow keys (
Up/Down/Enter). - Pre-flight Audit: Inspects Manufacturer, Model, Android Version, CPU ABI, and Linux Kernel compatibility.
- Live Logcat Streaming: Real-time log trace with instant error diagnostics (no hanging/timeouts).
- Automated Verification & Cleanup: Verifies
su -c idand cleans up temporary files on the device.
- Target Architecture:
arm64-v8aonly (AArch64). - Target Android Versions: Android 12 through Android 17 (API 31 - 36).
- Vulnerable Linux Kernels: 5.10, 5.15, 6.1, 6.6, 6.12, 6.18.
- Python 3.8+
- Android SDK Platform-Tools (
adbadded to PATH) - Connected Android device with USB Debugging enabled
Open terminal in the project directory and run:
# Windows
python .\tools\adb_headless_root.py
# Linux / macOS
python3 tools/adb_headless_root.pyThe script will:
- Detect connected devices (presents an interactive menu if multiple devices are attached).
- Audit device specs (Manufacturer, Kernel, Android OS, ABI).
- Auto-compile
DFRoot_4.8-headless.apkif not already built. - Push and install the headless package.
- Trigger
RootServicevia ADB and stream the exploit execution logcat in real-time. - Verify root privileges (
su -c id) and clean up the temporary APK.
usage: adb_headless_root.py [-h] [-s SERIAL] [-y] [--apk APK] [--ksu-apk KSU_APK] [--no-cleanup]
options:
-h, --help Show this help message and exit
-s, --serial SERIAL Target specific device serial
-y, --yes Auto-confirm compatibility warnings (non-interactive mode)
--apk APK Path to custom DFRoot APK (built automatically if omitted)
--ksu-apk KSU_APK Path to local KernelSU-Next APK (auto-downloaded from GitHub if omitted)
--no-cleanup Keep DFRoot APK installed on device after success
If you prefer executing steps manually:
# 1. Build the APK (if not already compiled)
./gradlew :app:assembleDebug
# 2. Push KernelSU-Next APK (optional, service can download automatically)
adb push ksu.apk /data/local/tmp/ksu.apk
adb shell chmod 666 /data/local/tmp/ksu.apk
# 3. Install DFRoot Headless APK
adb install -r -g app/build/outputs/apk/debug/DFRoot_4.8-headless.apk
# 4. Trigger Headless RootService
adb shell am start-foreground-service -n df.root/df.root.headless.RootService
# 5. Monitor real-time logs
adb logcat -s DFRoot_Headless dfroot
# 6. Verify root
adb shell su -c idTo compile the headless APK manually on your workstation:
# Windows
.\gradlew.bat :app:assembleDebug
# Linux / macOS
./gradlew :app:assembleDebugBuilt APK will be located at:
app/build/outputs/apk/debug/DFRoot_4.8-headless.apk
- Original DFRoot Project: diabl0w/DFRoot
- KernelSU-Next: KernelSU-Next/KernelSU-Next
- DirtyFrag Vulnerability (CVE-2026-43284) PoC: lsposed/lspromise & V4bel/dirtyfrag
- SELinux Permissive kernel modules: polygraphene/DFReroot