A versatile script for unpacking and repacking Android system images on Linux. It supports various filesystems like EXT4, EROFS, and F2FS, and meticulously preserves file attributes such as xattrs, contexts, ownership, and permissions.
This script provides an interactive, menu-driven interface to simplify the process of modding Android images.
- Interactive Menu: Easy-to-use menu for unpacking, repacking, and cleaning.
- Multiple Filesystem Support: Works with EROFS, EXT4, and F2FS images.
- Archive Support: Can unpack various archive formats including
.tar,.zip,.7z, and.lz4. - Attribute Preservation: Correctly handles and restores SELinux contexts, file permissions, and ownership.
- Dependency Checker: Automatically checks for required tools and offers to install them on Debian-based systems.
- Workspace Management: Keeps source images, extracted files, and repacked images organized in separate directories.
A versatile script for unpacking and repacking Android system images on Linux. It supports various filesystems like EXT4, EROFS, and F2FS, and meticulously preserves file attributes such as xattrs, contexts, ownership, and permissions.
This script provides an interactive, menu-driven interface to simplify the process of modding Android images.
- Interactive Menu: Easy-to-use menu for unpacking, repacking, and cleaning.
- Multiple Filesystem Support: Works with EROFS, EXT4, and F2FS images.
- Archive Support: Can unpack various archive formats including
.tar,.zip,.7z, and.lz4. - Attribute Preservation: Correctly handles and restores SELinux contexts, file permissions, and ownership.
- Dependency Checker: Automatically checks for required tools and offers to install them on Debian-based systems.
- Workspace Management: Keeps source images, extracted files, and repacked images organized in separate directories.
- Place your images: Copy the image files you want to unpack into the
original_imagesdirectory. - Run the script: Execute the main helper script with root privileges:
sudo ./erofs-helper.sh
- Choose an option from the menu:
- Unpack an image: Select an image file from the
original_imagesdirectory to extract. The contents will be placed in a new folder inside theextracted_imagesdirectory. - Repack a directory: Choose a directory from
extracted_imagesto repack into a new image. You will be prompted to select the output filesystem (EROFS or EXT4) and compression options. The new image will be saved in therepacked_imagesdirectory. - Clean All (Danger): Deletes the contents of the
original_images,extracted_images, andrepacked_imagesdirectories to provide a clean workspace. - Exit: Closes the script.
- Unpack an image: Select an image file from the
For F2FS filesystem support, you may need to load the kernel module first:
sudo modprobe f2fs- Original scripts by @ravindu644
- Enhancements and interactive menu by @deuxielll
erofs-utilsby the EROFS team
