Hybrid Mount is a mount logic metamodule implementation for KernelSU and APatch. It manages module file integration into the Android system using a combination of OverlayFS and bind mounts (Magic Mount).
The project includes a WebUI dashboard for module management and configuration.
The core binary (meta-hybrid) determines the mounting method for each module directory based on configuration and system compatibility:
- OverlayFS: Uses the kernel's OverlayFS to merge module directories with system partitions. This is the default strategy for supported filesystems.
- Magic Mount: Uses recursive bind mounts to mirror modified file structures. This serves as a fallback strategy when OverlayFS is unavailable or fails.
- Conflict Detection: Scans module file paths to identify collisions where multiple modules modify the same file.
- Module Isolation: Supports mounting modules in isolated namespaces.
- Configurable Strategies: Users can force specific partitions or modules to use OverlayFS or Magic Mount via
config.toml. - Recovery Protocol: Includes a mechanism to restore default configurations in case of boot failures caused by invalid settings.
Configuration is stored at /data/adb/meta-hybrid/config.toml.
| Parameter | Type | Default | Description |
|---|---|---|---|
moduledir |
string | /data/adb/modules/ |
Path to the module source directory. |
mountsource |
string | Auto-detect | Mount source label (e.g., KSU, APatch). |
partitions |
list | [] |
List of partitions to explicitly manage. |
overlay_mode |
string | tmpfs |
Backend for loop devices (tmpfs, ext4, erofs). |
disable_umount |
bool | false |
If true, skips unmounting the original source (debug usage). |
backup |
object | {} |
Settings for boot snapshot retention. |
The project provides a web-based interface built with SolidJS.
- Status: View current storage usage and kernel version.
- Management: Toggle mount modes per module.
The project uses xtask for build automation.
- Rust: Nightly toolchain.
- Android NDK: r27 or newer.
- Node.js: v20+ (Required for WebUI compilation).
-
Full Build (Binary + WebUI):
cargo run -p xtask -- build --release
Output will be generated in the
output/directory. -
Binary Only:
cargo run -p xtask -- build --release --skip-webui
This project is licensed under the GPL-3.0 License.