[GUIDE] All about unlocking bootloader, TWRP and rooting Redmi Note 8/8T

Search This thread

the_weird_aquarian

Senior Member
Nov 13, 2016
395
201
Code:
/*
 * Your warranty is now void.
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns.
 * YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */

A guide to unlock bootloader, flash a custom recovery and root your Redmi Note 8/8T device :


1. UNLOCKING BOOTLOADER :

Backup your data first. Unlocking will erase your data.

- Enable Developer Options in your phone by tapping the "MIUI Version" 7 times in About Phone.
- Go to Settings > Additional Settings > Developer Options.
- Enable OEM Unlocking, USB Debugging and USB Debugging (Security Settings) .
- Also add account in Mi Unlock Status (Can be found in Developer Options).
- Install the required ADB and Fastboot drivers in your PC from here.
- Download Mi Unlock to PC from here, and sign in with your Mi Account.
- Shut down your phone manually, and hold volume down key and power button to enter Fastboot mode.
- Connect your phone to PC using USB cable and click "Unlock" in Mi Unlock Tool.
- You will be given a specific time (168 hours usually).
- Wait for the given time. Make sure to use your phone and don't log out of your mi account from the phone or reset your device.
- Once waiting time is over, redo Unlock process.
- Your phone will be unlocked successfully. :)

2. FLASHING TWRP :

- Install the required ADB and Fastboot drivers in your PC if not already in step 1. from here.
- Download TWRP from here.
- Put that TWRP in the ADB and Fastboot installed folder (mostly C:\Program Files (x86)\Minimal ADB and Fastboot).
- Rename that recovery(TWRP file) to "recovery" for convenience (optional).
- Click on Start Menu, type cmd
- Right click and select Run as administrator
- Then type:

Code:
cd C:\Program Files (x86)\Minimal ADB and Fastboot

- Now Connect your phone to PC With USB Debugging on (keep phone on).
- Type:

Code:
adb devices

and accept the pop up on phone's screen.
- Now reboot your phone to Fastboot mode either manually by shutting down phone and then holding volume down key and power button or by:

Code:
adb reboot bootloader

- Once in Fastboot mode type:

Code:
fastboot devices

- Your device ID will be visible on Screen.
- Then type(hit ENTER after each line):

Code:
fastboot flash recovery recovery.img
fastboot boot recovery.img

- Now your phone will boot into TWRP.
OPTIONAL STEPS (Not Recommended): Encryption is always recommended for better security. However if you don't want encryption in your device, follow these steps. Again, not recommended.
- In TWRP go to Wipe and select Format Data(don't go to advanced). Type yes and format data. [This process will format all your data so make sure your data is backed up]
- Go back to TWRP home and Reboot > Recovery.(Don't reboot system or else you will have to repeat whole process again).
- Done :)

3. ROOTING :

- Download Magisk zip to PC from here.
- Download Universal DM-Verity and ForceEncrypt disabler from here. (Only required if you followed optional steps.)
- When in TWRP transfer the file(s) to phone and go to Install.
- Here select Magisk zip file and swipe to flash.
- Then select Universal DM-Verity and ForceEncrypt disabler zip and swipe to flash(Make sure to flash this at last or else phone won't boot). (Only required if you followed optional steps.)
- Reboot system.
- Done. Debloat. Enjoy :)

Links
1. Minimal ADB and Fastboot
2. MI Unlock Tool
3. TWRP
4. Magisk
5. Universal DM-Verity and ForceEncrypt Disabler (OPTIONAL)


If this helped you then hit the Thanks Button. Good Luck. :)
 
Last edited:

romulocarlos

Senior Member
Oct 10, 2011
546
148
Belo Horizonte
Thanks for guide. Anyway, latest versions of Windows 10 don't have "Open command prompt here" option. Instead, they have PowerShell. I don't know how PowerShell will react with ADB, so, for these Windows 10 is better to:

  1. Click on Start Menu, type cmd
  2. Right click with mouse and choose "Run as administrator"
  3. Type these commands (hit ENTER after each line):
  4. cd\
  5. cd "program files (x86)
  6. cd "minimal adb and fastboot"

Now the user is on right folder.

--------------------------------

A question: I'm on stock ROM and have a Google Apps account on my phone, and I'm currently using stock Second Space feature to handle it. As encryption is mandatory to use a Google Apps account, I can't use "disable encryption". Or will Second Space be encrypted even if "main account" isn't? There are any problems to use Magisk with encrypted phone?
 

the_weird_aquarian

Senior Member
Nov 13, 2016
395
201
Thanks for guide. Anyway, latest versions of Windows 10 don't have "Open command prompt here" option. Instead, they have PowerShell. I don't know how PowerShell will react with ADB, so, for these Windows 10 is better to:

  1. Click on Start Menu, type cmd
  2. Right click with mouse and choose "Run as administrator"
  3. Type these commands (hit ENTER after each line):
  4. cd\
  5. cd "program files (x86)
  6. cd "minimal adb and fastboot"

Now the user is on right folder.

--------------------------------

A question: I'm on stock ROM and have a Google Apps account on my phone, and I'm currently using stock Second Space feature to handle it. As encryption is mandatory to use a Google Apps account, I can't use "disable encryption". Or will Second Space be encrypted even if "main account" isn't? There are any problems to use Magisk with encrypted phone?

totally forgot about the powershell thing :mad:. Thanks to you I updated my post. :)

What do you mean by Google Apps account. Do you mean google account??. I'm using a decrypted phone right now and google apps work just fine with decryption too.
There aren't any problems to use Magisk with encrypted phone(I used it myself for a good week or so before decrypting).
Unfortunately as of now I don't have the answer to your second space question. Will let you know once I get it myself.
 

romulocarlos

Senior Member
Oct 10, 2011
546
148
Belo Horizonte
totally forgot about the powershell thing :mad:. Thanks to you I updated my post. :)

What do you mean by Google Apps account. Do you mean google account??. I'm using a decrypted phone right now and google apps work just fine with decryption too.
There aren't any problems to use Magisk with encrypted phone(I used it myself for a good week or so before decrypting).
Unfortunately as of now I don't have the answer to your second space question. Will let you know once I get it myself.

You must update the command to change folder on cmd. Put the path in quotes, or else the users will receive an error!
Code:
cd "C:\Program Files (x86)\Minimal ADB and Fastboot"

About Google Apps, is also called Google for Work, or Work Profile. Is MANDATORY to have the phone encrypted, or the account won't sync.

Thank you for feedback!
 

the_weird_aquarian

Senior Member
Nov 13, 2016
395
201
You must update the command to change folder on cmd. Put the path in quotes, or else the users will receive an error!
Code:
cd "C:\Program Files (x86)\Minimal ADB and Fastboot"

About Google Apps, is also called Google for Work, or Work Profile. Is MANDATORY to have the phone encrypted, or the account won't sync.

Thank you for feedback!

the command works fine without quotes too man, checked it myself. both ADB and Fastboot commands work fine.

I'll check about Google for work issue. :good:
 

romulocarlos

Senior Member
Oct 10, 2011
546
148
Belo Horizonte
the command works fine without quotes too man, checked it myself. both ADB and Fastboot commands work fine.

I'll check about Google for work issue. :good:

You're right. Tested right now and worked. Maybe newer Win10 versions are "smarter" than older... who knows...

Well, about the second space, thanks, but you don't need to check with an Google Apps account.

If your phone is decrypted, just open Second Space, configuring it for first time use as you like. Then, on Second Space, go Settings -> Password and security -> privacy. Check if encryption is active.

Thanks again!
 

Mozar3lla

Member
Nov 6, 2018
24
1
Thank you for this awesome tutorial.. now i m in "waiting mode" for unlocking bootloader ?

Just one dummy question for me sir .. can i root my device while i am using stock rom (miui 11 global) ? Or i have to install custom rom ? Thank you ?
 

the_weird_aquarian

Senior Member
Nov 13, 2016
395
201
Thank you for this awesome tutorial.. now i m in "waiting mode" for unlocking bootloader

Just one dummy question for me sir .. can i root my device while i am using stock rom (miui 11 global) ? Or i have to install custom rom ? Thank you

Yes you can root on stock rom. Rooting is not rom specific. You can root on any rom.

Hope it helps. :)
 
  • Like
Reactions: Mozar3lla

the_weird_aquarian

Senior Member
Nov 13, 2016
395
201
@the_weird_aquarian thanks for the tutorial mate, do i have to flash dm verity everytime i flash magisk????

and also I found this tutorial and software for flashing twrp, is it ok to use this software too?
https://github.com/XiaomiWiki/XiaomiWiki.github.io/blob/master/wiki/Flash_TWRP_and_custom_ROMs.md

dm-verity is just required to stop the stock mi recovery from coming back. Hence it's just for MIUI based roms. However disable forceencrypt helps you get rid of force encryption of miui or other custom roms(so that you can access internal storage from recovery too if you are flashing something). The zip provided has both features in one file. Just rename the file to whatever you want to disable(see instructions here).

Regarding that tool on github, I have never used it personally as I like doing each step myself so if something goes wrong I know the last working step and from there I can figure out what went wrong. Using the tool might or might not work for you. Use at your own risk.
 
  • Like
Reactions: shayanb2004

shayanb2004

Senior Member
Jun 13, 2013
209
73
dm-verity is just required to stop the stock mi recovery from coming back. Hence it's just for MIUI based roms. However disable forceencrypt helps you get rid of force encryption of miui or other custom roms(so that you can access internal storage from recovery too if you are flashing something). The zip provided has both features in one file. Just rename the file to whatever you want to disable(see instructions here).

Regarding that tool on github, I have never used it personally as I like doing each step myself so if something goes wrong I know the last working step and from there I can figure out what went wrong. Using the tool might or might not work for you. Use at your own risk.

Thanks for the info mate
damn I have to wait a whole week to unlock my bootlaoder :rolleyes:
 

AMJ_Vario

Senior Member
Sep 24, 2013
67
8
Samarinda, Kal-Tim
I will try it to root my device to get rid off the annoying ads. But my ordered cell phone does not come yet and I still patient to wait it.
Question :
1. Can I use the Mi Mover application to migrate data from an old cellphone (Redmi Note 5) to Redmi Note 8?
2. Whether migrating data (via Mi Mover) before root or do data migration after root ? Because my old RN5 already rooted, have it TWRP and Magisk too.
 

romulocarlos

Senior Member
Oct 10, 2011
546
148
Belo Horizonte
I will try it to root my device to get rid off the annoying ads. But my ordered cell phone does not come yet and I still patient to wait it.
Question :
1. Can I use the Mi Mover application to migrate data from an old cellphone (Redmi Note 5) to Redmi Note 8?
2. Whether migrating data (via Mi Mover) before root or do data migration after root ? Because my old RN5 already rooted, have it TWRP and Magisk too.

I suggest you to move AFTER you root your new device, because to have root, you must unlock the bootloader. And when you unlock the bootloader, all data is lost.
 

AMJ_Vario

Senior Member
Sep 24, 2013
67
8
Samarinda, Kal-Tim
I suggest you to move AFTER you root your new device, because to have root, you must unlock the bootloader. And when you unlock the bootloader, all data is lost.

So its mean, first the device RN8 must do unlock the bootloader, then root it, next is migration data from old cellphone.
Is that the right way?
Is the migration data from old cellphone, will included the third party application from that old cellphone too? Is it will compatible on RN8?
Or just migration important data only (like email account + Mi account + contact + notes, etc) and the application 3rd party should be installed one by one on the RN8 exacly as RN5?
Sorry for asked to much becuse I dont want to make a mistake on the new devices.:eek:

Just guide me into the right way, please..:D
Thanks for the respond..:good:
 

romulocarlos

Senior Member
Oct 10, 2011
546
148
Belo Horizonte
So its mean, first the device RN8 must do unlock the bootloader, then root it, next is migration data from old cellphone.
Is that the right way?
Is the migration data from old cellphone, will included the third party application from that old cellphone too? Is it will compatible on RN8?
Or just migration important data only (like email account + Mi account + contact + notes, etc) and the application 3rd party should be installed one by one on the RN8 exacly as RN5?
Sorry for asked to much becuse I dont want to make a mistake on the new devices.:eek:

Just guide me into the right way, please..:D
Thanks for the respond..:good:

In fact, I never used Mi Mover. As each device has its features, I prefer to install apps one by one. My data is on cloud, so for me is easyer.

I suggest you to do the transfer, only for tests, just after you receive your phone. These videos may help you also:

https://www.youtube.com/watch?v=shf-i8z86Ms and https://www.youtube.com/watch?v=ql-f88qllrE
 

the_weird_aquarian

Senior Member
Nov 13, 2016
395
201
@the_weird_aquarian mate have you tested orangefox recovery?
I'm hearing a lot about it, but donno anything :S
thinking if it is good instead of twrp or not?

yes so I have recently flashed orangefox about 2 weeks ago or something. I personally don't use anything other than official twrp, but I flashed orangefox because of it's miui OTA update feature. You can flash if you are planning on staying on stock rom with a decrypted device, as I have dirty flashed stock rom with my decrypted device but it always ends up in bootloop with official twrp. I have to format data everytime. Surprisingly Orangefox solves this issue. Also if you are a fan of theming then it provides a few custom fonts, colors and themes. However if your device is encrypted there's absolutely no reason to switch from official to any other recovery unless you want to customize the looks of your recovery.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    That usually means the phone is encrypted, something current custom recoveries have trouble dealing with.

    My suggestion is you start again by going back to stock (flash fastboot ROM with MiFlash, taking care not to relock bootloader) and start again, not forgetting to flash DFE as the last thing (see https://forum.xda-developers.com/posts/84801111 for detailed instructions).
    ... and be sure to use a recovery able for your ROM. E. G. try latest TWRP from Mauronofrio twrp-3.4.0-10-ginkgo-mauronofrio.img or that from geoanteo twrp-3.5.A9-ginkgo-geoanto555.img. The latter one allows you to manipulate "dangerous" parts of the phone, thus be careful with it...
    1
    Hi, after fastboot flash recovery recovery.img and fastboot boot recovery.img (both appears in cmd as OKAY and with the finished time) it doesn't reboot into TWRP, and when I reboot manually (volume up + power) the phone enters in MI-recovery. I tried with orangefox too, but same results
    Do this:
    1. fastboot flash recovery recovery.img
    2. Reboot manually by using volume up + power

    If you accidentally boot into system when doing step 2, custom recovery will be replaced with stock recovery (enters MI-recovery).


    fastboot boot recovery.img method is not working anymore.
    1
    yeah, i also get a million red errors when i try to flash anything through any recovery and when i try to browse the files on the internal SD while on a recovery it only shows a lot of folders with gibberish like names

    That usually means the phone is encrypted, something current custom recoveries have trouble dealing with.

    My suggestion is you start again by going back to stock (flash fastboot ROM with MiFlash, taking care not to relock bootloader) and start again, not forgetting to flash DFE as the last thing (see https://forum.xda-developers.com/posts/84801111 for detailed instructions).
  • 57
    Code:
    /*
     * Your warranty is now void.
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns.
     * YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */

    A guide to unlock bootloader, flash a custom recovery and root your Redmi Note 8/8T device :


    1. UNLOCKING BOOTLOADER :

    Backup your data first. Unlocking will erase your data.

    - Enable Developer Options in your phone by tapping the "MIUI Version" 7 times in About Phone.
    - Go to Settings > Additional Settings > Developer Options.
    - Enable OEM Unlocking, USB Debugging and USB Debugging (Security Settings) .
    - Also add account in Mi Unlock Status (Can be found in Developer Options).
    - Install the required ADB and Fastboot drivers in your PC from here.
    - Download Mi Unlock to PC from here, and sign in with your Mi Account.
    - Shut down your phone manually, and hold volume down key and power button to enter Fastboot mode.
    - Connect your phone to PC using USB cable and click "Unlock" in Mi Unlock Tool.
    - You will be given a specific time (168 hours usually).
    - Wait for the given time. Make sure to use your phone and don't log out of your mi account from the phone or reset your device.
    - Once waiting time is over, redo Unlock process.
    - Your phone will be unlocked successfully. :)

    2. FLASHING TWRP :

    - Install the required ADB and Fastboot drivers in your PC if not already in step 1. from here.
    - Download TWRP from here.
    - Put that TWRP in the ADB and Fastboot installed folder (mostly C:\Program Files (x86)\Minimal ADB and Fastboot).
    - Rename that recovery(TWRP file) to "recovery" for convenience (optional).
    - Click on Start Menu, type cmd
    - Right click and select Run as administrator
    - Then type:

    Code:
    cd C:\Program Files (x86)\Minimal ADB and Fastboot

    - Now Connect your phone to PC With USB Debugging on (keep phone on).
    - Type:

    Code:
    adb devices

    and accept the pop up on phone's screen.
    - Now reboot your phone to Fastboot mode either manually by shutting down phone and then holding volume down key and power button or by:

    Code:
    adb reboot bootloader

    - Once in Fastboot mode type:

    Code:
    fastboot devices

    - Your device ID will be visible on Screen.
    - Then type(hit ENTER after each line):

    Code:
    fastboot flash recovery recovery.img
    fastboot boot recovery.img

    - Now your phone will boot into TWRP.
    OPTIONAL STEPS (Not Recommended): Encryption is always recommended for better security. However if you don't want encryption in your device, follow these steps. Again, not recommended.
    - In TWRP go to Wipe and select Format Data(don't go to advanced). Type yes and format data. [This process will format all your data so make sure your data is backed up]
    - Go back to TWRP home and Reboot > Recovery.(Don't reboot system or else you will have to repeat whole process again).
    - Done :)

    3. ROOTING :

    - Download Magisk zip to PC from here.
    - Download Universal DM-Verity and ForceEncrypt disabler from here. (Only required if you followed optional steps.)
    - When in TWRP transfer the file(s) to phone and go to Install.
    - Here select Magisk zip file and swipe to flash.
    - Then select Universal DM-Verity and ForceEncrypt disabler zip and swipe to flash(Make sure to flash this at last or else phone won't boot). (Only required if you followed optional steps.)
    - Reboot system.
    - Done. Debloat. Enjoy :)

    Links
    1. Minimal ADB and Fastboot
    2. MI Unlock Tool
    3. TWRP
    4. Magisk
    5. Universal DM-Verity and ForceEncrypt Disabler (OPTIONAL)


    If this helped you then hit the Thanks Button. Good Luck. :)
    3
    Thanks for guide. Anyway, latest versions of Windows 10 don't have "Open command prompt here" option. Instead, they have PowerShell. I don't know how PowerShell will react with ADB, so, for these Windows 10 is better to:

    1. Click on Start Menu, type cmd
    2. Right click with mouse and choose "Run as administrator"
    3. Type these commands (hit ENTER after each line):
    4. cd\
    5. cd "program files (x86)
    6. cd "minimal adb and fastboot"

    Now the user is on right folder.

    --------------------------------

    A question: I'm on stock ROM and have a Google Apps account on my phone, and I'm currently using stock Second Space feature to handle it. As encryption is mandatory to use a Google Apps account, I can't use "disable encryption". Or will Second Space be encrypted even if "main account" isn't? There are any problems to use Magisk with encrypted phone?
    3
    Dear OP, thanks again for your very helpful guide! Since meanwhile something changed with magisk installation procedure (as far as I understood no longer recommended or even working by flashing from the recovery) I would be very glad if you could update this section (especially for use of A11 custom ROMs). Thanks in advance if you will find the time for doing so.
    Hi, thanks for the information. I'll look into it and update as needed. :)

    i got these error messages.
    after reboot twrp is still there, it is not replaced by the original recovery
    magisk is installed and root is ok
    factory reset not working (from settings or from twrp)

    miui 12.0.3

    can you help me understand what's wrong?
    Try this once :
    Twrp > mount > unmount(untick) data
    now go to wipe > format data (don't go to advanced) > type yes > reboot

    make sure all your precious data is copied in sd card or pc as this process will format whole internal storage of your device.
    2
    "- Go to this link and click the Unlock Now button.
    - Login into your Mi account."
    thats is as far as i can get.
    no one time password. just peoples social media.
    all in chinese.
    google translate claims the page is already in english. other than on the login page, there seems to be no option to change language.
    my older laptop even gets a "trojan prevented" message on the page after the login.
    Am i blind or has something changed?
    Any help appreciated.

    When you click on UNLOCK, On the BOTTOM of that Login page there should be options and one of them is ENGLISH. Now I do not know how it is on the Phone, but on a Regular PC (mine is W7 Prof), the option is there. Then Register on the PC if you want, but you will need to Logon to your account on the phone and follow the rest of the guide. Also the only thing you CAN'T do while waiting the 7 days is a System Reset. Reboots are fine while waiting. That part of the guide was a bit confusing.

    Hope this helps...
    2
    That usually means the phone is encrypted, something current custom recoveries have trouble dealing with.

    My suggestion is you start again by going back to stock (flash fastboot ROM with MiFlash, taking care not to relock bootloader) and start again, not forgetting to flash DFE as the last thing (see https://forum.xda-developers.com/posts/84801111 for detailed instructions).
    ... and be sure to use a recovery able for your ROM. E. G. try latest TWRP from Mauronofrio twrp-3.4.0-10-ginkgo-mauronofrio.img or that from geoanteo twrp-3.5.A9-ginkgo-geoanto555.img. The latter one allows you to manipulate "dangerous" parts of the phone, thus be careful with it...
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