[TOOL][WIN/LIN/MAC] MiUnlockTool - Unlock bootloader of xiaomi devices on mac & linux

Search This thread

monstervishnu

New member
Oct 14, 2018
3
0
No. Just bind ur account in dev settings . also keep ur mi cloud sync on both with data and wifi.

Ur mobile hardware info should be synchronised with xiaomi server.
It takes couple of days.

When u try to unlock using tool then everything should match to that of server Then It will send u unlock key. Dont update or change rom from beta to stable. Just keep cloud sync on and wait for couple of days.

Make sure u enable oem unlock, usb debugging, and fastboot driver installed shows ur device is connected.

Try after 3 days.

I un locked my device 2yrs back. I dont know if u need to apply for permission to unlock or not.

I didn't enable OEM unlocking option but it the device status says the devices is unlocked so is my device unlocked ?

view
 
Last edited:

go vegan

Senior Member
Aug 22, 2017
106
15
Between the lack of FOSS support, the wait-times, the spyware, and the hideous lack of customer support even for legitimate warranty service, I'm NEVER again buying any Xiaomi products. It's not worth saving a hundred bucks or so if I flush weeks down the toilet trying just to unlock the damn thing.

I desperately need to upgrade some Redmi 5A phones to newer/better/faster, and I thought the Redmi Note 8 would work. This has been an expensive and futile nightmare.

The only question I have now: What phones do people recommend for good value, ease of rooting, and decent community support for good ROMs?
 

Gegsite

New member
May 21, 2014
2
1
OS: Ubuntu 20.04.1 LTS
Java: openjdk version "11.0.8" 2020-07-14
Action: Unlock boot loader
Error: Xiaomi Server returned error 20044. Invalid fasboot token
XMT version: XiaoMiTool V2 20.7.28 beta

I have the same issue. Sadly I do not know if the unlocking time is up or still have to wait. A guy said, you have to wait 168 hours (a week).
I tried with the MiUnlockTool.sh but there is 20035 error, saying , Update the tool.

Maybe on Windows is working. Will check later.
 

facochr

Member
Jan 5, 2020
10
0
Between the lack of FOSS support, the wait-times, the spyware, and the hideous lack of customer support even for legitimate warranty service, I'm NEVER again buying any Xiaomi products. It's not worth saving a hundred bucks or so if I flush weeks down the toilet trying just to unlock the damn thing.

I desperately need to upgrade some Redmi 5A phones to newer/better/faster, and I thought the Redmi Note 8 would work. This has been an expensive and futile nightmare.

The only question I have now: What phones do people recommend for good value, ease of rooting, and decent community support for good ROMs?
i totally agree with you. it should be a site that gathers all the phones in a table with a note for the ease to Unlock the bootloader, the number of custom rom + last version, something like that
 

Aggam

New member
Dec 14, 2020
1
0
It doesn't work. I use Manjaro Linux and this is the transcript:

[10:28:40][INFO ] Starting login procedure [10:28:46][INFO ] Login procedure succeeded [10:28:46][INFO ] Checking account unlock permission [10:28:51][INFO ] Unlock permission confirmed [10:28:51][INFO ] Waiting for a fastboot device [10:28:51][INFO ] Device connected: 33d671330104 [10:28:51][INFO ] Obtaining device info... [10:28:51][INFO ] Device info obtained [10:28:51][INFO ] Checking if unlock will erase data and server message [10:28:54][INFO ] Unlock procedure will not erase userdata [10:28:54][INFO ] Server message: The version of your tool is low and there may be a security risk. Please upgrade it right now! [10:28:54][INFO ] Querying unlock server for unlock key [10:28:58][ERROR ] Unlock request replied with error code 20035 [10:28:58][ERROR ] Error meaning: Please download the latest version

I did download the latest version. What is this?
 

eleWator

New member
Jan 25, 2021
1
0
Ubuntu 20.04, Redmi note 9s, latest current tool, when i get to Sign Up, Enter country and email but Next does nothing. Not much to be seen in logs either.

Went to account.xiaomi.com to create an account and there were captchas, might have been the problem why it did not work in the tool.

Verification email did arrive, more boring hoops to jump through but pretty straight forward bullshit click fest.
It will demand binding to a phone number for account safety purposes, yuk.
Then you need to activate / bind your phone in Dev options which will demand inserting of a SIM card.

And now i am stuck i do not have Data on that SIM.

Wish i had know what a terrible company Xiaomi is, that they still do not have an easier way or even a non Microsoft Tool ready for this.

If i do not get any ideas or clues how to bypass this, i will be sending this phone back.

Just confirming that the tool seems to be working so far, hope my hints help some one.

...
Borrowed a SIM and went through with it rather quick.
Now stuck in unlock tool with bogus wait for 7 days / 168 Hours Message.
Xiaomi is on my ****list of companys, much rage.
 
Last edited:
Mar 24, 2021
9
5
Redmi Note 9
My device: Xiaomi Redmi Note 9 128 GB Model: M2003J15SG
Delivered MUUI: V12.0.3.0.QJOMIXM
[ro.build.fingerprint]: [Redmi/merlinnfc_global/merlinnfc:10/QP1A.190711.020/V12.0.3.0.QJOMIXM:user/release-keys]
Updated to MUUI V12.0.7.0.QJOMIXM

I used XiaoMiTool V2, XMT2_Linux_20.7.28, Bellissimo software, on Debian Buster, successfully to unlock my Redmi Note 9. It was great, thank you very much for the hard work.

I was going to use it to upgrade/downgrade a bit to get used to GSI, which I never had experience of. I had no luck, and I could not use the tool to change Recovery or ROM.

So I set about finding the right TWRP, went wrong (suspected error: fastboot flash misc misc.bin), the phone is now bootlooping and/or I can fairly reliably arrive at a grey, unuseable, screen Recovery, evidenced by

Code:
$ adb devices
List of devices attached
ac388888405    recovery


As expected I cannot use XiaoMiTool (in modify mode) because the phone fails to open to reallow USB debugging!

I was able to use XiaoMiTool (in unbrick mode) to open up Fastboot and to run fine till "Select Your Device". The only "Merlin" is Redmi Note 10X-4G
and the tool delivers:
merlin_eea_global_images_V12.0.9.0.QJOEUXM_20210310.0000.00_10.0_eea_211b8958d0.tgz

Is there any way I can get the XiaoMiTool to work with Redmi Note 9, which needs an image like
merlin_global_images_V12.0.3.0.QJOMIXM_20200804.0000.00_10.0_global_b25a6faa3e.tgz
which I already downloaded.

I can see I am missing something in how to name my device, but I cannot see my error!

Thank you for any guidance.

Edit, Update,
Code:
fastboot erase misc
has brought my device back 😃 Thanks @VD171 https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4209299/ Lesson learned!
 
Last edited:
  • Like
Reactions: lebigmac
Thanks for this tool, now I didn't have to exit Ubuntu and reboot to windows :)

For everyone with trouble using this tool because of 'device not found' problems (in my case: the xiaomi device was found running adb, it was rebooted to fastboot/recovery, but did not show anymore in this tool): run the tool with root-permissions (su/sudo). As was actually written in the instructions in the first post here and on github issue: https://github.com/francescotescari/XiaoMiToolV2/issues/13#issuecomment-812846320

~ Hapy owner of Poco X3 Pro; my unlock timer shows 7 days / 168h, to be continued :)
 

facochr

Member
Jan 5, 2020
10
0
Between the lack of FOSS support, the wait-times, the spyware, and the hideous lack of customer support even for legitimate warranty service, I'm NEVER again buying any Xiaomi products. It's not worth saving a hundred bucks or so if I flush weeks down the toilet trying just to unlock the damn thing.

I desperately need to upgrade some Redmi 5A phones to newer/better/faster, and I thought the Redmi Note 8 would work. This has been an expensive and futile nightmare.

The only question I have now: What phones do people recommend for good value, ease of rooting, and decent community support for good ROMs?
I have an rn4, and I totally agree with you. I hesitate to take a pixel 4a, but 350 for a phone that xiaomi would have sold less than 200. It's frustrating.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 40
    [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
    7
    Fully obfuscated tool. Maybe bloatware or password hijacker
    3
    I'm using the latest Linux Mint but the MiUnlockTool don't work, do you know if there is another tool to unlock the bootloader using GNU/Linux?
    Unfortunately no. The only way that I found to unlock the bootloader was to install Windows and then use Xiaomi's unlock tool.
    I wrote a whole blog post about my experience doing it, but this forum won't let me post a link.
    To read it, search in Google for: "amosbbatto Why we don't own our mobile phones"

    Couldn't get Mi Unlock working on my Windows 10 for the life of me (Unlock button would stay grey even if I had plugged in my phone), but this seemed to work fine until it requested the unlock key.
    You either have to install the USB drivers from xiaomigeek.com or you have to register your phone at the Xiaomi web site. See my blog post about it.
    3
    So, uhh, is the author aware of the bug with %d displaying instead of something meaningful like hours until unlock?
    3
    What is SUDO ?? :confused:

    Lol...using linux and dont know about sudo. We start with sudo for some actions if we want to run comand with admin rights.

    R u using terminal right?

    Then u need sudo command sometime.

    If u want to install app then u say
    sudo apt-get install nameofapp
    Or just go to ubuntu store and search android tools fasboot


    Then open terminal and run fastboot commands
    Connect phone to pc.

    fastboot devices

    fastboot oem device-info

    If its hangs use

    sudo fastboot oem device-info
    Enter password
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone