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

Search This thread

the_weird_aquarian

Senior Member
Nov 13, 2016
396
220
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
552
153
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
396
220
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
552
153
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
396
220
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
552
153
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
396
220
@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.
 

shayanb2004

Senior Member
Jun 13, 2013
209
74
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
552
153
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
552
153
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
396
220
@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.
  • 69
    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. :)
    4
    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.
    3
    Do it again but this time, after flashing your custom recovery, REBOOT YOUR DEVICE TO RECOVERY FIRST, NOT IN ANDROID!!! Only after this you should reboot normally.
    This is the secret
    2
    Why do you say to back the phone up before starting the Unlock. How is one supposed to accomplish that without TWRP or why even? I guess I will go right into flashing a custom rom (which one would you suggest?) or stock (never!) after it's rooted, so I don't understand what I would be saving?
    I see that your question has been answered very accurately already and I don't think it needs any further explanation..about the backing up data part I meant to backup your internal storage. Since you have to wait for about a week to unlock so few users might start using it as a daily device for that time with all their photos,videos and apps and stuff, so basically just copy all your necessary stuff from internal to PC as unlocking will format your internal storage. About custom rom suggestions I'm myself using EU weekly lol..aosp based roms are starting to gain speed in development but I'm still waiting for a few more stable builds to be released :)

    Managed to work it out:

    1. Install TWRP via fastboot, don't bother with vbmeta.img.

    2. Wipe all except internal storage and then install PE zip.

    3. Format data then reboot to fresh pixel experience install.

    4. Set up and check encryption is enabled then reboot to TWRP.

    5. Install magisk 20.3 zip, check it says encryption and DM Verity is enabled in the log of that install (will be during the flash process)

    6. Boot to pixel experience and open the magisk manager APK, check safety net test and if failed then install safety net v3 patch from repositories and reboot.

    7. Enjoy and job done!

    Hope that can help somebody in future.

    Cheers!
    Glad you've figured it out. Format data=decryption. After flashing fastboot rom, boot till android setup and then in twrp wipe all and flash custom rom,magisk,gapps whatever you want and reboot..do not format data in any step. I also updated the post for users who want to stay encrypted. :)

    Is it possible to unlock the bootloader without mi account?
    I mean without letting mi know that u r unlocking "this" specific device...
    nope unfortunately to unlock your device you need to login to your mi account in your phone and then wait for the specified time..But you can lock it any time you want by flashing fastboot rom via mi flash and selecting "clean_all_and_lock" or just use
    Code:
    fastboot oem lock
    to lock the bootloader of your device :)