Guide: Using Super Image Tool for GSI on Devices with a Super Partition

Introduction

Installing a GSI (Generic System Image) on devices like the F21 or Pixel, which feature a single super partition instead of separate system, product, and vendor partitions, can be particularly challenging. The available documentation is often limited, making troubleshooting even more difficult.

Previously, tools like lpunpack or lpmake were required, but they could be complex, error-prone, and Linux-exclusive. Enter the Super Image Tool — a streamlined, efficient, and easier solution!


:star2: Features

The Super Image Tool, delivered as a Magisk module, automates tasks such as unpacking, editing, and repacking partitions, with advanced capabilities including:

  • Backup and unpacking of the super partition.
  • Splitting and repacking the super image.
  • Partition resizing for GSI installation.
  • System debloating (removing unnecessary system apps).
  • Converting the system to read/write mode.
  • Disabling encryption (decrypt).

:one: Preparation

Download the Required Files:

  • Super Image Tool Module: Download here
  • Optional: MT Manager (for advanced manual edits).

Running the Tool:

  1. Install the module via Magisk.
  2. Open a terminal or use ADB to launch the tool:
    adb shell
    su -c super
    

:two: Main Menu Options

Once the tool is running, you’ll see the following options:

  1. Unpack Super – Unpack the super partition.
  2. Edit Partitions & Repack Super – Modify partitions and prepare for repackaging.
  3. Disable Verity/VBMeta – Disable verification and encryption checks.
  4. Clean Folder Projects – Remove temporary module files.
  5. Quit – Exit the tool.

:three: Unpacking the Super Partition

  • Choose Option 1 (Unpack Super) to extract the super partition.
  • Extracted files will be saved in:
    /data/local/Super_Image/UNPACKED/
    

:four: Editing Partitions

After unpacking, return to the main menu and choose Option 2 (Edit Partitions & Repack Super). Here, you can perform advanced modifications:

Key Options:

  1. Automatic Debloat

    • Removes unnecessary system apps.
    • Customize /data/local/Super_Image/SUPER_BIN/debloat.txt to specify package names for removal.
  2. Manual Debloat (Console)

    • Interactive terminal-based file browsing and removal.
  3. Manual Debloat (MT Manager)

    • Use MT Manager to edit files with the generated mount.sh and umount.sh scripts.
  4. Fix Overlay RW

    • Removes read/write restrictions for Xiaomi devices.
  5. DFE Decrypt

    • Disables encryption on the device.
  6. Adjust & Compile Super Image

    • Resize partitions and allocate free space. The tool calculates the available space automatically.

:five: Repacking the Super Partition

After making your changes, select Option 6 (Adjust & Compile Super Image):

  • If an error occurs regarding missing partitions (e.g., system_b or vendor_b), create empty files (e.g., .txt) and rename them accordingly.
  • Choose No for sparse format unless necessary.
  • For additional space allocation, select system_a.

The new image will be saved in:

/data/local/Super_Image/FILES/SUPER/repacked_super_rw.img

:warning: Notes and Troubleshooting:

  1. Negative Free Space: If you encounter negative space (e.g., -300MB), perform debloating and retry.
  2. VBMeta/Verity Issues: Use Option 3 to disable and fix these files.

:sparkles: Best of luck with your modifications! Let us know if you encounter any issues or need further assistance.

1 Like