I just got a Mi5, and I had to jump through Xiaomi's unlocking hoops. What an ordeal.
You have to register for a Mi account and a Miui forum account and then request unlocking privileges for it. This is apparently a manual process: approval can take anywhere from two days to several weeks. Having more internet points on their forum[1] may or may not speed up the process. Approved Mi accounts can unlock 1 device per 30 days.
Once you've got the unlocking privs, you can download a Windows (and only Windows) executable that performs the unlocking process (it comes bundled with the fastboot/adb executables). It checks that your phone is logged into the same Mi account as one part of a completely opaque validation.
The official documentation, as it were, says you need their "global development" OS running on the phone, but I'm pretty sure it worked with the non-development version, which is good because updating to development failed with a non-descript error.
Once I unlocked the phone -- using a friend's Mi account which had unlocking privs, unbeknownst to him since he never got the notification -- I had to install TWRP (the most popular alternate recovery image). The official versions did not work (either crashing or nonfunctional). After about a dozen recovery images from various file hosters -- exactly where I want to acquire core system software -- I stumbled on one that worked, albeit defaulting to Chinese.
I suppose the fact that I did not brick the device speaks to the robustness of Android's bootloader/recovery/system separation.
[1] A forum which goes to ridiculous lengths to feature these points. Points for replying, points for getting replies, bounties, etc etc. Users posting useful files restrict the link visibility to people who have answered in the thread, which leads to threads with hundreds or thousands of one-word "Thanks" posts, each taking up 200px of vertical space due to the amount of "badges" the forum has. It's insane. Is that a Chinese thing? Or just how the kids do it these days?
You have to register for a Mi account and a Miui forum account and then request unlocking privileges for it. This is apparently a manual process: approval can take anywhere from two days to several weeks. Having more internet points on their forum[1] may or may not speed up the process. Approved Mi accounts can unlock 1 device per 30 days.
Once you've got the unlocking privs, you can download a Windows (and only Windows) executable that performs the unlocking process (it comes bundled with the fastboot/adb executables). It checks that your phone is logged into the same Mi account as one part of a completely opaque validation.
The official documentation, as it were, says you need their "global development" OS running on the phone, but I'm pretty sure it worked with the non-development version, which is good because updating to development failed with a non-descript error.
Once I unlocked the phone -- using a friend's Mi account which had unlocking privs, unbeknownst to him since he never got the notification -- I had to install TWRP (the most popular alternate recovery image). The official versions did not work (either crashing or nonfunctional). After about a dozen recovery images from various file hosters -- exactly where I want to acquire core system software -- I stumbled on one that worked, albeit defaulting to Chinese.
I suppose the fact that I did not brick the device speaks to the robustness of Android's bootloader/recovery/system separation.
[1] A forum which goes to ridiculous lengths to feature these points. Points for replying, points for getting replies, bounties, etc etc. Users posting useful files restrict the link visibility to people who have answered in the thread, which leads to threads with hundreds or thousands of one-word "Thanks" posts, each taking up 200px of vertical space due to the amount of "badges" the forum has. It's insane. Is that a Chinese thing? Or just how the kids do it these days?