Metadata-Version: 2.4
Name: miflash
Version: 0.1.0
Summary: Flash Xiaomi fastboot ROMs on Termux, Linux, macOS, or Windows
Author: offici5l
License-Expression: MIT
Project-URL: Repository, https://github.com/MiForge/miflash
Keywords: xiaomi,miflash,fastboot,flash,bootloader,MIUI,HyperOS,Tools
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich
Dynamic: license-file

<div align="center">

# miflash

[![Version](https://img.shields.io/pypi/v/miflash?label=Version&labelColor=black&color=brightgreen)](https://pypi.org/project/miflash/)
[![Changelog](https://img.shields.io/badge/Changelog-blue?style=flat&logoColor=white)](CHANGELOG.md)

**Flash Xiaomi fastboot ROMs (`.tgz`) from Termux, Linux, macOS, or Windows.**

</div>

---

## Install

```bash
pip install miflash
```

## Usage

```bash
miflash
```

This scans the current directory (or `/sdcard` on Termux) for `.tgz` ROM archives
and already-extracted ROM folders, lets you pick one, extracts it if needed, lets
you pick a flash script, waits for a device in fastboot mode, then flashes it.

To scan a specific folder instead:

```bash
miflash /path/to/roms
```

`python -m miflash` works the same way.

## fastboot

`miflash` finds `fastboot` on its own — no manual setup needed:

- **Termux**: installs [termux-adb](https://github.com/nohajc/termux-adb) automatically (requires the [Termux:API](https://github.com/termux/termux-api/releases/latest) app)
- **Linux / macOS / Windows**: uses `fastboot` from `PATH` if present, otherwise downloads Google's official platform-tools

## Windows note

Only ROMs that ship `.bat` flash scripts are supported on Windows. If a ROM only
has `.sh` scripts, `miflash` will tell you and stop — it won't fall back to `bash`,
so there's no WSL or Git Bash dependency.

## License

Apache-2.0
