Skip to content

About

A simple command-line tool to find and install the latest ROMs on Xiaomi devices

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

39 Commits

Folders and files

Repository files navigation

MiTool-CLI

A fast, cross-platform CLI utility for searching, downloading, and flashing Xiaomi firmware.

C++ Platform License: GPLv3 GitHub Repo stars

Features

  • 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

Usage

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

Commands

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

Build

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 build

The binary will be available at build/bin/mitool.

License

Distributed under the GNU GPLv3 license.

About

A simple command-line tool to find and install the latest ROMs on Xiaomi devices

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages