Read this in Tiếng Việt
A streamlined tool to automatically extract any desired .apk (such as Settings, Security, etc.) from Android OTA Payload ROMs. This project provides two parallel operation methods: a Docker version for the Linux ecosystem and a Native Windows (PowerShell) version that is extremely friendly for non-technical users.
- Independent multi-platform support: Run natively on Windows, natively on Linux, or via a Docker Container (Optimised for macOS).
- Automatically extracts
.zipROMs to getpayload.bin. - Supports targeted unpacking of any partition (
system,system_ext,product,vendor, etc.). - Auto-Download Engine: Automatically downloads
payload-dumper-goon Windows if it doesn't exist. - Smart recursive scanning to extract any specified APK dynamically, instantly renaming it based on the input ROM name:
{App_Name}_{codename}_from_{version}.apk - Smart system that automatically cleans up gigabytes of temporary virtual partition data immediately after extraction to save disk space.
Before running the tools, you need the official ROM file:
- Visit https://mifirm.net/.
- Search for your specific device.
- Download the Recovery ROM version. (Note: Must be a
.zipfile! Do not download the Fastboot ROM.tgzas it has a different structural layout without thepayload.bincore).
This method utilizes Windows PowerShell combined with the power of 7-Zip. You absolutely do not need Docker or virtual machine knowledge, and you won't have to worry about sudden C drive bloating.
- Windows 10/11 with Windows PowerShell.
- Mandatory: 7-Zip installed (Must be in the default location
C:\Program Files\7-Zip).
- Place your ROM
.zipfile in this same directory (do not extract). - Open Terminal / PowerShell and run the following command for 100% automation:
(By default, it extracts Settings.apk from the system_ext partition)
powershell.exe -ExecutionPolicy Bypass -File .\extract.ps1🔥 Advanced: Extracting Custom Apps You can extract any app by providing command arguments:
- Example - Extracting Settings app:
powershell.exe -ExecutionPolicy Bypass -File .\extract.ps1 -Partition "system_ext" -App "Settings.apk"
- Example - Extracting Security app:
powershell.exe -ExecutionPolicy Bypass -File .\extract.ps1 -Partition "product" -App "MIUISecurityCenterGlobal.apk"
(💡 Tip 1: If using Linux/macOS Native Bash, extract.sh script supports identical flags: ./extract.sh -p product -a MIUISecurityCenterGlobal.apk)
(💡 Tip 2: If you are typing this from Git Bash, make sure to change the backslash to a forward slash like ./extract.ps1)
The whole process of cracking the ROM -> Loading tool -> Extracting APK will run, and the final APK will be saved in the settings_apks/ folder. Temporary files will be deleted automatically.
If you are using Linux (Ubuntu, Arch, etc.), you can run the Bash script directly without having to set up Docker containers.
- A Linux operating system.
unzipinstalled andpayload-dumper-gobinary available in your$PATH.sudoprivileges (required to automatically mount the virtual Android partitions internally).
# Default extraction (Settings.apk)
./extract.sh
# Or extract a custom app like Security
./extract.sh -p product -a MIUISecurityCenterGlobal.apk
⚠️ Note for macOS users: Although Macs use Bash/Zsh natively, macOS does not natively support themountcommand for Android filesystems (ext4/erofs). Attempting to run this natively on macOS will fail. Please use Method 3 (Docker) below instead!
Uses a heavily isolated environment to avoid cluttering your host machine.
- Docker Desktop (WSL2 backend enabled).
- Make command utility (Available on Git Bash, Linux/macOS).
- Keep the
.zipfile in this directory. - Build and create the container image architecture (Type only once):
make build
- Execute the command to automatically find the zip file and extract
Settings.apk:make extract
🔥 Advanced: Extracting Custom Apps via Docker
Just like the Windows version, you can specify custom parameters and target different partitions/apps directly when calling make extract:
- Example - Specify a specific
.zipfile (if there are multiple in the folder):make extract ROM=your_rom_file.zip
- Example - Extract the Security app from the product partition:
make extract PARTITION=product APP=MIUISecurityCenterGlobal.apk
Besides extraction, the toolkit provides two in-depth inspection scripts to analyze the ROM payload before extracting:
This command lists all the available internal partitions inside your ROM's payload (e.g., boot, system, vendor, product, system_ext...).
powershell.exe -ExecutionPolicy Bypass -File .\list-partitions.ps1(To enforce a specific file, append -InputFile "filename.zip")
If you don't know the exact internal name or location of the app you're looking for, this script recursively scans a specific partition and outputs a text file list (e.g., Danh_Sach_APK_product.txt) for you to search through manually.
powershell.exe -ExecutionPolicy Bypass -File .\list-apks.ps1 -Partition "product"(Replace "product" with whichever partition you want to inspect).
Running Docker on Windows to extract virtual disks can easily cause the intermediate ext4.vhdx WSL file to bloat significantly without shrinking back down.
Grasp these secrets to clean up your system:
-
1. Delete all temporary/invisible files after ROM extraction (keeps the Apk):
make clean
-
2. Release all Cache occupied by Docker:
make prune
Hard shut down the WSL2 core to force Windows to free up RAM/Storage:
make shutdown
⚠️ The Ultimate DiskPart Trick to shrink C Drive: If your C drive has drastically lost tens of GBs, open PowerShell as Administrator, typediskpart> Select the file by typingselect vdisk file="path/to/ext4.vhdx"> Lock the drive by typingattach vdisk readonly> Finally, squeeze it by typingcompact vdisk. Your drive will be spacious again.