- Mi Unlock Tool for Mac and Linux
- Download Mi Unlock Tool
- Nerdy FYI
- How to use
- Our Verdict
- [TOOL][WIN/LIN/MAC] MiUnlockTool — Unlock bootloader of xiaomi devices on mac & linux
- Breadcrumb
- franztesca
- Разблокировка загрузчика смартфонов Xiaomi на Linux’е с использованием VM и Windows
- Что же такое загрузчик?
- Разблокировка загрузчика:
Mi Unlock Tool for Mac and Linux
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.
Nerdy FYI
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.
On Linux:
- 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.
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.
Our Verdict
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.
Источник
[TOOL][WIN/LIN/MAC] MiUnlockTool — Unlock bootloader of xiaomi devices on mac & linux
Breadcrumb
franztesca
Member
[TOOL][WIN/LIN/MAC] MiUnlockTool — Unlock bootloader of xiaomi devices on mac & linux
Ciao xda users, I’m here to introduce a new tool of mine, MiUnlockTool.
MiUnlockTool is an unofficial tool used to unlock bootloader on Xiaomi devices. This tool is copied from the original windows MiFlashUnlock tool and works the same way. The main feature of this tool is compatibility with linux and mac operating system (and windows too).
If you want more information about the tool and the story behind you can read below, if you just want the download link, here it is:
DOWNLOAD LINK
Requirements: java (javafx for gui if not included in your jdk/jre)
Usage:
— Download and extract the zip file
— If you don’t have it, install java
— On windows:
— open MiFlashUnlock.bat for graphical interface or:
— open a cmd windows and cd into extracted dir and use «MiUnlockTool.bat username password» command for command-line usage
— On linux:
— open a terminal window and cd into extracted dir and use «sudo ./MiUnlockTool.sh» command for gui interface or «sudo ./MiUnlockTool.sh username password» for command-line
— On mac:
— open (double click) MiFlashUnlock.command for graphical interface or
— open a terminal window and cd into extracted dir and use «./MiFlashUnlock.command username password» for command-line
— Attach your locked device in fastboot mode.
— If you are using gui just follow what you see on your screen
— If you are using command line version remember that there is no confirmation request before unlock and no check if the bootloader is already unlocked.
Possible errors:
— If you get a permission related error on linux or mac when launching the tool, open a terminal and cd into extracted dir and use «chmod 777 MiUnlockTool.sh» (or MiUnlockTool.command on mac) to set the executable permission.
— If your device isn’t recognized:
— On windows: install adb drivers
— On linux/mac trying launching the tool with sudo (sudo ./MiUnlockTool.sh on linux or sudo ./MiUnlockTool.command on mac)
— Other problems launching the tool: try running «java -jar bin/MiUnlockTool.jar» command
— If you get some errors with javafx class not found stuff when you try to launch the gui, then you are missing javafx library. See openjfx package on linux.
— Any other problem: provide feedback in the comments.
Additional info: original MiFlashUnlock tool is just a bridge between fastboot, you (and your account login credentials) and xiaomi server: the tool gets device info from the device and send them to the server together with the account login token, the server checks wherever you satisfy all their requirements (account authorized, account associated with device in developer settings etc) and if everything is okay the server reply with the unlock key for your device instance (every time you reboot your phone you need a new key). Then the tool send the key to the device with a custom build of fastboot and if the key is right then the device is unlocked, else it reboots. After I discovered all the process behind the original unlock tool (and all the security encryption techniques) I decided to replicate it with a java (cross-platform) tool which embeds a custom fastboot version and replicates what the original tool does. That’s a simple explaination of how my tool works (obviously it’s more complicated than that).
This tool requires all of what is required by the original tool (an authorized xiaomi account binded to the device through developer options for three days if I remember correctly).
FAQs:
— Is this tool safe to use?
Yes, the main part is communication between tool and server, a safe thing. Also the unlock procedure itself is safe: or the key is correct or it is not. In both cases the device will not be damage.
— How did you find out how to replicate the original tool?
Thank you for your question. It’s been a bit difficult since the original tool has been obfuscated and virtualized (protected against reverse engeneering) with a powerful protector: VMProtect. I’ve spent some time to reverse it (and custom fastboot too) and I finally did it. I will not explain in details how I did it.
— Is this tool more powerful than the original on? why should I use it on Windows?
Absolutely not, my tool is worst than the original one (it will have more bugs and on windows it doesn’t manage drivers for example), that’s why you should NOT use it on Windows. I made it work even with Windows because it was very simple to do. You can use it one Windows just to test it if you like, but I recommend using the better original tool MiFlashUnlock.
— Wow, you did a tool already done by developers paid by xiaomi, who is paying for the effort you put into this?
No one, I try to help people and getting appreciation for my work is a bit of a reward to me, but if you want to show your gratitude even more and support me as a developer you can make a donation, I will appreciate that even more (donation link below)
— I have to put my xiaomi account credentials, should I trust this?
I’m the developer of XiaoMiTool, I hope that a little bit of my reputation together with the hopefully good early feedback of reckless users on this tool is enough. If you are more a geek you can track the traffic and see that the only server connected are xiaomi and miui.
— I wanted too see the source of this tool but I see it is a bit obfuscated, why?
Xiaomi clearly doesn’t wanted people to see how MiFlashUnlock works (since they obfuscated it a lot), I don’t want to disrespect xiaomi decision by releasing the source plain, so I decided to obfuscated it a bit just to make it a bit harder to see (even if my tool is 100 times easier to reverse than the original)
— Can I share this tool?
Of course yes, but I would like you to share it using the xiaomitool.com link (not mega.nz one) so that if I release an update new people will get that and not the old version (there is no tool update enginge built in).
— You’re english is not wonderful.
I know, hopefully it is understandable enough
Feedback.
I love feedback, feedback is the best you can do to help me improving this tool. I have not time to answer everybody’s questions but I generally read feedback and do my best to make the tool work. If the tool worked or if the tool didn’t worked you can write it in the comments, adding additional information like what error you get, what screen you see when the tool get stuck or even what you tried to solve the problem are precious to me. I have not all of xiaomi devices, I fully ested my tool only with two devices (a redmi 4x and a mi note 2) and only on two operating systems (linux and windows), so any new combination could lead to new errors or problems. Please include also your operating system when leaving feedback. Sometimes there are problems on gui which are not on command-line version, so if the tools fails launching or when using gui I suggest trying the command-line version.
Donation: free software is great from users prospective, but developers who spend hours of their time and don’t get money for it are more unhappy to develop further free tools, so if you liked the tools and it saved you from the need to do 5000 kilometers to get a windows pc, or from the need to download a virtual machine image with your 32kB internet connection, you can show your gratitude by offering me a tasty, cold beer by clicking the link below
DONATION LINK
Download: you missed the download link at the top? Here it is again:
DOWNLOAD LINK
Источник
Разблокировка загрузчика смартфонов Xiaomi на Linux’е с использованием VM и Windows
В последнее время в обширное использование пошли смартфоны от китайского производителя Xiaomi. Все у них шикарно, вот только загрузчик заблокирован. а это означает, что ни каких вам модификаций, патчей, root-прав. Но не все так плохо, как кажется.
Я когда начал юзать смартфон Xiaomi, скрипя зубами терпел весь этот гугловский софт и навязчивое предложение завести аккаунт у Xiaomi. Последний кстати пригодился один раз. Покопавшись в интернетах и почитав много нужной и не очень информации, мною было принято решение: разблокирую загрузчик, уйду на кастомную прошивку, прощай гугл и Xiaomi-сервисы! Было решено. но вот только на моем аппарате был по умолчанию разблокирован загрузчик. Что пошло мне на руку. Ну а Вам я расскажу, как разблокировать загрузчик на данных аппаратах. Итак, начнем:
Что же такое загрузчик?
Загрузчик в Android — это встроенное средство загрузки операционной системы. Если привести в пример компьютерные терминалы с несколькими установленными «операционками» (скажем, Windows и Linux), загрузчик после включения стационарного блока или ноутбука предлагает юзеру вход в систему на выбор, а после подтверждения загружает ту или иную ОС. Равно как и в стационарных системах, загрузчик в мобильных девайсах обращается к инициализационным файлам по типу того, как это делает, например, Windows при загрузке параметров из файла boot.ini. Если обратить внимание именно на такие данные, нетрудно сделать вывод, что в Android-системах запросто можно изменить не только способ загрузки, но и загружаемую ОС либо в ручном, либо в автоматическом режиме. Однако мало кто знает, что сам этот инструмент загружает исключительно ту систему, которая написана под определенную модель смартфона или планшета.
Разблокировка загрузчика:
1) Подача заявки
Я уже писал статью о разблокировке загрузчиков на Android девайсах. прочитать можно тут: ТЫЦ. Однако разблокировка загрузчиков на смартфонах Xiaomi заслуживает отдельного обсуждения.
Начинаем разблокировку с подачи заявки разработчику.
Заходим на англоязычный сайт: ТЫК
Нажимаем на кнопку Unlock Now
Вводим данные своего Mi-Аккаунта. Авторизуемся. Попадаем на страницу подачи заявки. Все поля заполняем на английском языке. В графе причины для разблокировки можно указать: Для установки локализованной версии прошивки. Под формой ставим галочку и жмякаем подтверждение. Попадаем на следующую страницу и ждем смску с кодом, которая придет на указанный Вами номер при заполнении. Вводим код. Заявка подана. Ответ придет смкой в течении 3х дней.
Вот наконец получили ответ от разработчика. Одобрили. Приступаем:
1) Установка эмулятора.
Возьмем, чтоб не скучно было, qemu.
Источник