[GUIDE] How to unlock bootloader and install ROMs

Search This thread

Krullendhaar

Senior Member
Oct 30, 2014
78
42
This guide should work with any Xiaomi device, including the Redmi K20, Redmi K20 Pro, Xiaomi Mi 9T and Xiaomi Mi 9T Pro.

Install ADB on windows 10

  1. Go to developer.android.com and download SDK Platform-Tools for Windows as ZIP
  2. Unzip and save in a folder on the C drive. Remark: you do not have to install anything or run any program.
  3. Check installation: Shift+right click on an empty area in the folder and select open command prompt here and type adb. The result should be similar to this: Android Debug Bridge version 1.0.39 Revision 3db08f2c6889-android Installed as C:\ADB\platform-tools\adb.exe. If ADB is not correctly installed, you will probably see the following message: ‘adb’ is not recognized as an internal or external command, operable program or batch file.

Unlock bootloader
  • Backup all your personal documents
  • Turn off lockscreen security (fingerprint, code, face ID)
  • Make sure you have sufficient battery.
  • Make a Mi account: Settings > Mi account
  • Activate developer options: Settings > about > MIUI version: Tap 5 times
  • Enable OEM unlocking: Developer options > OEM unlocking
  • Enter fastboot mode: Hold volume down + power
  • Connect to PC and install drivers: Use device manager and select manually downloaded drivers
  • Download unlock tool: Go to en.MIUI/unlock > Unlock now > Sign in > Download Mi Unlock as ZIP
  • Unlock bootloader: Extract ZIP > Run miflash_unlock.exe > Sign in with your Mi account and follow instructions. The unlock tool will say unlocked successfully and the phone will reboot itself

Install TWRP
  • Enable USB debugging: Settings > Developer Options > USB Debugging
  • Download TWRP ZIP: Unzip
  • Flash TWRP: Boot into bootloader. Connect to PC. Open folder where twrp.img is stored. Shift+right click on an empty area in the folder and select open command prompt here. Type fastboot devices to ensure your phone is recognized. Flash TWRP by typing fastboot flash recovery twrp.img.

Flash custom ROM
  • Download files: Download the ROM (and other files like Gapps, Magisk) and move it to your internal storage
  • Backup stock ROM: Select backup. Select system (not system image) & select boot. Select storage where the backup will be saved. Name the backup. Swipe to backup. When the backup is done, press reboot system for your phone to start up normally. Keep a copy of the backup on the internal storage and one on your PC
  • Wipe old software: Boot into recovery. Select wipe. Select advanced wipe. Select data, cache, dalvik cache and system** and swipe to wipe. When the reset is done, press back (twice) to return to the TWRP homescreen.
  • Flash ROM: Select install. Select the ROM (and add other files like Gapps, Magisk). Swipe to confirm flash. When flashing is done, press reboot system. The first boot will take a lot longer than usual.

Remarks:

** It is not always necessary to wipe system, since most custom ROMs automatically wipe system. Wiping anyway should not do any harm. Furthermore, formatting data (wipe > format data > type yes) is unnecessary most of the time. It is useful for people who have an encrypted device. If your device is encrypted and TWRP fails to flash, format data to remove encryption. Note that if you disabled all lockscreen security, then encryption is disabled. Encryption is not possible without lockscreen security. To encrypt again after flashing, go to device settings in the new ROM. Be sure to setup lockscreen security first.
 
Last edited:

Jaskaran21

Member
Jan 28, 2017
11
0
This guide should work with any Xiaomi device, including the Redmi K20, Redmi K20 Pro, Xiaomi Mi 9T and Xiaomi Mi 9T Pro.

Install ADB on windows 10

Go to developer.android.com and download SDK Platform-Tools for Windows as ZIP

Unzip and save in a folder on the C drive

Check installation: Shift+right click on an empty area in the folder and select open command prompt here and type adb. The result should be similar to this: Android Debug Bridge version 1.0.39 Revision 3db08f2c6889-android Installed as C:\ADB\platform-tools\adb.exe


Unlock bootloader
Backup all your personal documents

Turn off lockscreen security (fingerprint, code, face ID)

Make sure you have sufficient battery.

Make a Mi account: Settings > Mi account

Activate developer options: Settings > about > MIUI version: Tap 5 times

Enable OEM unlocking: Developer options > OEM unlocking

Enter fastboot mode: Hold volume down + power

Connect to PC and install drivers: Use device manager and select manually downloaded drivers

Download unlock tool: Go to en.MIUI/unlock > Unlock now > Sign in > Download Mi Unlock as ZIP

Unlock bootloader: Extract ZIP > Run miflash_unlock.exe > Sign in with your Mi account and follow instructions. The unlock tool will say unlocked successfully and the phone will reboot itself


Install TWRP
Enable USB debugging: Settings > Developer Options > USB Debugging

Download TWRP ZIP: Unzip

Flash TWRP: Boot into bootloader. Connect to PC. Open folder where twrp.img is stored. Shift+right click on an empty area in the folder and select open command prompt here. Type fastboot devices to ensure your phone is recognized. Flash TWRP by typing fastboot flash recovery twrp.img.


Flash custom ROM
Download files: Download the ROM (and other files like Gapps, Magisk) and move it to your internal storage

Backup stock ROM: Select backup. Select system (not system image) & select boot. Select storage where the backup will be saved. Name the backup. Swipe to backup. When the backup is done, press reboot system for your phone to start up normally. Keep a copy of the backup on the internal storage and one on your PC

Wipe old software: Boot into recovery. Select wipe. Select advanced wipe. Select data, cache, dalvik cache and system** and swipe to wipe. When the reset is done, press back (twice) to return to the TWRP homescreen.

Flash ROM: Select install. Select the ROM (and add other files like Gapps, Magisk). Swipe to confirm flash. When flashing is done, press reboot system. The first boot will take a lot longer than usual.


Remarks:

** It is not always necessary to wipe system, since most custom ROMs automatically wipe system. Wiping anyway should not do any harm. Furthermore, formatting data (wipe > format data > type yes) is unnecessary most of the time. It is useful for people who have an encrypted device.
i am not able to unlock bootloader help pls
 

DaveHTC200

Senior Member
Oct 2, 2008
1,635
423
Sorry i am getting 168 hours later error in the mi unlock tool i have tried 3-4 different accounts with different phone numbers but still it is showing the same error. I had even waited for a week but still its the same error
I'm not sure you can get around the waiting time!
Some people get longer times than others I believe, you just have to continue to use the phone and potentially keep trying.

I may stand corrected though
 
  • Like
Reactions: Jaskaran21

Krullendhaar

Senior Member
Oct 30, 2014
78
42
I'm not sure you can get around the waiting time!
Some people get longer times than others I believe, you just have to continue to use the phone and potentially keep trying.

I may stand corrected though

It is not possible to get around the waiting time. The waiting time and the requirement for a Mi account is a safety measure to prevent reseller from installing spyware/malware. Just wait.
 

dpdp73

Senior Member
Jul 28, 2014
64
15
What are the PRO/CONS of rooting this Mi 9T Pro device? what would stop working?

You can flash EEA, Global and China firmwares on different phones. You can flash custom rom. That's about unlocking bootloader, rooting is another thing which you can do once U unlocked.
For bad things you become able to harm or destroy your device(what happens if you do something very wrong, always double check while flashing from PC, don't lock bootloader on firmware not for your region) and there are security flaws in storage encryption.
 
  • Like
Reactions: Giocarro

alxtorrentazos

Senior Member
Jun 11, 2013
66
11
Montevideo
You can flash EEA, Global and China firmwares on different phones. You can flash custom rom. That's about unlocking bootloader, rooting is another thing which you can do once U unlocked.
For bad things you become able to harm or destroy your device(what happens if you do something very wrong, always double check while flashing from PC, don't lock bootloader on firmware not for your region) and there are security flaws in storage encryption.

Thank you for your reply sir. I was wondering about NFC or Google Pay, things like that maybe stop working after unlocking the bootloader.
 

caperonjr

Member
Jul 18, 2014
42
3
Hi guys,
I'm sorry, but I have tue current problem of many people here : OEM unlocking is impossible.
I tried 3 times, with 168h/7 days intervall each time, but same error.
I allowed OEM unlocking and USB debugging, I tried with several MiFlashUnlockTools.
I can't find why it doesn't work...
 
Hi guys,
I'm sorry, but I have tue current problem of many people here : OEM unlocking is impossible.
I tried 3 times, with 168h/7 days intervall each time, but same error.
I allowed OEM unlocking and USB debugging, I tried with several MiFlashUnlockTools.
I can't find why it doesn't work...
What error?
After waiting 7 days and trying to unlock again, what happens?
When you are waiting for the 7 days to finish, do not change the Mi account on the phone, do not go to the Mi Unlock Status setting and press start. Doing anything like this will reset the process and start the timer again.
When the 7 days are finished you should only put the phone in fastboot mode, connect it to the PC and run the Mi Unlock Tool.
 
  • Like
Reactions: Lethalben

caperonjr

Member
Jul 18, 2014
42
3
What error?
After waiting 7 days and trying to unlock again, what happens?
When you are waiting for the 7 days to finish, do not change the Mi account on the phone, do not go to the Mi Unlock Status setting and press start. Doing anything like this will reset the process and start the timer again.
When the 7 days are finished you should only put the phone in fastboot mode, connect it to the PC and run the Mi Unlock Tool.

The same error : 168h to wait !
I don't think I do something to reinitialize the process : mi Mi account is not changed, oem unlock and usb debug always allowed...
I have a global rom, can it be the reason ? Or the method is the same for all versions of this phone ?
 

pauloguyss

Member
Aug 18, 2017
15
0
Hello,
Well, i've made all the steps, but after flashed TWRP, the phone only boots on Fastboot mode...
Can you help me?
 

droident

Senior Member
Dec 23, 2010
495
201
Redmi K20 Pro
Kicked off the wait timer so 168hrs or 7 days to wait. Box fresh Mi 9T Pro; I'll probably be lurking around these parts of XDA now.

What happened to the old clear gel cases? The included black hard case is super-brittle and cracked as I was putting it on for first use. Ordered a good old gel case; I'd like to actually see the aurora effect :silly:.

Anyone know if running a system update will reset the timer?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    This guide should work with any Xiaomi device, including the Redmi K20, Redmi K20 Pro, Xiaomi Mi 9T and Xiaomi Mi 9T Pro.

    Install ADB on windows 10

    1. Go to developer.android.com and download SDK Platform-Tools for Windows as ZIP
    2. Unzip and save in a folder on the C drive. Remark: you do not have to install anything or run any program.
    3. Check installation: Shift+right click on an empty area in the folder and select open command prompt here and type adb. The result should be similar to this: Android Debug Bridge version 1.0.39 Revision 3db08f2c6889-android Installed as C:\ADB\platform-tools\adb.exe. If ADB is not correctly installed, you will probably see the following message: ‘adb’ is not recognized as an internal or external command, operable program or batch file.

    Unlock bootloader
    • Backup all your personal documents
    • Turn off lockscreen security (fingerprint, code, face ID)
    • Make sure you have sufficient battery.
    • Make a Mi account: Settings > Mi account
    • Activate developer options: Settings > about > MIUI version: Tap 5 times
    • Enable OEM unlocking: Developer options > OEM unlocking
    • Enter fastboot mode: Hold volume down + power
    • Connect to PC and install drivers: Use device manager and select manually downloaded drivers
    • Download unlock tool: Go to en.MIUI/unlock > Unlock now > Sign in > Download Mi Unlock as ZIP
    • Unlock bootloader: Extract ZIP > Run miflash_unlock.exe > Sign in with your Mi account and follow instructions. The unlock tool will say unlocked successfully and the phone will reboot itself

    Install TWRP
    • Enable USB debugging: Settings > Developer Options > USB Debugging
    • Download TWRP ZIP: Unzip
    • Flash TWRP: Boot into bootloader. Connect to PC. Open folder where twrp.img is stored. Shift+right click on an empty area in the folder and select open command prompt here. Type fastboot devices to ensure your phone is recognized. Flash TWRP by typing fastboot flash recovery twrp.img.

    Flash custom ROM
    • Download files: Download the ROM (and other files like Gapps, Magisk) and move it to your internal storage
    • Backup stock ROM: Select backup. Select system (not system image) & select boot. Select storage where the backup will be saved. Name the backup. Swipe to backup. When the backup is done, press reboot system for your phone to start up normally. Keep a copy of the backup on the internal storage and one on your PC
    • Wipe old software: Boot into recovery. Select wipe. Select advanced wipe. Select data, cache, dalvik cache and system** and swipe to wipe. When the reset is done, press back (twice) to return to the TWRP homescreen.
    • Flash ROM: Select install. Select the ROM (and add other files like Gapps, Magisk). Swipe to confirm flash. When flashing is done, press reboot system. The first boot will take a lot longer than usual.

    Remarks:

    ** It is not always necessary to wipe system, since most custom ROMs automatically wipe system. Wiping anyway should not do any harm. Furthermore, formatting data (wipe > format data > type yes) is unnecessary most of the time. It is useful for people who have an encrypted device. If your device is encrypted and TWRP fails to flash, format data to remove encryption. Note that if you disabled all lockscreen security, then encryption is disabled. Encryption is not possible without lockscreen security. To encrypt again after flashing, go to device settings in the new ROM. Be sure to setup lockscreen security first.
    1
    Sorry i am getting 168 hours later error in the mi unlock tool i have tried 3-4 different accounts with different phone numbers but still it is showing the same error. I had even waited for a week but still its the same error
    I'm not sure you can get around the waiting time!
    Some people get longer times than others I believe, you just have to continue to use the phone and potentially keep trying.

    I may stand corrected though
    1
    It is not possible to get around the waiting time. The waiting time and the requirement for a Mi account is a safety measure to prevent reseller from installing spyware/malware. Just wait.
    Some mentioned about an older version of MiFlash but I've not required this as yet
    1
    What are the PRO/CONS of rooting this Mi 9T Pro device? what would stop working?

    You can flash EEA, Global and China firmwares on different phones. You can flash custom rom. That's about unlocking bootloader, rooting is another thing which you can do once U unlocked.
    For bad things you become able to harm or destroy your device(what happens if you do something very wrong, always double check while flashing from PC, don't lock bootloader on firmware not for your region) and there are security flaws in storage encryption.
    1
    Hi guys,
    I'm sorry, but I have tue current problem of many people here : OEM unlocking is impossible.
    I tried 3 times, with 168h/7 days intervall each time, but same error.
    I allowed OEM unlocking and USB debugging, I tried with several MiFlashUnlockTools.
    I can't find why it doesn't work...
    What error?
    After waiting 7 days and trying to unlock again, what happens?
    When you are waiting for the 7 days to finish, do not change the Mi account on the phone, do not go to the Mi Unlock Status setting and press start. Doing anything like this will reset the process and start the timer again.
    When the 7 days are finished you should only put the phone in fastboot mode, connect it to the PC and run the Mi Unlock Tool.