### Example module.prop Description Source: https://context7.com/backslashxx/mountify/llms.txt An example of the `description` field in `module.prop` after a successful boot, indicating the active mode, filesystem type, and mounted modules. ```text # Example module.prop description field after a successful boot: description=mode: auto ๐Ÿค– | fstype: tmpfs ๐Ÿฆพ | modules: Adreno_Gpu_Driver DisplayFeatures ``` -------------------------------- ### Mountify Manual Module List - modules.txt Source: https://context7.com/backslashxx/mountify/llms.txt Specifies which modules to mount when `mountify_mounts=1`. Each line should contain a single module ID. Lines starting with '#' are ignored. ```shell # /data/adb/mountify/modules.txt # One module ID per line. Used only when mountify_mounts=1. Adreno_Gpu_Driver weebu-addon DisplayFeatures mountify_whiteouts ``` -------------------------------- ### Apply OverlayFS for Subfolders Source: https://context7.com/backslashxx/mountify/llms.txt Applies OverlayFS for subfolders like /system/bin and /vendor/. Ensure OverlayFS is correctly configured. ```bash busybox mount -t overlay -o "lowerdir=/mnt/vendor/mountify/bin:/system/bin" overlay /system/bin ``` -------------------------------- ### Mountify Two-Stage Mounting (tmpfs mode) Source: https://context7.com/backslashxx/mountify/llms.txt Illustrates the default mounting process when `CONFIG_TMPFS_XATTR=y`. Stage 1 isolates the mount namespace for `/mnt` or `/mnt/vendor`, and Stage 2 creates the staging area within it. ```shell # Stage 1 โ€” isolate the mount namespace for /mnt (or /mnt/vendor) busybox mount -t tmpfs tmpfs /mnt/vendor # Stage 2 โ€” create the staging area mkdir -p /mnt/vendor/mountify busybox mount -t tmpfs tmpfs /mnt/vendor/mountify # mountify_copy() runs here, populating /mnt/vendor/mountify/ for every module ``` -------------------------------- ### Create Ext4 Sparse Image for Staging Source: https://context7.com/backslashxx/mountify/llms.txt Creates a 2 GB sparse ext4 image for use as a staging area, especially when CONFIG_TMPFS_XATTR is absent. The size is controlled by `sparse_size` in the config. ```bash # Create a 2 GB sparse image (size controlled by sparse_size in config) busybox dd if=/dev/zero of=/mnt/vendor/mountify-ext4 bs=1M count=0 seek=2048 /system/bin/mkfs.ext4 -O ^has_journal /mnt/vendor/mountify-ext4 ``` -------------------------------- ### Load nuke.ko LKM Source: https://github.com/backslashxx/mountify/blob/master/nuke_ext4_lkm/README.md This script demonstrates how to load the nuke.ko LKM. It temporarily modifies kptr_restrict to allow symbol lookup and then restores the original setting. Ensure the module is compiled and available. ```shell #!/bin/sh kptr_set=$(cat /proc/sys/kernel/kptr_restrict) echo 1 > /proc/sys/kernel/kptr_restrict ptr_address=$(grep " ext4_unregister_sysfs$" /proc/kallsyms | awk {'print "0x"$1'}) insmod nuke.ko mount_point="/data/adb/modules" symaddr="$ptr_address" echo $kptr_set > /proc/sys/kernel/kptr_restrict ``` -------------------------------- ### List Modules to Mount Source: https://github.com/backslashxx/mountify/blob/master/README.md Specify module IDs in this file to mount only specific modules when `mountify_mounts` is set to 1 in `config.sh`. ```text module_id Adreno_Gpu_Driver DisplayFeatures ViPER4Android-RE-Fork mountify_whiteouts ``` -------------------------------- ### Generate Whiteout Module Source: https://context7.com/backslashxx/mountify/llms.txt Generates a companion module (`mountify_whiteouts`) containing OverlayFS character-device whiteouts to delete system files. The whiteout definitions are provided in a text file. ```bash # whiteouts.txt format: one absolute path per line, # for comments # /system/ prefix is required; /product/, /vendor/, /odm/, /system_ext/ # paths are automatically prepended with /system/. # Example /data/adb/mountify/whiteouts.txt: /system/app/YouTube/YouTube.apk /system/priv-app/Velvet/Velvet.apk /product/app/Maps/Maps.apk # automatically becomes /system/product/app/Maps/Maps.apk # Generate the whiteout module: sh /data/adb/modules/mountify/whiteout_gen.sh /data/adb/mountify/whiteouts.txt # Output: populates /data/adb/modules_update/mountify_whiteouts/ # Each whiteout is a char device (0,0) with trusted.overlay.whiteout xattr. # The module takes effect on next reboot. ``` -------------------------------- ### Configure Zygisk Provider for Unmount Source: https://context7.com/backslashxx/mountify/llms.txt An alternative method for custom unmounting by configuring a Zygisk provider and setting the `MOUNT_DEVICE_NAME` environment variable. Supported values include 'KSU', 'APatch', and 'magisk'. ```bash # Preferred alternative: configure a Zygisk provider and set MOUNT_DEVICE_NAME: # MOUNT_DEVICE_NAME="KSU" # for KernelSU forks # MOUNT_DEVICE_NAME="APatch" # for APatch # MOUNT_DEVICE_NAME="magisk" # for Magisk ``` -------------------------------- ### Mount Ext4 Sparse Image RW for Population Source: https://context7.com/backslashxx/mountify/llms.txt Mounts the created ext4 sparse image in read-write mode to allow population of its contents. ```bash # Mount rw for population busybox mount -o loop,rw,noatime,nodiratime /mnt/vendor/mountify-ext4 /mnt/vendor/mountify ``` -------------------------------- ### Mountify Configuration - config.sh Source: https://context7.com/backslashxx/mountify/llms.txt Primary runtime configuration for Mountify. Settings are plain shell variable assignments and are preserved across updates. Adjust mount behavior, staging directory, and safety checks here. ```shell # /data/adb/mountify/config.sh # Mounting mode # 0 = disabled # 1 = manual (only modules listed in modules.txt) # 2 = auto (every module that has a system/ folder) mountify_mounts=2 # Name of the temporary staging directory under /mnt or /mnt/vendor FAKE_MOUNT_NAME="mountify" # Set to the root-manager name so Zygisk providers can unmount on demand # Valid values: "overlay" (default), "KSU", "APatch", "magisk" MOUNT_DEVICE_NAME="overlay" # Filesystem type alias (useful only if you patched OverlayFS to register an alias) FS_TYPE_ALIAS="overlay" # Restart Android at service stage โ€” fixes "racey" modules (GPU drivers, boot animations) mountify_stop_start=0 # Test for a decoy mount on an empty system folder (tmpfs mode only) test_decoy_mount=0 # In-kernel unmount helper # 0 = disabled # 1 = susfs4ksu (ksu_susfs add_try_umount) # 2 = ksud kernel umount (KSU 22106+) mountify_custom_umount=0 # Disable all safety checks โ€” for debugging only mountify_expert_mode=0 # โ”€โ”€ ext4 sparse mode settings โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ # Force ext4 sparse image even when tmpfs xattr is available use_ext4_sparse=0 # Spoof the sparse mount as an APEX service spoof_sparse=0 FAKE_APEX_NAME="com.android.mntservice" # Sparse image size in MB sparse_size="2048" # Load the nuke LKM to remove ext4 sysfs nodes after mounting enable_lkm_nuke=0 lkm_filename="nuke.ko" ``` -------------------------------- ### Spoof Ext4 Mount as APEX Source: https://context7.com/backslashxx/mountify/llms.txt Optionally spoofs the ext4 sparse image mount to appear as an APEX mount, hiding the underlying device node. This requires creating specific directories and binding the mount. ```bash # Optional: spoof as an APEX mount to hide the ext4 device node mkdir -p /apex/com.android.mntservice@1 busybox mount -o loop,ro,dirsync,seclabel,nodev,noatime \ /mnt/vendor/mountify-ext4 /apex/com.android.mntservice@1 mkdir -p /apex/com.android.mntservice busybox mount --bind,ro /apex/com.android.mntservice@1 /apex/com.android.mntservice ``` -------------------------------- ### Check Active OverlayFS Mounts Source: https://context7.com/backslashxx/mountify/llms.txt Displays active OverlayFS mounts created by Mountify by reading the `mount_diff` file. This helps in verifying which directories are being overlaid. ```bash # Check active OverlayFS mounts created by mountify: cat /data/adb/modules/mountify/mount_diff # Output (example): # > overlay /system/bin overlay ro,relatime,... # > overlay /system/lib64 overlay ro,relatime,... # > overlay /vendor/lib64 overlay ro,relatime,... ``` -------------------------------- ### Mountify Core Mount Logic - mountify_copy() Source: https://context7.com/backslashxx/mountify/llms.txt Details on how Mountify processes modules. It copies the `system/` tree, mirrors SELinux contexts, preserves OverlayFS attributes, and creates a `skip_mount` flag. Use `skip_mountify` to prevent a module from being processed. ```shell # How mountify decides whether to process a module: # - Must have /data/adb/modules//system/ # - Must NOT be disabled, scheduled for removal, or contain skip_mountify flag # - Must NOT carry /system/etc/hosts (hosts-file modules are excluded) # To tell mountify to skip your module, place a flag in its folder: touch /data/adb/modules/my_module/skip_mountify # To verify what mountify mounted on the last boot: cat /dev/mountify_logs/modules # list of mounted module IDs cat /dev/mountify_logs/mountify_mount_list # list of mounted paths cat /dev/mountify_logs/before # /proc/mounts snapshot before cat /dev/mountify_logs/after # /proc/mounts snapshot after # After service.sh runs, a cleaned diff is saved permanently: cat /data/adb/modules/mountify/mount_diff ``` -------------------------------- ### Register Mount Points with susfs4ksu Source: https://context7.com/backslashxx/mountify/llms.txt Registers OverlayFS mount points with the in-kernel unmount infrastructure using `ksu_susfs`. This method is enabled when `mountify_custom_umount=1` is set in `config.sh`. It reads paths from `/dev/mountify_logs/mountify_mount_list`. ```bash # Method 1 โ€” susfs4ksu (mountify_custom_umount=1 in config.sh) # Reads /dev/mountify_logs/mountify_mount_list and registers each path: /data/adb/ksu/bin/ksu_susfs add_try_umount /system/bin 1 /data/adb/ksu/bin/ksu_susfs add_try_umount /vendor/lib64 1 # For OPLUS devices the /my_* partitions are also registered under /mnt/vendor: /data/adb/ksu/bin/ksu_susfs add_try_umount /mnt/vendor/my_region 1 ``` -------------------------------- ### Check for Skip Mount Flag Source: https://github.com/backslashxx/mountify/blob/master/README.md Mountify checks for the existence of this file in the module's directory to skip mounting the module. ```bash [ -f /data/adb/modules/module_name/skip_mountify ] ``` -------------------------------- ### Bypass Bootloop Protection Source: https://context7.com/backslashxx/mountify/llms.txt Provides a method to permanently bypass Mountify's anti-bootloop protection. This is NOT recommended due to the risk of a bootloop. ```bash # To permanently bypass (NOT RECOMMENDED โ€” risk of bootloop): touch /data/adb/mountify/explicit_I_want_a_bootloop ``` -------------------------------- ### Stage 1 Unmount OverlayFS Source: https://context7.com/backslashxx/mountify/llms.txt Performs a lazy unmount for the vendor directory. ```bash busybox umount -l /mnt/vendor ``` -------------------------------- ### Re-enable Mountify After Auto-Disable Source: https://context7.com/backslashxx/mountify/llms.txt Removes the disable flag to re-enable Mountify after it has been automatically disabled due to consecutive boot failures. ```bash # To re-enable after auto-disable: rm /data/adb/modules/mountify/disable ``` -------------------------------- ### Stage 2 Unmount OverlayFS Source: https://context7.com/backslashxx/mountify/llms.txt Performs a lazy unmount for the overlay lower-directories, which continue to work after this step. ```bash busybox umount -l /mnt/vendor/mountify ``` -------------------------------- ### Generate Whiteout Module Source: https://github.com/backslashxx/mountify/blob/master/README.md This command generates a whiteout module. This functionality is deprecated but still available. ```bash sh whiteout_gen.sh ``` -------------------------------- ### Unmount and Remount Ext4 Sparse Image RO Source: https://context7.com/backslashxx/mountify/llms.txt Unmounts the ext4 sparse image from read-write and remounts it as read-only, making it suitable for use as a stable lower-directory for OverlayFS. ```bash # Unmount rw, remount ro so overlayfs can use it as a stable lower-dir busybox umount -l /mnt/vendor/mountify busybox mount -o loop,ro,noatime,nodiratime /mnt/vendor/mountify-ext4 /mnt/vendor/mountify ``` -------------------------------- ### Register Mount Points with ksud Kernel Unmount Source: https://context7.com/backslashxx/mountify/llms.txt Registers mount points using `ksud kernel umount add` for kernel-level unmounting. This method requires KSU version 22106+ and is enabled when `mountify_custom_umount=2` is set. ```bash # Method 2 โ€” ksud kernel umount (mountify_custom_umount=2, requires KSU 22106+) /data/adb/ksud kernel umount add /system/bin --flags 2 /data/adb/ksud kernel notify-module-mounted ``` -------------------------------- ### Add Language Entry to languages.json Source: https://github.com/backslashxx/mountify/blob/master/webui/public/locales/GUIDE.md When adding a new language, include an entry in `languages.json` following the specified format. Ensure the language code is standard and maintain alphabetical order. ```json { "en": "English", "fr": "Franรงais", // Your language, keep alphabetical order "zh-CN": "็ฎ€ไฝ“ไธญๆ–‡" } ``` -------------------------------- ### Delete Ext4 Sparse Image Source: https://context7.com/backslashxx/mountify/llms.txt Removes the ext4 sparse image file after all overlays have been successfully put in place. ```bash # Sparse image is deleted after overlays are in place rm /mnt/vendor/mountify-ext4 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.