Root & Filesystem Frameworks
Relevant source files
The following files were used as context for generating this wiki page:
Root and Filesystem Frameworks encompass the suite of automated patching tools within KernelForge used to integrate administrative access and security-evasion mechanisms into Android kernel source code. These frameworks enable developers to inject KernelSU for root management, SUSFS for filesystem hiding, and NoMount patches to bypass mounting-based detection.
The system orchestrates the selection, configuration, and integration of these modules during the kernel compilation process. By automating the application of these hooks to specific kernel files (such as fs/namespace.c), the application ensures compatibility between the target device's Kernel Module Interface (KMI) and the chosen security frameworks.
Root Integration: KernelSU
KernelSU provides kernel-level root access through automated patching of the kernel source. The application supports multiple variants of this framework to accommodate different stability and feature requirements.
KernelSU Variants
The system allows you to select between official and experimental implementations:
- Official KernelSU: Provides stable, kernel-level root access.
- KernelSU-Next: Offers enhanced features and experimental patches.
- GKI Variant: Specifically targets Generic Kernel Image compatibility.
Sources: src/app/page.tsx:64, src/app/page.tsx:93-96, src/app/page.tsx:431-447
Implementation Logic
The build engine logs the application of these patches based on the selected variant and target KMI version. During the build process, the system verifies the integration success before proceeding to driver compilation.
Filesystem Hiding: SUSFS
SUSFS (Simple UserSpace FileSystem) serves as an advanced filesystem hiding framework. It prevents unauthorized applications or system integrity checks from detecting modified files and directories within the Android environment.
Configuration Parameters
You configure SUSFS by specifying a repository branch, ensuring the patches align with the kernel source version.
| Parameter | Type | Description |
|---|---|---|
susfs | boolean | Enables or disables SUSFS integration. |
susfsBranch | string | The specific version/branch of SUSFS patches (e.g., v1.5.x). |
Sources: src/app/page.tsx:66-67, src/app/page.tsx:463-472
Stealth Mechanisms: NoMount
The NoMount framework, developed by maxsteeel, implements hooks within the kernel's filesystem namespace to prevent detection. It modifies fs/namespace.c to intercept and hide specific mounting behaviors that are commonly used by security suites to identify rooted or modified environments.
Technical Hooking Process
When active, the build process specifically targets filesystem namespace source files for patching:
- Locate
fs/namespace.cwithin the project path. - Inject NoMount hooks to prevent mounting detection.
- Verify hook placement during the compilation phase.
Sources: src/app/page.tsx:68, src/app/page.tsx:103-105, src/app/page.tsx:173-175
AI-Powered Troubleshooting
The AI Troubleshooter module analyzes build logs to identify failures related to these frameworks. It specifically scans for KMI/GKI compatibility issues, failed patch hooks, and missing dependencies that often occur when integrating KernelSU or SUSFS.
Analysis Flow
- Log Capture: The
KernelLogscomponent captures real-time output from the compilation terminal. - AI Analysis: The
AITroubleshootersends the log text to theaiBuildTroubleshootingAssistant. - Reporting: The system returns a summary, identified errors (e.g., failed patch application), and suggested solutions.
Sources: src/app/page.tsx:489-493, src/components/dashboard/AITroubleshooter.tsx:21-31, README.md:15-17
Summary
The Root & Filesystem Frameworks in KernelForge automate the complex process of securing and stealthily modifying Android kernels. By integrating KernelSU, SUSFS, and NoMount patches through a unified dashboard, the application reduces the manual overhead of patching kernel source files like fs/namespace.c. The inclusion of an AI-powered troubleshooter further assists developers in resolving integration conflicts between these frameworks and specific device KMI versions.