Finally, while Xiaomi has not released the Mac and Linux version of its bootloader unlock tool, a third-party alternative is available. Download the unofficial version of MIUI bootloader unlocking tool from the mirror link below. This unofficial version is compatible on all computer running Windows 8/8.1/10, any Linux distros (Ubuntu, Debian, CentOS), or Apple Mac OS.
Thanks to Fransisco an XDA community member who develops the tool. He has managed to extract the core function of the official Mi Unlock Tool. He then modded the codes to make it work on Unix-based computers.
However, this does not mean you can bypass the official permission. You will still need to obtain the official permit from Xiaomi Dev Team prior using the tool.
Moreover, the Oracle Java package is also essential (JavaFX for GUI if not included in your JDK/JRE). The tool won’t work flawlessly without these dependencies.
Download Mi Unlock Tool
You can grab the file from its official link hosted on Mega.nz here. Alternatively, you may also use the mirror link below. The mirror direct link below is hosted on the US and EU servers for better redundancy. Even better, it is a direct link that supports resume-able connections. It means the process will run smoothly either on a computer or an Android device.
You don’t have to understand how the stuff behind the tool works. However, you may find it interesting once you knew and how this tool is made possible.
The developer who shares this tool learned the mechanism of MIUI bootloader unlocking process. He explained that the original Mi Flash Unlock tool (for Windows) acts as a bridge between Xioami server, fastboot, and you with your Mi Account credentials. The actual part that conducts the unlocking task is actually fastboot.
The Mi Flash Unlock tool needs to fetch your device information. Next, it sends the information to the Xiaomi server with the account login token. Once received, the server checks whether all requirements are fulfilled. The requirements include whether the account has been authorized, whether the account associated (Mi Account binding) with the device in the Developer Settings and so on.
Once the server feels all the requirements are satisfied, it will reply back with the unlock key for your device instance. This instance key always changes everytime you reboot the phone.
The Mi Flash Unlock tool will then send the key to the device with a custom build of fastboot. Here’s then the magic happens: If the key is correct, the device bootloader will be unlocked. Otherwise, it will reboot.
All such nerdy stuff has encouraged Fransisco to create such a tool. He realizes that if he can replicate the mechanism, there is a possibility to do the mechanism on a Unix-based computer.
How to use
First thing first, you need to unzip/extract the actual tool. Moreover, make sure you have already had Java installed.
- Open a terminal window.
- Go to the extracted directory using cd command.
- Use this command “sudo ./MiUnlockTool.sh” for the GUI-based interface or “sudo ./MiUnlockTool.sh username password” for command-line interface.
On Apple Mac:
You just need to open (double click) the MiFlashUnlock.command file.
Alternatively, you can also do this on Terminal.
- Open the terminal window
- Go to the extracted directory using the cd command.
- Issue this command “./MiFlashUnlock.command username password“.
- Reboot your phone into the Fastboot mode.
- Connect your device with your Mac.
If you are using the command line version remember that there is no confirmation request before the unlocking process and there is no check if the bootloader is already unlocked.
Check also: How to unlock MIUI Bootloader on Windows.
Yeah, I know! It is not as simple as its Windows version. Since you are using Linux (or Mac), I assume you already understand the consequences, including the need to be a geek.
Here are some possible errors that might happen:
- Problem: A permission related error on Linux or Mac when launching the tool.
Workaround: Open the terminal and cd into the extracted directory. Next, use “chmod 777 MiUnlockTool.sh” on Linux or “chmod 777 MiUnlockTool.command” on Mac. This command is crucial to set the executable permission.
- Problem: The device isn’t recognized properly by your computer.
Workaround: Simply try re-launching the tool with sudo (sudo ./MiUnlockTool.sh on Linux, or sudo ./MiUnlockTool.command on a Mac)
- Problem: Other errors when launching the tool.
Workaround: Try issuing this command “java -jar bin/MiUnlockTool.jar“.
- Problem: Errors with JavaFX class not found when you try to launch the GUI.
Workaround: You are missing the JavaFX library. See openjfx package on Linux.
Despite some users found the tool quite messy, we think it is a useful tool still. At least it provides possibilities for Linux and Mac users to unlock the MIUI bootloader of their phones without the need to find a Windows PC.
Found a broken link? Write a comment below!