Last updated: November 29, 2026. Short answer: Xiaomi’s own Mi Unlock runs only on Windows. To unlock a Xiaomi, Redmi or POCO bootloader on a Mac, on Linux or from another Android phone, use MiUnlockTool, a free open-source Python tool (latest version 1.7.5, November 9, 2026). Install it with pip install miunlock, put the phone in Fastboot and run miunlock. It follows exactly the same official process as Mi Unlock: you still need unlock permission from the Xiaomi Community app, the account added in Mi Unlock status and the full waiting period. It does not bypass anything. The same developers also make miapply, which submits the Xiaomi Community permission request for you at the exact second the daily quota opens.
MiUnlockTool download
| Tool | MiUnlockTool by offici5l, now in the MiForge project |
| Latest version | 1.7.5, November 9, 2026 (fixes Error Code 10005: Invalid nonce param) |
| Runs on | macOS, Linux (Ubuntu, Debian, Fedora, Arch and others), Windows, Android through Termux |
| Needs | Python 3.7 or newer; a USB data cable (or USB OTG on Android) |
| Install | pip install miunlock (PyPI) |
| Source and docs | github.com/MiForge/MiUnlockTool (Apache 2.0) |
Use only the official sources. You sign in with your Xiaomi account, and search results are full of lookalike sites and repositories with similar names that promise to “bypass” the waiting time. The real tool is only on the GitHub page and PyPI above.
Compared with Mi Unlock, the project lists these differences: it runs on every platform instead of Windows only, it can save your login session, it offers SMS or email verification instead of SMS only, and the Xiaomi server region (dataCenterZone) is detected automatically or can be set by hand (README).
Before you start
- Unlocking erases the phone and, as the project’s own guide warns, removes the phone’s security protection. Back up everything first. MiUnlockTool tells you whether your data will be wiped before it continues; only a few old phones (codenames
gemini,ido,kate,kenzo,land,markw,meri,mido,nikel,omega,prada,rolex,santoni,venus,wt88047) unlock without a wipe. - On HyperOS you need permission from Xiaomi Community first. Apply in the Xiaomi Community app, then wait for approval. The full process, requirements and the daily quota are in our HyperOS bootloader unlock guide.
- Add your account in Mi Unlock status: enable Developer options (tap the OS version or build number 7 times), then open Settings → Additional settings → Developer options → Mi Unlock status and tap Add account and device.
- Account and phone region must match. A Chinese phone needs a Chinese Xiaomi account, a global phone a global one (error 20045 below). Since 2025 one account can unlock only one device per year.
How to install MiUnlockTool on a Mac
Following the project’s installation guide:
- Install Python from python.org or with Homebrew:
brew install --cask python - Create a virtual environment (any name) and activate it. The default macOS shell is zsh:
python3 -m venv miunlock-env source miunlock-env/bin/activate - Install the tool:
pip install miunlock
The tool is available only in the terminal window where you activated the environment. Next time, run source miunlock-env/bin/activate again before miunlock. To update later: pip install -U miunlock.
How to install MiUnlockTool on Linux
- Install Python with your distribution’s package manager:
# Ubuntu / Debian sudo apt install python3 python3-venv # Fedora sudo dnf install python3 # Arch Linux sudo pacman -S python - Create and activate a virtual environment. For bash and zsh:
With fish usepython3 -m venv miunlock-env source miunlock-env/bin/activatesource miunlock-env/bin/activate.fish, with tcshsource miunlock-env/bin/activate.csh. Runecho $SHELLif you’re not sure which shell you have. - Install the tool:
pip install miunlock.
How to install it on Android (Termux)
You can unlock one phone from another Android phone connected with a USB OTG cable.
- Install Termux and Termux:API from the same source (for example both from GitHub; don’t mix GitHub and other stores).
- Install Python and the tool:
The project also has a one-line installer:pkg install python-pip pip install miunlockcurl -sS https://raw.githubusercontent.com/MiForge/MiUnlockTool/main/.install | bash. - Fastboot for Termux (termux-adb) installs itself the first time you run
miunlock.
The phone running Termux must support USB OTG, and OTG must be on. If you prefer a normal app instead of a terminal, MiUnlockApp does the same on Android.
On Windows, Mi Unlock is the usual choice (Mi Unlock download and guide), but MiUnlockTool works there too: install Python with winget install python (tick “Add Python to PATH” in the installer), then pip install miunlock.
How to unlock the bootloader with MiUnlockTool
- Make sure the Xiaomi Community permission is approved and your account is added in Mi Unlock status on the phone.
- Turn the phone off, hold Power + Volume Down until you see Fastboot (not fastbootd), and connect it to the computer.
- Run:
(if the command isn’t found,miunlockpython -m miunlockalso works since version 1.7.3). - Choose the login method and sign in with the same account you added in Mi Unlock status. Confirm the code you get by SMS or email.
- The tool tells you whether the phone will be wiped. Follow the prompts. If Xiaomi’s server accepts the request, the phone reboots unlocked; otherwise you get an error code (see below).
After unlocking, the phone resets. Keep your Xiaomi account password at hand for the setup. What to do next (root, custom ROMs, going back) is in our unlock guide.
How it works
From the project’s technical notes: the tool reads the phone’s deviceToken (fastboot getvar token) and sends it to Xiaomi’s server. If the account meets every requirement, including the waiting period, the server signs it with Xiaomi’s private key and returns it as encryptData. The tool sends this to the phone with fastboot stage and runs fastboot oem unlock; the phone checks the signature with the public key built into its firmware. The token contains random data that changes on every reboot, so a signature can’t be reused after the phone restarts. That’s why no tool can unlock without Xiaomi’s approval.
miapply: submit the Xiaomi Community request automatically
On HyperOS, Xiaomi accepts only a small number of unlock applications each day, and the quota opens at exactly 00:00 Beijing time (GMT+8). miapply (MiCommunityTool, version 1.0.2, November 25, 2026) sends your request at that moment (README):
pip install miapply
miapply
It asks for a delay in milliseconds: the goal is for the request to reach Xiaomi’s server exactly at 00:00, so the best value depends on your network. The developers mention values such as 2500, 1000 or 200 ms and say you may need to experiment; luck still matters. Their advice:
- Don’t switch between Wi-Fi and mobile data near the reset time, and turn off VPNs, proxies and custom (private) DNS. Xiaomi flags network changes as suspicious and may block the account temporarily with “Account Error Please try again after MM/DD”.
- On Termux, set its battery and data usage to Unrestricted and run
termux-wake-lock(or tap Acquire wakelock in the Termux notification) so the system doesn’t stop it. On a PC, make sure it doesn’t go to sleep. - Use it for one account only.
Common errors and fixes
From the project’s error code reference. The same codes appear in Xiaomi’s Mi Unlock.
| Code | Message | What to do |
|---|---|---|
| 10000 | Request parameter error | Restart the tool and make sure you have the latest version. |
| 10005 | Invalid nonce param | Update to 1.7.5 or newer: pip install -U miunlock. |
| 10013 | Device not activated / activated less than 7 days / activation time too short | Turn off custom DNS, move the SIM to the other slot, turn Find device off and on, enable Call history and Messages sync in Xiaomi Cloud over mobile data, re-add the account in Mi Unlock status. If it says to wait, wait out the time shown. |
| 10023 | Couldn’t unlock more devices | The account already unlocked a device this year: use another account or wait a year. |
| 20030 | Couldn’t unlock more devices by this account this month | Wait until the 1st of next month. |
| 20031 / 30002 | Add your account in Mi Unlock status / apply in Mi Community | Add the account in Developer options → Mi Unlock status. If it’s already there, set dataCenterZone manually in the tool. |
| 20033 | Your account is not authorized to unlock | Xiaomi restricted the account. Try turning on Find device; otherwise use a new account. |
| 20036 | Please unlock *** hours later | The normal waiting period. Don’t re-add the account in Mi Unlock status, or the wait starts over. If the time doesn’t go down or resets to 144 hours, the account is suspended. |
| 20038 | Phone locked by Find device | Sign in to that account at i.mi.com and turn off Find device for the phone. |
| 20041 | Mi ID not associated with a phone number | Add a phone number to the Xiaomi account. |
| 20045 | Use the common tool / account region doesn’t match the phone | Change dataCenterZone, or use an account from the same region as the phone (Chinese phone → Chinese account). |
Phone not detected or stuck? Check that it’s in Fastboot and not fastbootd, try another cable (preferably the original), unplug and replug, and remove other ADB/Fastboot installs so miunlock uses its own. On Termux, make sure OTG is enabled. On Windows, install the Xiaomi or Google USB driver (see our ADB, Fastboot and USB driver guide).
FAQ
Can I unlock a Xiaomi bootloader on a Mac?
Yes. Xiaomi’s Mi Unlock is Windows-only, but MiUnlockTool runs on macOS: install Python, create a virtual environment, run pip install miunlock and then miunlock with the phone in Fastboot.
Does MiUnlockTool work on Linux?
Yes, on Ubuntu, Debian, Fedora, Arch and other distributions with Python 3.7 or newer. The steps are the same as on a Mac; only the Python install command differs.
Can I unlock the bootloader without a PC?
Yes, from a second Android phone: install Termux and Termux:API, then pip install miunlock, and connect the Xiaomi phone with a USB OTG cable. MiUnlockApp does the same as a regular app.
Does MiUnlockTool skip the waiting time?
No. It uses the same official process as Mi Unlock, so you still need Xiaomi Community approval on HyperOS and the full waiting period. Tools or sites that promise to bypass it are fake.
Is MiUnlockTool safe?
It’s open source (Apache 2.0), and the unlock itself is the same signed process as Xiaomi’s tool. Since you sign in with your Xiaomi account, install it only with pip install miunlock or from the official GitHub repository, not from lookalike sites.
Will unlocking erase my phone?
On almost all phones, yes. The tool tells you before it continues. Only a few old models listed above unlock without a wipe.
How do I fix “Error Code 10005: Invalid nonce param”?
Update the tool with pip install -U miunlock. Version 1.7.5 fixes it.
Sources: MiUnlockTool README, INSTALL.md, FAQ, unlock guide, encryptData notes, error code reference and release notes (github.com/MiForge/MiUnlockTool); miapply README (github.com/MiForge/MiCommunityTool); PyPI (miunlock 1.7.5, miapply 1.0.2). Checked November 29, 2026.
Xiaomi firmware & news on Telegram
New firmware, HyperOS 4 rollout updates, guides and Xiaomi news, all in one channel.

