๐พ 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).
Argument | Description |
---|---|
PART | Partition(s) to mount |
-rw | Mount in Read/Write mode only |
-ro | Mount in Read-Only mode only |
-re | Unmount before mounting |
-e | Express mode (quick search, skips if not found) |
-n NAME | Custom partition name to find |
-f FILE | Mount 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
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.
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
.
Argument | Description |
---|---|
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"
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).
Argument | Description |
---|---|
NAME | Partition name |
-e | Express mode (quick search, skips if not found) |
-t N | Time 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"
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.
Argument | Description |
---|---|
FOLDER1 | First folder |
FOLDER2 | Second 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
Both folders must be mounted.