Skip to main content

๐Ÿ’พ Mount Tools

Utilities for managing filesystem mounts.


mount_allโ€‹

Mounts main partitions automatically: /system_root, /system, /system_ext, /vendor, /product, /odm, /apex (if apex_mount is enabled).

mount_all

try_mountโ€‹

Mounts specific partitions (Read/Write if possible, otherwise Read-Only).

ArgumentDescription
PARTPartition(s) to mount
-rwMount in Read/Write mode only
-roMount in Read-Only mode only
-reUnmount before mounting
-eExpress mode (quick search, skips if not found)
-n NAMECustom partition name to find
-f FILEMount a file (RAW .IMG) or specific block
# Default (RW or RO)
try_mount /cache /optics /prism

# Read/Write only
try_mount -rw /optics /prism

# Read-Only only
try_mount -ro /optics /prism

# Remount
try_mount -re /optics /prism

# Custom name
try_mount -n "system" /test

# Specific slot
try_mount -n "vendor_b" /test

# Express mode
try_mount -e /system

# Mount RAW IMG
try_mount -f "/sdcard/system.img" /test

# Mount block
try_mount -f "/dev/block/dm-0" /system_root

# Mixed flags
try_mount -re -rw /optics /prism
try_mount -e -n "vendor" /mnt/vendor
try_mount -ro -f "/sdcard/super.img" -n "system_a" /mnt/system_inside_SUPER
tip

The names of the partitions do not necessarily need to specify the Slot (_a/_b). By default, it always use the active slot if the device is A/B.

note

Use mount_all for /system_root, /system_ext, /system, /vendor, /product, /odm, /apex.


apex_mountโ€‹

Mounts Android Pony Express (APEX) files or folders in /apex.

ArgumentDescription
PATH.apex/.capex file or folder
# Mount APEX file
apex_mount "/system/apex/com.android.runtime.apex"

# Mount APEX folder
apex_mount "/system/apex/com.android.runtime"
note

Supports .apex and Android 12+ .capex formats.


umount_allโ€‹

Unmounts all partitions mounted by mount_all, try_mount, and apex_mount.

umount_all

find_blockโ€‹

Gets the exact block device of a partition (supports A/B).

ArgumentDescription
NAMEPartition name
-eExpress mode (quick search, skips if not found)
-t NTime limit in seconds for full search
# Get system block
find_block "system" # e.g., "/dev/block/dm-0"

# A/B support
find_block "vendor"

# Fast find
find_block -e "system"

# Time-limited find
find_block -t 5 "system"
tip

The names of the partitions do not necessarily need to specify the Slot (_a/_b). By default, it always use the active slot if the device is A/B.


is_same_mountโ€‹

Checks if two folders are on the same partition.

ArgumentDescription
FOLDER1First folder
FOLDER2Second folder
if is_same_mount "/system" "/system_ext"; then
ui_print "/system_ext is inside the system partition"
else
ui_print "/system_ext must have a separate partition"
fi
note

Both folders must be mounted.