Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

FuseHide

> 编程语言
Open source

面向 Android 12+ 的 Xposed 模块,用于在 MediaProvider 中按运行时配置隐藏普通存储路径,并提供 Android/data 相关 Unicode 场景的调试与修复能力。

190 stars0 likes1 views
WebsiteGitHub

About

FuseHide

中文 README

FuseHide is an Android 12+ storage-visibility module and MediaProvider/FUSE research tool. It injects into the MediaProvider process and hooks the userspace FUSE implementation in libfuse_jni.so, allowing selected apps to see a filtered view of /storage/emulated/0 (/sdcard) according to runtime-configurable, per-UID rules.

FuseHide currently provides two injection backends:

  • LSPosed / libxposed, using the Android app as an Xposed module.
  • Standalone Zygisk, using a flashable root-module package and Dobby-based native hooks without requiring LSPosed.

Both backends converge on the same libfusehide.so runtime, the same path policy, and the same configuration model.

FuseHide also keeps the original MediaProvider-oriented Unicode research and mitigation path for Android/data and Android/obb. Normal /sdcard path hiding and the special Android/data / Android/obb path are related to the same MediaProvider process, but they are not the same hook path.

[!WARNING] FuseHide works by hooking internal MediaProvider and FUSE implementation details. These ABIs are not public Android APIs and can change between Android releases, MediaProvider updates, and vendor ROMs. The project deliberately skips unsafe hooks when an ABI cannot be verified instead of blindly applying offsets or layouts.

Features

  • Hide first-level entries under /storage/emulated/0 for selected packages.
  • Hide nested relative paths such as Download/private without hiding their visible parent directory.
  • Define package-specific hide rules in addition to global rules.
  • Optional stress-test mode for hiding all first-level entries except configured exemptions.
  • Filter directory enumeration as well as direct lookup/access paths.
  • Reduce cache-based visibility leaks through entry/attribute timeout control and active invalidation.
  • Hot-reload hide configuration into the already injected MediaProvider process.
  • Query the actual native configuration currently applied inside MediaProvider.
  • LSPosed/libxposed backend and standalone Zygisk backend.
  • Runtime ELF, file-backed ELF, relocation and verified device-profile based hook resolution.
  • Compatibility handling for multiple MediaProvider directory-entry ABIs, including newer API 37 layouts.
  • Debug/probe UI for filesystem operations and Unicode-path experiments.

Requirements

FuseHide currently targets:

  • Android 12 / API 31 or newer.
  • MediaProvider package:
    • com.android.providers.media.module, or
    • com.google.android.providers.media.module.

For the LSPosed backend, a compatible LSPosed/libxposed environment is required.

For the Zygisk backend, a compatible root environment and Zygisk implementation are required. The packaged installer supports Magisk-compatible installation flows and KernelSU-style module installation; the actual runtime still depends on a working Zygisk implementation on the device.

Injection modes

LSPosed / libxposed

The Xposed metadata is under app/src/main/resources/META-INF/xposed/.

The runtime chain is:

LSPosed / libxposed
    -> Entry.onPackageLoaded()
    -> only accept MediaProvider package names
    -> System.loadLibrary("fusehide")
    -> hook Application.attach()
    -> capture MediaProvider Application
    -> register config/status receivers
    -> native_init()
    -> PostNativeInit("libfuse_jni.so", ...)
    -> InstallFuseHooks()

Entry intentionally ignores non-MediaProvider processes.

The default static scope contains:

com.android.providers.media.module
com.google.android.providers.media.module

Standalone Zygisk

The Zygisk implementation lives under app/src/main/cpp/zygisk/.

The runtime chain is:

Zygisk
    -> preAppSpecialize()
    -> match MediaProvider process name
    -> preload injected dex + libfusehide.so from the module directory
    -> postAppSpecialize()
    -> Dobby-hook linker do_dlopen
    -> wait until libfuse_jni.so is loaded
    -> call libfusehide native_init()
    -> provide DobbyHook through the native hook API bridge
    -> PostNativeInit("libfuse_jni.so", ...)
    -> register HideConfigNativeBridge JNI methods
    -> start ZygiskEntry with the MediaProvider system context

The injected Java classes are loaded from the APK dex payload through InMemoryDexClassLoader.

LSPosed and Zygisk arbitration

FuseHide should not install both hook backends into the same MediaProvider process.

The Zygisk module contains post-fs-data.sh logic that checks LSPosed's module/scope database for an enabled FuseHide MediaProvider scope. When that scope is detected, the module records lsp_scope_enabled and disables the Zygisk module path. The native Zygisk entry also checks the marker and refuses to inject when the LSPosed path is active.

In other words, use one injection backend for MediaProvider at a time.

How path hiding works

Normal path hiding does not require fuse-bpf. FuseHide performs the policy enforcement inside MediaProvider's userspace FUSE daemon.

A simplified request flow is:

restricted app
    -> Linux VFS
    -> /dev/fuse
    -> MediaProvider libfuse_jni worker
    -> FuseHide request/reply hooks
    -> per-UID hide policy
    -> filtered FUSE result

FuseHide does not rely on only one lookup hook. The implementation covers several layers so that a path cannot remain visible simply because a different filesystem operation was used.

Direct path operations

The native layer hooks or wraps relevant MediaProvider paths such as:

  • is_app_accessible_path
  • pf_lookup
  • pf_lookup_postfilter
  • pf_getattr
  • pf_create
  • pf_mkdir
  • pf_mknod
  • pf_unlink
  • pf_rmdir
  • pf_rename
  • selected lower-filesystem fallbacks such as stat, lstat, open, getxattr, and related calls

When a resolved per-UID rule says that the requested path belongs to a hidden subtree, FuseHide attempts to make the target behave as absent rather than merely inaccessible.

Directory enumeration

Hiding a path from stat() or lookup is not enough: the entry must also disappear from directory listings.

FuseHide therefore covers multiple enumeration stages, including:

  • pf_readdir
  • pf_readdirplus
  • pf_readdir_postfilter
  • do_readdir_common
  • GetDirectoryEntries
  • addDirectoryEntriesFromLowerFs
  • fuse_reply_buf

WrappedReplyBuf() acts as a final FUSE-wire filtering layer. It recovers the request UID / inode / parent-path context, recognizes supported directory-entry payload layouts, removes entries matching the resolved hide rule, and forwards the rewritten reply buffer.

Reply and cache handling

A hidden target may already have a positive dentry, inode, or attribute cache entry. Without cache handling, an app could observe a path even after the policy says it should be hidden.

FuseHide therefore also handles:

  • fuse_reply_entry
  • fuse_reply_attr
  • fuse_reply_err
  • ShouldNotCache
  • fuse_lowlevel_notify_inval_entry
  • fuse_lowlevel_notify_inval_inode

For hidden targets the implementation can zero entry/attribute timeouts, avoid caching, and schedule entry/inode invalidation. Runtime tracking is scoped carefully so that state learned from one UID is not blindly reused for another UID with a different hide policy.

Android/data and Android/obb

/storage/emulated/0/Android/data and /storage/emulated/0/Android/obb are special MediaProvider paths. Their access control is not simply the same directory-enumeration path used for ordinary public /sdcard folders.

FuseHide retains hooks and diagnostics around components such as:

  • is_bpf_backing_path
  • is_package_owned_path
  • case-insensitive path comparison
  • ICU Default_Ignorable_Code_Point handling
  • MediaProvider.isUidAllowedAccessToDataOrObbPathForFuse() tracing in debuggable builds

The Unicode policy recognizes default-ignorable characters and normalizes the affected comparison paths so that visually disguised path components do not escape the intended MediaProvider checks.

This special-path work should not be confused with normal configured path hiding: ordinary /sdcard filtering is implemented through the FUSE request/reply path even when fuse-bpf is not running.

Configuration model

FuseHide maintains a runtime HideConfig with these main fields:

  • enableHideAllRootEntries
  • hideAllRootEntriesExemptions
  • hiddenRootEntryNames
  • hiddenRelativePaths
  • hiddenPackages
  • packageRules

Global rules

hiddenRootEntryNames contains first-level names under /storage/emulated/0.

For example:

su
daemonsu

hiddenRelativePaths contains paths relative to /storage/emulated/0:

Download/private
Documents/internal/test

Leading/trailing slashes and repeated separators are normalized by the native policy.

Which apps receive global rules

hiddenPackages is the package allow-list for the global hide rule.

For each FUSE request, FuseHide resolves the request UID to its current package set through PackageManager#getPackagesForUid(). If one of those packages is present in hiddenPackages, the global rule is merged into that UID's effective rule.

The UID-to-rule result is cached, but package add/remove broadcasts invalidate the package-set generation and derived caches so a stale package association is not kept indefinitely.

Package-specific rules

Package-specific targets are stored as PackageHideRule objects and can be edited with [package.name] sections.

Example:

su
daemonsu

[io.github.xiaotong6666.fusehide]
xinhao
Download/private

[com.eltavine.duckdetector]
MT2
xinhao

Rules before the first section are global targets. A value containing / is treated as a relative path; a value without / is treated as a first-level entry name.

Package-specific rules are matched against every package currently belonging to the request UID and merged together. A package-specific section can therefore apply even when that package is not listed in hiddenPackages; hiddenPackages specifically controls inheritance of the global rule.

Current source defaults

The current native defaults are:

Global root names:

su
daemonsu

Packages receiving the global rule:

com.eltavine.duckdetector
io.github.xiaotong6666.fusehide
io.github.a13e300.fusefixer

Package-specific defaults:

[io.github.xiaotong6666.fusehide]
xinhao

[com.eltavine.duckdetector]
MT2
xinhao

enableHideAllRootEntries is disabled by default.

When enabled, all first-level entries are considered hidden except configured exemptions. The source defaults currently keep these names visible:

Android
DCIM
Document
Download
Movies
Pictures

Runtime configuration sync

The configuration UI is not just an editor for local preferences. FuseHide can synchronize a configuration into the already injected MediaProvider process and ask that process to report the native configuration it actually has applied.

The main pieces are:

  • HideConfigStore
  • HideConfigProvider
  • HideConfigRequestReceiver
  • the injected Entry / ZygiskEntry
  • HideConfigNativeBridge

The injected process first attempts to recover a persisted injected-process snapshot, then obtains current app-side configuration through the provider path. A broadcast fallback is available when the provider path cannot be used.

Reload transactions use reload tokens, and the fallback IPC path contains authentication checks rather than accepting arbitrary unauthenticated configuration broadcasts.

Configuration changes are published atomically to the native policy. Applying a new configuration increments its generation and invalidates dependent UID rules, root snapshots, path-classification caches, and tracked hidden targets.

The injected process also retries configuration loading around boot/user lifecycle events such as:

  • ACTION_LOCKED_BOOT_COMPLETED
  • `ACTION_BOOT_COM

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言