A fast, cross-platform CLI utility for searching, downloading, and flashing Xiaomi firmware.
- Search firmware by device codename and OS version
- Cross-platform: Windows and Linux
- Simple one-command build with Conan + CMake
Planned:
- Download firmware directly from Xiaomi servers
- Flash firmware to device via fastboot/ADB
mitool find --os-version <version> --device <codename> [--download]
mitool utils --parse-version <version>
mitool utils --verify-md5 <file> <md5>
mitool install --file <firmware.zip> [--md5 <md5>] [--mode auto|recovery|fastboot]Example:
mitool find --os-version OS2.0.5.0.VMUMIXM --device xun| Command | Argument | Description |
|---|---|---|
find |
--os-version |
OS version currently installed on the device |
find |
--device |
Device codename |
find |
--download |
Download the found firmware to rom_downloads/ |
utils |
--parse-version |
Parse a firmware version string |
utils |
--verify-md5 |
Check a file against an expected MD5 (<file> <md5>) |
install |
--file |
Path to the firmware file |
install |
--md5 |
Expected MD5 of the file (optional) |
install |
--mode |
auto (default), recovery or fastboot — flashing itself is not implemented yet |
Requirements: C++20 compiler, Conan, CMake
# Install Conan
pip install conan
# Detect build profile
conan profile detect
# Install dependencies
conan install . -of=build --build=missing
# Configure and build
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake
cmake --build buildThe binary will be available at build/bin/mitool.
Distributed under the GNU GPLv3 license.