Developed to retrieve encryptData(token)
for Xiaomi devices to unlock the bootloader.
Compatible with all platforms.
MiUnlockTool is a Python-based utility designed to unlock Xiaomi devices using browser session authentication. This tool simplifies the bootloader unlocking process by automating token retrieval and device communication.
- 🔓 Automated bootloader unlocking process
- 🌐 Browser-based authentication
- 🖥️ Cross-platform compatibility (Windows, Linux, macOS)
- ⚡ Automatic platform-tools (fastboot) download
- 📱 Support for all Xiaomi devices
- Python 3.6 or higher
- Platform-tools (fastboot) - automatically downloaded if not found
- Active Xiaomi account
- Device in bootloader/fastboot mode
-
Clone the repository:
git clone https://github.com/rafliiar17/MiUnlockTool-Arch cd MiUnlockTool -
Set up virtual environment and install dependencies:
python -m venv venv && source venv/bin/activate python -m pip install -r requirements.txt
-
Make the script executable and run:
chmod +x MiUnlockTool.py python MiUnlockTool.py
- Boot your Xiaomi device into fastboot/bootloader mode
- Connect your device to the computer via USB
- Run the MiUnlockTool script
- Follow the on-screen instructions
- Authenticate using your browser when prompted
- Wait for the unlocking process to complete
- ⚡ Unlocking the bootloader will erase all data on your device
- 🔒 Ensure you have backed up important data before proceeding
- ⏰ Some devices may have a waiting period before unlocking is allowed
- 🛡️ Unlocking may void your device warranty
Encountering errors? Check our comprehensive error codes documentation:
This tool has been successfully tested on:
| Component | Specification |
|---|---|
| 🖥️ Operating System | Linux 6.17.3-3-cachyos |
| 🐍 Python Version | Python 3.13.7 |
| 📱 Test Device | Redmi Note 8 4/64 (GINKGO) |
| 👤 Tester | @rafliiar17 |
✅ Status: Confirmed working on the above configuration
Contributions are welcome! Feel free to:
- 🐛 Report bugs
- 💡 Suggest new features
- 🔧 Submit pull requests
- 📖 Improve documentation
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Made with ❤️ for the Xiaomi community