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.
Источник
How to Unlock Xiaomi Devices on Linux and Mac
Owners of Xiaomi devices who want to flash and unlock their devices have the official MiFlashUnlock tool available to them – however, it does not run on Linux. The MiFlashUnlock software can be ran inside Wine or a VM, but there exists a better way.
MiUnlockTool is an unofficial tool based on MiFlashUnlock, which runs natively on Linux (but can also be installed on Mac and Windows). MiUnlockTool is a bridge between fastboot, your Xiaomi credentials, and the Xiaomi server. It retrieves your device info and sends it to the Xiaomi server together with your login token, then checks if you meet all the requirements to receive an unlock key from the server.
The tool will then send the unlock key to your Xiaomi device utilizing a custom build of fastboot. There are no different requirements for receiving an unlock key via MiUnlockTool compared to MiFlashUnlock – you require an authorized Xiaomi account tied to the device through Developer Options.
Requirements
Linux Users
- Download the MiUnlockTool, it comes in a .zip file.
- Open your terminal and CD to the extracted directory.
- In the terminal, type “sudo ./MiUnlockTool.sh”, which will launch the GUI interface. Alternatively, you can use “sudo ./MiUnlockTool.sh username password” for a command-line interface.
Windows and Mac Users
- After extracting the .zip file, launch MiFlashUnlock.bat for a graphical interface.
- Alternatively you can open a command prompt, CD to the extracted directory, and type “MiUnlockTool.bat username password” for a command-line interface.
After you have launched the MiUnlockTool in whatever OS you’re using, connect your Xiaomi device to your computer while it is in Fastboot Mode.
If you launched the GUI mode, follow the on screen directions. If you are using the command-line interface, there won’t be a confirmation request before unlocking, nor will it check if the bootloader is already unlocked.
Troubleshooting
- If you receive permission errors on Linux or Mac when launching the MiUnlockTool, you need to open a terminal and CD to the extracted directory.
- Then grant it 777 permissions using “chmod 777 MiUnlockTool.sh” (or MiUnlockTool.command on Mac), which will set the proper permissions.
- If you have problems launching the tool even with the Sudo command, you can try the command “java -jar bin/MiUnlockTool.jar”.
- If you encounter errors with JavaFX class not being found, you are missing JavaFX library from your package. Check the OpenJFX package on Linux.
Final Notes
This tool is absolutely safe to use, as is the unlock procedure. Your Xiaomi device will not be damaged, even if the MiUnlockTool attempts an incorrect unlock key.
However, Windows users should probably stick to the official Xiaomi unlock tool. Because MiUnlockTool is a third-party copy built more specifically for Linux users, it can have additional bugs, and Windows will not manage the drivers for example. So MiUnlockTool does work on Windows, its just not recommended.
Источник
Разблокировка загрузчика mi
Здравствуйте,сегодня у меня опять проблема с отсутствием программ под линукс и тут куда сложнее дело обстоит.
Дело в том,что мне нужен Windows,чтобы запустить программу(Mi Flash Unlock),которая разблокирует загрузчик телефона через usb,но вот незадача — на Линукс с wine она не видит устройства. Была идея скачать адаптированную программу под Линукс,но она не заработала и есть шанс подцепить вирус. Дальше я захотел сделать это через Oracle Virtual Box,но вот незадача — оно не видит usb подключение.Вопрос — как сделать,чтобы виртуальная машина напрямую работала со всеми usb портами или как быть?
Ставить на жёсткий диск винду не охота — уже стоит линукс и не хочу его опять переустанавливать и переносить данные,тем более я не думаю,что безопасно ставить пиратскую винду рядом с Линуксом. Есть флешка на 32 гига,но… я думаю мало чем поможет,на остальные носители неразумно ставить и у меня один встроенный жёсткий диск.
Не ругайтесь,если что,я новичок в линукс и почти ничего толком не знаю.
Успешно разлочил с помощью неё мне пару смартфонов.
а она это с одобрения китайских товарищей делает, или самостоятельно хакает?
Дальше я захотел сделать это через Oracle Virtual Box,но вот незадача — оно не видит usb подключение.
По-моему, нужно ставить блоборасширения к виртуалбоксу, чтобы он в USB 2 умел. Ну и пробрасывать usb устройства в виртуалку нужно в настройках отдельно.
проброс usb портов в виртуалки подходит для обычных дел
когда надо перепрошивать (что будет менять свои вид/пид, быстро переподключаться и т.п.) что-то, то следует пробрасывать usb-контроллер полностью, если нет желания возиться с кучей эзотерических проблем.
А это qemu + vfio.
Как вариант, вкрячить венду на флешку, если не сработает.
Фактическая проблема только одна — девайс во время перезагрузки переподключается и/или меняет VID/PID. Фиксится установкой соответствующих фильтров.
Проброс USB и ещё какие-то фичи вынесены в не-свободное расширение (бесплатное для некоммерческого использования)
мне нужен Windows,чтобы запустить программу(Mi Flash Unlock),которая разблокирует загрузчик телефона через usb
Эта программа просто запускает fastboot flashing unlock .
Утилита fastboot есть во всех широко используемых дистрибутивов линукса. Возможно, отдельным пакетом с названием вроде «fastboot» или «adb». Драйверов для её работы устанавливать не нужно.
На QEMU можно усб пробросить, я осилил.
т.е. техническая возможность разлочить без разрешения из китайского центра есть?
Дальше я захотел сделать это через Oracle Virtual Box,но вот незадача — оно не видит usb подключение.
Используй libvirt/kvm и сделай там проброс контролёра шины USB.
Вот не далее как вчера на Xiaomi Mi A1 разблокировал загрузчик. Правда, я использовал команду fastboot oem unlock , а не fastboot flashing unlock , но по описанию они должны быть эквивалентны.
Вроде как бывают телефоны, где для разблокировки нужно ещё код какой-то указать. Но про Xiaomi говорят, что они таким обычно не занимаются.
Кажись, для Huawei нужны какие-то ключевые файлы.
Вот не далее как вчера на Xiaomi Mi A1 разблокировал загрузчик
Потому что это участник программы android one. На остальных сяоми все гораздо сложнее.
Хм. Да, похоже, я только на информацию по линейке Android One смотрел.
Эта программа просто запускает fastboot flashing unlock.
А как эта утилита понимает какой именно флеш надо разблокировать?
Никак не понимает. Это довольно простая утилита, которая посылает команды в устройство. Само устройство уже решает, как команды выполнять.
Источник
[Инструкции] Прошивка смартфона в Linux
archive rom.png (182.6 KB, Downloads: 92)
2017-10-29 11:44:25 Upload
Запустив данный скрипт * flash_all.sh * важно понимать, что вся информация из памяти устройства будет удалена.
tvinnks | из Redmi Note 4
интересно. но не для новичков. ) Спасибо за статью. |
oykb | из Redmi Note 4
tvinnks
интересно. но не для новичков. ) Спасибо за статью.
Кто хоть раз работал в убунте ничего сложного.
Змея | из Redmi 3S
oykb
Кто хоть раз работал в убунте ничего сложного.
А кто не работал,тому что делать?Короче, тёмный лес.
bormotal | из Redmi Note 4
LUNKOT | из Redmi Note 3
сложновато но возможно, если очень хочется. |
|_!0|\| | из Redmi Note 4X
Змея
А кто не работал,тому что делать?Короче, тёмный лес.
Если не работали,то и не стоит париться. Для Винды инструкий полно.
oykb | из Redmi Note 4
Змея
А кто не работал,тому что делать?Короче, тёмный лес.
А кто не работал, то Windows и куча гайдов на ютубе.
Vasalord | из Redmi 4
Хороший гайд. Полезно как по мне) |
Никита Зиновьев | из app
oykb
Кто хоть раз работал в убунте ничего сложного.
Верно. Отличная статья. И Ubuntu, это вещь. Особенно для сборки ядер.
Eroshenko Vladimir | из MI 5
Mi Comm APP
Получайте новости о Mi продукции и MIUI
Рекомендации
* Рекомендуется загружать изображения для обложки с разрешением 720*312
Изменения необратимы после отправки
Cookies Preference Center
We use cookies on this website. To learn in detail about how we use cookies, please read our full Cookies Notice. To reject all non-essential cookies simply click «Save and Close» below. To accept or reject cookies by category please simply click on the tabs to the left. You can revisit and change your settings at any time. read more
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services such as setting your privacy preferences, logging in or filling in formsYou can set your browser to block or alert you about these cookies, but some parts of thesite will not then work. These cookies do not store any personally identifiable information.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services such as setting your privacy preferences, logging in or filling in formsYou can set your browser to block or alert you about these cookies, but some parts of thesite will not then work. These cookies do not store any personally identifiable information.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services such as setting your privacy preferences, logging in or filling in formsYou can set your browser to block or alert you about these cookies, but some parts of thesite will not then work. These cookies do not store any personally identifiable information.
Источник