Mount Implementation
About 714 wordsAbout 2 min
2025-01-30
FolkPatch provides flexible Root mount implementation schemes, supporting multiple mount modes to adapt to different usage scenarios. The mount system is responsible for mapping module files to system partitions, making module functions effective.
Version Change
Starting from the new version, FolkPatch defaults to not mounting module files (previously known as "Lite Mode"). Users who need module mounting must explicitly enable a mount method. Lite Mode as a separate concept no longer exists.
Mount Modes
FolkPatch provides the following mount states:
- Default (No Mount): FolkPatch's default behavior - module files are not mounted, only Root permission management is active
- Built-in Magic Mount: FolkPatch's own bind mount system, no extra modules needed
- Meta Module Mount: Achieve custom mounting schemes by installing meta modules
Default (No Mount)
By default, FolkPatch does not mount module files. This means modules can be installed, but their system directory contents will not be overlaid onto the system partition. Only core functions such as Root permission management are active.
How to Keep Default
No action needed - this is the default state when:
- Enable Mount System option is turned off
- No meta modules are installed
Applicable Scenarios
- Only need Root permission management, no system modification needed
- Temporarily use for troubleshooting mount-related issues
- Pursuing the most minimal system environment
Built-in Magic Mount
Built-in Magic Mount is FolkPatch's mount system added on top of APatch, using a Magisk-like bind mount mechanism, without relying on external meta modules.
Working Principle
- Maps files from module
systemdirectory to system partitions via bind mount - Uses tmpfs and mirror mount for file overlay
- Mount process is directly controlled by FolkPatch core service
Technical Details
- Control marker:
/data/adb/.magic_mount_enable - Mount source directory:
/data/adb/ap/magic_mount
How to Enable
- Open FolkPatch app
- Enter Settings -> General
- Enable Enable Mount System option
- Ensure no meta module is installed (the two should not be used simultaneously)
- Reboot device
Applicable Scenarios
- Daily use, no need for complex mount configurations
- Don't want to install extra meta modules
- Pursuing a simple mounting solution
Meta Module Mount
Meta module mount achieves file system mounting by installing specialized meta modules, allowing the community to control mounting behavior through custom scripts.
Working Principle
- Meta module takes over all module mounting logic via
metamount.shscript - Supports various mount technologies (OverlayFS, bind mount, etc.)
- Takes over module install/uninstall process via
metainstall.shandmetauninstall.sh
Technical Details
- Identification marker:
metamodule=1ormetamodule=trueinmodule.prop - Meta module directory:
/data/adb/metamodule/(symlink to actual module directory) - Mount script:
metamount.sh(note: notmount.sh) - Install script:
metainstall.sh - Uninstall script:
metauninstall.sh
How to Enable
- Ensure Enable Mount System option is turned off (to avoid conflict with built-in mount)
- Download and install a meta module (such as FolkMeta, etc.)
- Reboot device
Applicable Scenarios
- Need to use a specific mount scheme (such as OverlayFS)
- Need to customize mounting logic
- Using specific modules that require meta module support
Note
Do not enable built-in Magic Mount and install meta modules at the same time. They should not be used simultaneously.
Mode Comparison
| Comparison Item | Default (No Mount) | Built-in Magic Mount | Meta Module Mount |
|---|---|---|---|
| Mount Mechanism | None | bind mount | Determined by meta module |
| External Dependency | None | None | Requires installing meta module |
| Configuration Difficulty | None (default) | Simple | Medium |
| Feature Completeness | Root only | Basic features | Depends on meta module |
| Flexibility | None | Average | High |
Comparison with APatch
| Feature | FolkPatch | APatch (New Versions) |
|---|---|---|
| Default Behavior | No mount (Root only) | No mount (Root only) |
| Built-in Magic Mount | Available (optional) | Removed |
| Meta Module Support | Available (optional) | Supported |
| Module Installation | Supported | Supported |
| OverlayFS Mount | Via meta module | No longer supported |
FolkPatch differs from APatch in that it retains built-in Magic Mount as an optional feature. APatch has removed its built-in mount system in new versions, but still supports meta modules.
Related Links
- Built-in Mount Details - Built-in Magic Mount detailed description
- Meta Module Mount Details - Meta Module detailed description
- Lite Mode (Deprecated) - Information about the deprecated Lite Mode
- Basics & Common Knowledge - Mounting - Comparison of mount mechanisms across Root solutions
Copyright
Copyright Ownership:FolkPatch Team
License under:Attribution 4.0 International (CC-BY-4.0)
