Last Update: 23.06.2025/bs
Action |
Default directories |
Comment |
mount |
directories listed in the environment
variable DIRS_TO_OVERLAY |
|
diff |
directories listed in the environment
variable DIRS_TO_OVERLAY |
the action is done regardless of the mount
status of the directories use the option --active to process only the mounted overlay filesystems |
undo |
directories listed in the environment
variable DIRS_TO_OVERLAY |
the action is done regardless of the mount
status of the directories use the option --active to process only the mounted overlay filesystems |
test |
directories currently mounted with an overlay
filesystem |
|
umount |
directories currently mounted with an overlay filesystem | |
remount |
directories currently mounted with an overlay filesystem | |
get |
directories listed in the environment variable DIRS_TO_OVERLAY | use the option --active to process
only the mounted overlay filesystems This action can also be used for files. |
restore |
n/a |
there are no default files or directories for
this action This action can also be used for files. |
list |
n/a |
This action always lists all directories
currently mounted with an overlay filesystem Use the option --details to also list the backend directory and backend disk for each overlay mount |
mount_only |
n/a |
Variable |
Usage |
Default value |
Comment |
IMAGE_FILE | file used for the virtual disk |
/data/local/tmp/image001 |
|
BASEDIR | the mount point for the virtual disk | /dev/ov |
|
DIRS_TO_OVERLAY | the directories for which the script creates an overlay mount | /system_ext /product /odm /system |
|
FILESYSTEM_TO_USE | the filesystem used on the virtual disk |
ext4 |
must be a filesystem known by the running
Android that supports overlay mounts (e.g. ext4 or ext3) The parameter is only used when creating a new filesystem on the virtual disk. |
FILESYSTEM_SIZE | the size of the virtual disk | 100m |
the value can be any value that is known by
the binary dd for the parameter bs (see the
output of "dd --help") The variable is only used when the virtual disk is created. |
MKFS_OPTIONS | additional options for the mkfs* command to create the filesysten on the loop device | The variable is only used when the virtual disk is created. | |
MOUNT_OPTIONS | additional options for the mount command to mount the filesystem on the loop device | ||
SELINUX_CONTEXT | the SELinux context used for new directories if the script can not read the SELinux context of an existing directory | u:object_r:system_file:s0 |
|
MOUNT |
mount binary to use |
$( which mount ) |
|
UMOUNT |
umount binary to use | $( which umount ) | |
LOSETUP |
losetup binary to use | $( which losetup ) | |
MKFS |
mkfs binary to use | $( which mkfs.${FILESYSTEM_TO_USE} ) | |
DD |
dd binary to use | $( which dd ) | |
UMOUNT_WAIT_TIME |
time in seconds to wait between umounting the
bind mounts and umounting the overlay mounts |
0 |
in some Android versions it's necessary to
wait some time between umounting the bind mount andumounting
the overlay mount. Set this variable to the number of
seconds the script should wait between these umounts. |