Path Hide
About 771 wordsAbout 3 min
2026-04-25
Path Hide hides specified files and directories from apps at the kernel level. When a targeted app attempts to access a hidden path, the kernel returns ENOENT (file not found), achieving complete invisibility. Default Off.
Path: Settings page top-right function button → Path Hide
How It Works
Path Hide is built on the KernelPatch SuperCall mechanism, intercepting path access at the kernel VFS layer. The JNI driver calls nativePathHide* methods, which communicate with the kernel via SuperCall to maintain an interception list of hidden paths entirely in kernel space.
The kernel hooks the following system calls:
openat— file openfaccessat— file access checknewfstatat— file status querygetdents64— directory listing (filters matching entries from results)
Unlike user-space hiding solutions, Path Hide operates entirely in kernel space — user-space apps cannot detect or bypass it.
Global Mode (Default)
Hide configured paths from all user-space applications. System UIDs (< 10000) are exempt by default.
| UID Range | Filtered? | Description |
|---|---|---|
| FolkPatch itself | No | Manager always exempt for normal operation |
| System UIDs (< 10000) | No | Root, system and other system processes unaffected |
| User apps (>= 10000) | Yes | All third-party apps cannot access hidden paths |
- Enter the paths to hide in the text field (one per line)
- Click Save to write the configuration
- Toggle Path Hide on
/storage/emulated/0/secret
/sdcard/backupUID Execution Mode
When enabled, hiding only applies to specified UIDs — unselected apps are completely unaffected.
| UID Range | Filtered? | Description |
|---|---|---|
| FolkPatch itself | No | Manager always exempt |
| Root (UID 0) | No | Exempt by default as a system UID |
| User-selected UIDs | Yes | Only selected app UIDs are hidden |
| Non-selected UIDs | No | Other apps completely unaffected |
- Configure the paths to hide
- Toggle UID Execution Mode on
- Click Select Apps to open the visual app picker
Visual App Picker
Provides a graphical interface for selecting apps, supporting:
- Search by app name or package name
- Display app icon, name, package name, and UID
- System app badge and filter toggle
- Automatic cleanup of UIDs for uninstalled apps
- Selected apps displayed as cards with quick remove action
Filter System UIDs
By default, system UIDs (< 10000, including Root, system, etc.) are exempt from path hiding. Enabling Filter System UIDs extends path hiding to system-level processes as well.
| UID Range | Global Mode | UID Mode | Description |
|---|---|---|---|
| FolkPatch itself | No | No | Manager always exempt |
| Root (UID 0) | Yes | Yes | Root processes also cannot access hidden paths |
| System UIDs (< 10000) | Yes | Only if in whitelist | All filtered in Global mode; must be in whitelist for UID mode |
| User apps (>= 10000) | Yes | Only if in whitelist | Behavior unchanged |
Warning
Enabling Filter System UIDs may cause some system features to malfunction, as critical system services may lose access to hidden paths. Use with caution and ensure you do not hide critical system paths.
A confirmation dialog appears when enabling, requiring explicit confirmation before taking effect.
Auto Apply
Path Hide configuration is automatically read and applied by the apd daemon at boot (during the post-fs-data phase) in the following order:
- Clear kernel path list, then add each configured hidden path
- If UID Execution Mode is enabled, restore UID whitelist and enable UID mode
- If Filter System UIDs is enabled, enable system UID filtering
- Enable Path Hide last (ensuring all configuration is in place before activation)
This ensures paths are hidden before any app starts — no need to manually open the manager.
/data/adb/fp/pathhide
enabled# Enable flag file
paths# Hidden path list (one per line)
uid_mode# UID execution mode flag
uids# UID whitelist (one per line)
filter_system# Filter system UIDs flag
Note
- Paths must start with
/ - Hiding critical system paths may cause device malfunctions
- Rebooting the device after configuration changes is recommended
- Path Hide requires KernelPatch kernel support
- Path matching uses prefix matching: hiding
/data/fooalso hides/data/foo/bar, but NOT/data/foobar - Maximum of 256 hidden paths, each up to 512 characters
Related Features
- FolkPatch Hide: Basic Root characteristic hiding
- Umount Service: Unmount specified system paths
- Kernel Spoof: Spoof kernel version information
Copyright
Copyright Ownership:FolkPatch Team
License under:Attribution 4.0 International (CC-BY-4.0)
