跳到主要内容
KernelSU 模块

Hybrid Mount

元模块 不可变 Release 已同步

Mix OverlayFS, Magic Mount, and VFS per module and path on KernelSU and APatch.

介绍

Hybrid Mount

AtomGit · GitHub · 简体中文 · Contributing

Hybrid Mount logo

Hybrid Mount is a hybrid mount meta-module for KernelSU and APatch. During boot, it scans other modules and selects OverlayFS, Magic Mount, VFS, or ignore for each entry according to global, module, and path rules. Module source directories are always treated as read-only input.

Features

  • OverlayFS, Magic Mount, and VFS can be mixed per module and per path.
  • Path rules take precedence over module defaults, and module defaults take precedence over the global default.
  • OverlayFS supports both tmpfs and ext4 storage modes.
  • For ext4 staging, KernelSU uses the official ioctl to hide sysfs nodes; APatch and other non-KSU environments use the bundled LKM compatibility fallback by default.
  • Magic Mount supports files, directories, symbolic links, .replace, and whiteout semantics.
  • VFS sends injection rules through the keyring to hybridmount or an existing compatible NoMount kernel provider. Releases ship the sources and a prebuilt aarch64 module per supported Android/GKI target, which the boot pipeline loads when the kernel does not already carry one; if that fails it falls back according to vfs_strict. VFS is not a real mount.
  • The WebUI provides MD3 (default) and Miuix interfaces.
  • arm64, armv7, x86_64, and riscv64 are supported; the installer automatically selects the matching binary. The riscv64 build requires the Android NDK r27 or newer.

Installation

Download the ZIP from Releases and install it with the KernelSU or APatch manager. On first installation, use the volume keys to select the default backend. Upgrades preserve /data/adb/hybrid-mount/config.toml.

Mounting runs after module post-fs-data.sh scripts: at post-mount on APatch and metamount on KernelSU.

Configuration

Default configuration:

moduledir = "/data/adb/modules"
overlay_mode = "ext4" # ext4 | tmpfs
disable_umount = false
default_mode = "overlay" # overlay | magic | vfs
extra_mount = []

[rules.example_module]
default_mode = "magic"

[rules.example_module.paths]
"system/etc/hosts" = "overlay"

Rule paths are relative to the module root. Module-level and path-level rules may also use ignore; the global default backend accepts overlay, magic, or vfs. vfs_strict = true makes startup fail when VFS is unavailable, and vfs_isolate_uids lists the UIDs that should see the native filesystem. The same file path cannot be assigned to more than one backend. Overlay and Magic, the two real mount backends, may share ordinary directories as structural nodes; VFS is a third injection path rather than a real mount. File, type, and .replace conflicts cause the startup planning stage to fail immediately. Configuration changes take effect after reboot.

This routing does not change the project's existing CONFIG_TMPFS_XATTR capability check. On KernelSU, installation removes the module's entire lkm/ directory and runtime uses only the official NukeExt4Sysfs ioctl. APatch and other non-KSU installations keep the LKM and try it by default after mounting ext4 staging. The bundled .ko files support aarch64 only. Automatic selection requires an exact kernel line and Android/GKI tag match; unknown combinations are rejected. Prebuilt LKMs must still be validated for ABI compatibility on the corresponding real device. If the device crashes during insmod, a persistent circuit-breaker marker prevents the LKM from loading again on the next boot while preserving the rest of Hybrid Mount. See module/lkm/README.md for the support matrix, checksums, sources, and licenses.

extra_mount = ["my_extra"] reads <module>/my_extra/ into /my_extra/. Each target must already be a directory, with no corresponding /system/my_extra entry (including a dangling symlink). Use single partition names, not paths; invalid entries are logged and skipped, and apex remains excluded. Modules without system/ work and still honor disable, remove, skip_mount, and the module blacklist. Existing built-in partition handling is preserved. Additional entries use the same backend and path rules, for example "my_extra/etc/file" = "magic". WebUI preserves this field when saving settings; edit it in config.toml and reboot to apply it.

Upgrades accept the retired partitions key in its former array or comma-separated string form. It is ignored without discarding other settings or rules, and omitted from WebUI responses and subsequent configuration saves. Use extra_mount for additional partition roots. Unknown keys and malformed values still cause boot configuration loading to fail.

VFS backend

Hybrid Mount can use built-in or loadable hybridmount, or an existing NoMount kernel provider that reports protocol 20 through 23. When NoMount is detected, the boot pipeline skips loading hybridmount. Hybrid Mount's path-only opaque directory rules (including .replace) require hybridmount.

How the provider is identified. The boot decision keys on a read-only probe of the kernel key type hybridmount: if it answers with a supported version, the provider is usable. Separately, vfs-doctor classifies how it is present — an entry in /proc/modules means a loadable module registered it, a /sys/module/hybridmount directory without that entry means it is compiled into the kernel image, and if neither exists then no provider is present. Probing is read-only, so status and vfs-doctor never trigger an insmod.

Boot logic. If the key type answers with a supported version, the provider is bound and nothing is loaded. On every boot, even when no rule selects VFS, if the probe is silent, the pipeline first tries the bundled module matching the kernel release's Android/GKI tag, then other builds for the same kernel major/minor line, probing after each attempt; still unavailable, every vfs rule degrades to ignore, or fails the boot when VFS is requested and vfs_strict = true. The load runs before the mount plan is built, because planning rewrites vfs rules to ignore while the provider is silent and the executor would then return early. A circuit-breaker marker is written before insmod and cleared when the attempt returns, so only a kernel crash leaves it behind; the next boot then refuses an automatic retry until the marker is removed by hand.

The loader tries ksud insmod, then the built-in hybrid-mount lkm-load fallback, then ordinary insmod. The built-in fallback resolves core-kernel symbols and can adapt vermagic in memory after an explicit kernel rejection. Android userspace no longer decides the VFS GKI target. These adaptations do not guarantee ABI compatibility; see module/vfs/README.md for details.

Integrating VFS into a kernel. Releases ship a prebuilt aarch64 module for every supported Android/GKI target and load it automatically, so those kernels need no integration step. Build it in when you want to avoid the insmod, or when your kernel line has no prebuilt. From the root of a kernel tree:

curl -LSs "https://raw.githubusercontent.com/Hybrid-Mount/meta-hybrid_mount/dev/module/vfs/setup.sh" | bash

--cleanup:

curl -LSs "https://raw.githubusercontent.com/Hybrid-Mount/meta-hybrid_mount/dev/module/vfs/setup.sh" | bash -s -- --cleanup

This copies the sources into fs/hybridmount/ and adds them to fs/Makefile and fs/Kconfig; enable CONFIG_HYBRIDMOUNT=y to build it in or =m to build it as a module. bash -s -- --cleanup reverts every change. A tree that already integrates NoMount is refused: both implementations hijack inode operations and the kernel will not stop them coexisting, since they register different key types.

The WebUI and manager description hide VFS options and counters when the provider does not respond. Saved VFS rules remain intact. A responding built-in provider is supported even without a /proc/modules entry.

Diagnosing. /data/adb/modules/hybrid_mount/hybrid-mount vfs-doctor reports the presence state, the version the key type answered, the supported versions, and why a provider is unusable when it is.

Runtime CLI. hybrid-mount vfs help lists rule and UID management, whiteout/opaque rules, diagnostics and explicit load. It supports NoMount-style aliases, readable text and --json. Clearing requires --yes; manual changes are runtime-only. See the VFS CLI reference.

Feedback

Before installation or reporting an issue, read the Usage Notice. Include the KernelSU/APatch bugreport, module version, and reproduction steps. Contact us through AtomGit Issues, GitHub Issues or the Telegram group.

Contributing

Code, documentation, translations and compatibility reports are welcome. See the contribution guide. Source branches and tags are synchronized from GitHub to AtomGit; release ZIPs remain available from GitHub Releases. Maintainers can find the setup and scope in the sync guide.

Languages

Acknowledgements

License

历史版本

6.2.6

最新

版本代码 602006999 v6.2.6

下载

v6.2.6

Features

  • vfs Support NoMount v23 and per-rule UID exclusions Refs #514

  • magic-mount Support upstream boot-time Lua hooks

Fixes

  • lkm Sync Mountify ext4 modules and support Android 17

  • overlayfs Restore native child mounts on overlay failure

Miscellaneous

  • Remove upstream Magic Mount custom mount hooks

文件 1

Hybrid-Mount-6.2.6-2168.zip 5.2 MiB

SHA-256 c2c91d098bf8f502ba9429b41dbb8b93e1e3685452d78fda204f837e2b2a7172 · Attestation

版本代码 602005999 v6.2.5

下载

v6.2.5

Features

  • Guard SUSFS LKM conflicts with KernelSU Next exemption

Fixes

  • vfs Preserve rule topology and reader lifetimes across updates Keep child rules when deleting a parent, snapshot RCU entries and pin directory nodes across sleeping callbacks. Preserve inode source identity, retain active directory operations, prepare hooks before publishing children, bound unsigned UID cursors, and correct inode flags, dirents and legacy xattrs. Add 98 production-function host regression cases and device parent-deletion coverage. Align userspace delete readback with derived parent topology and document validation. Host checks pass; GKI modules must be rebuilt by the existing dev workflow before packaging.

  • vfs Enforce cursor, UID and hook lifetime boundaries

  • vfs Accept owned UID structural parents during reconciliation

  • webui Tighten miuix spacing to native list metrics Drop the md3-oriented .page padding/gap that doubled every miuix gutter to 24px, and align select rows, banners and action bars with miuix's own metrics.‘ Assisted-by: LLM chrome-devtools-protocol eslint vue-tsc luyanci: 黑板赔我10元钱!!!当是精神损失费了(bushi

  • Enforce issue templates and correct APatch mount ordering

Documentation

  • Document existing WebView policy controls for issue 497 Trace Hybrid Mount try-umount registration and the existing KernelSU WebView profile. Record the device checks needed to distinguish server recovery from renderer mount visibility; do not change KernelSU or broaden mount exemptions.

  • Remove completed review notes and implementation plans

Tests

  • vfs Benchmark child lookup filters against production search Compare fixed64, adaptive Bloom and small-directory matching with a linear result oracle and collision cases. Record userspace-only timing and memory limits; keep the current production filter pending device measurements.

  • vfs Use portable 64-bit cursor fixture types

Miscellaneous

  • Sync source to AtomGit and add community entry points

  • Revert "feat: guard SUSFS LKM conflicts with KernelSU Next exemption" This reverts commit f1ea5c9128c9a8475779a485ac6eb912661188db. Remove the installer and runtime SUSFS object guard, including the KernelSU Next exemption, as requested; disabled loader files must not prevent VFS insertion.

  • vfs Refresh the prebuilt hybridmount modules

  • vfs Refresh verified DDK modules and portable source stamps

  • Merge branch 'codex/vfs-boundary-fixes' into dev # Conflicts: # module/vfs/binaries/hybridmount-android12-5.10.ko # module/vfs/binaries/hybridmount-android13-5.10.ko # module/vfs/binaries/hybridmount-android13-5.15.ko # module/vfs/binaries/hybridmount-android14-5.15.ko # module/vfs/binaries/hybridmount-android14-6.1.ko # module/vfs/binaries/hybridmount-android15-6.6.ko # module/vfs/binaries/hybridmount-android16-6.12.ko # module/vfs/binaries/list.txt # module/vfs/binaries/sources.txt

  • webui Refactor info hero in miuix Also adjusted icon

  • Update Ukrainian localization strings (#499) @luyanci Full quality Ukrainian 🇺🇦 translate Screenshot_20261018-112419_BakaSU.png Screenshot_20261018-112359_BakaSU.png Screenshot_20261018-112445_BakaSU.png markup_1000006265.png Screenshot_20261018-112326_BakaSU.png --------- Co-authored-by: 由崎黑板 [email protected] Co-authored-by: xiaoyu [email protected]

  • Trim redundant docs and mandatory documentation rules

  • Remove explanatory comments from tests

  • 更新AtomGit链接 (#492)

  • 删除 sync-atomgit.yml

  • 删除 ATOMGIT_SYNC.md

  • webui Format Ukrainian welcome entry

文件 1

Hybrid-Mount-6.2.5-2118.zip 4.7 MiB

SHA-256 973eb81dac3b8e604185369fb9b1497a2faf0709e5cdaa94cb4ffa632dd9278a · Attestation

版本代码 602003999 v6.2.3

下载

v6.2.3

Fixes

  • config Accept retired partitions during upgrades

  • vfs Port upstream inode lifecycle hardening

Miscellaneous

  • vfs Refresh the prebuilt hybridmount modules

  • ksu Replace crate with direct ioctl transport

文件 1

Hybrid-Mount-6.2.3-2090.zip 4.7 MiB

SHA-256 10ca8b21e55705050a5e2ad56777190279c8aae582fed5ad5b1a4dfddae91e23 · Attestation

透明度

Tag
v6.2.6 不可变 Release
Tag commit
0a047415b795
内容 commit
0a047415b795
SHA-256
c2c91d098bf8f502ba9429b41dbb8b93e1e3685452d78fda204f837e2b2a7172
最近同步到变更

自行复核

KernelSU 模块不对模块签名,也不审计模块代码。SHA-256 只证明下载内容与本索引一致。可使用 GitHub CLI 自行复核:

gh release verify v6.2.6 -R Hybrid-Mount/meta-hybrid_mount
gh release verify-asset v6.2.6 Hybrid-Mount-6.2.6-2168.zip -R Hybrid-Mount/meta-hybrid_mount