Create flashable firmware zip from MIUI and HyperOS Recovery ROMs!
Project description
Xiaomi Flashable Firmware Creator
Create flashable firmware zip from MIUI and HyperOS Recovery ROMs!
Xiaomi Flashable Firmware Creator is a tool that generates flashable firmware-update packages from official MIUI and HyperOS ROMS.
It supports creating untouched firmware, non-arb firmware, firmware + vendor flashable zip, and firmware-less ROMs from any local zip file or direct link of the zip file.
Requirements
This tool requires the following dependencies to be installed on your system:
- payload-dumper-go: Used for extracting Android OTA payload files. Install using your system package manager or from releases.
- xz: Required for payload decompression.
Installing xz
Linux and macOS (From package manager, recommended):
- Ubuntu/Debian:
sudo apt install xz-utils - CentOS/RHEL/Fedora:
sudo yum install xzorsudo dnf install xz - Arch Linux:
sudo pacman -S xz - openSUSE:
sudo zypper install xz - macOS (Homebrew):
brew install xz - macOS (MacPorts):
sudo port install xz
Windows:
- Download the latest XZ Utils for Windows from tukaani.org/xz/
- Extract the downloaded archive to a directory on your system
- Add the directory containing
xz.exeto your system's PATH environment variable
Verify installation: Run xz --version in your terminal to confirm xz is properly installed.
Note: Working on a SSD is highly recommended for performance reasons when processing large payload files, as HDDs can be a bottleneck.
Installation
You can simply install this tool using uv.
uv install xiaomi_flashable_firmware_creator
CLI Usage
xiaomi_flashable_firmware_creator [-h] (-F FIRMWARE | -N NONARB | -L FIRMWARELESS | -V VENDOR) [-o OUTPUT]
Examples:
- Creating normal (untouched) firmware:
xiaomi_flashable_firmware_creator -F [ROM ZIP]
- Creating non-arb firmware (without anti-rollback):
xiaomi_flashable_firmware_creator -N [ROM ZIP]
- Creating firmware-less ROM (stock untouched ROM with just firmware removed):
xiaomi_flashable_firmware_creator -L [ROM ZIP]
- Creating firmware + vendor flashable zip:
xiaomi_flashable_firmware_creator -V [ROM ZIP]
Using from other Python scripts
from xiaomi_flashable_firmware_creator.firmware_creator import FlashableFirmwareCreator
# initialize firmware creator object with the following parameters:
# input_file: zip file to extract from. It can be a local path or a remote direct url.
# process: Which mode should the tool use. This must be one of "firmware", "nonarb", "firmwareless" or "vendor". (See CLI Usage for more details)
# out_dir: The output directory to store the extracted file in.
firmware_creator = FlashableFirmwareCreator(input_zip, process, output_dir)
# Now, you can either use auto() method to create the new zip file or do stuff at your own using firmware_creator public methods.
new_zip = firmware_creator.auto()
Development
This project uses several tools to streamline the development process:
mise
mise is used for managing project-level dependencies and environment variables. mise helps ensure consistent development environments across different machines.
To get started with mise:
- Install mise by following the instructions on the official website.
- Run
mise installin the project root to set up the development environment.
This file is automatically loaded by mise and allows you to customize your local development environment without modifying the shared configuration files.
UV
UV is used for dependency management and packaging. It provides a clean, version-controlled way to manage project dependencies.
To set up the project with UV:
- Install UV using mise, or by following the instructions on the official website.
- Run
uv syncto install project dependencies.
Development Tools
For development, this project uses additional tools managed by mise:
- payload-dumper-go: Automatically managed by mise when you run
mise install.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xiaomi_flashable_firmware_creator-2.3.1.tar.gz.
File metadata
- Download URL: xiaomi_flashable_firmware_creator-2.3.1.tar.gz
- Upload date:
- Size: 260.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1257bb4ccc735c828061cc176ccbe38c53135a8216e36425a6863a248fac751
|
|
| MD5 |
1c86b2832124a3431caca7adee6233fd
|
|
| BLAKE2b-256 |
e9215411daddc87891a53eb062c0498a5b127bcfe04f3cafb9762d3c644a195b
|
File details
Details for the file xiaomi_flashable_firmware_creator-2.3.1-py3-none-any.whl.
File metadata
- Download URL: xiaomi_flashable_firmware_creator-2.3.1-py3-none-any.whl
- Upload date:
- Size: 280.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
880f6c0b3a38f14f778ace5f579bc21fb57cf7f327121595276a3e4a5363cfd0
|
|
| MD5 |
9af8ca95e9b946786390f32ad62ca205
|
|
| BLAKE2b-256 |
7fa8bb180ca1061c9debeea5668d24e5ecc13e86443c70ac07ad69497337fa74
|