My experience in rooting Mi 10T Lite 5G

Introduction

Rooting a phone isn’t necessary for the general user, but could be useful for more advanced users. My first experience with rooting phones was around 2015 when I wanted to install an app on my second Android phone (white Sony Experia Arc S) to sync my phone’s time to the NTP servers to be as accurate as possible. Back then I didn’t have any experience in Linux and computing in general. I remember using some shady app to root it.

This guide is my experience in rooting my current (at the time of writing) Mi 10T Lite 5G phone by Xiaomi with a Windows 10 PC. It can be done in Linux too, but I did it in Windows as I already had ADB tools installed there.

WARNING

Unlocking the bootloader in most cases voids the warranty on your phone, so beware!

Prerequisites

Just have an Android phone and a Windows PC. In this guide, I’m using my Mi 10T Lite 5G phone.

Unlocking the bootloader

Xiaomi made it harder to unlock the bootloader and flash their phones. The official statement is to prevent vendors from flashing their custom ROM (custom Android version) with malware. BEWARE: Unlocking the bootloader WILL FACTORY RESET your phone!

To unlock the bootloader on Xiaomi phones:

  1. Download the “Mi Flash Unlock” app on your Windows machine and extract the zip file.
  2. Install “MiUsbDriver.exe” from this folder to install the latest Xiaomi drivers.
  3. Open settings on your phone, go to “About phone”, find the Android version (in my case MIUI version), and click on it many times until you see the text confirming you’re in the developer mode.
  4. Make sure you’re logged in to your Mi Account on the phone. If you’re not, log in or create it and then log in. The “Mi Account” option is above “Google” and “Accounts & sync”.
  5. Go to Developer options (in my case on Xiaomi phones, it’s in “Additional settings > Developer options”).
  6. Check the “OEM unlocking” option. You’ll get warnings that this will void the warranty and make your phone less secure, but hey, you choose to do this, so agree to all things.
  7. Enable “USB debugging”.
  8. For Xiaomi phones, go to “Mi Unlock Status” and check it. It will say the device is locked.
  9. Link your phone to your Mi Account.
  10. Download Android SDK Platform Tools for Windows, which will be referred to as “ADB tools” for short, and extract it somewhere on your PC (I chose C: drive).
  11. Enter the extracted folder using the “File Explorer” and copy its path.
  12. Add this folder to the PATH in Windows. On Windows 10, just type “path” in the search box and click on “Edit the system environment variables”. Click on the “Environment Variables” button which will open a new window. Under “User variables for YOUR_USERNAME” will be the “Path” row. Double-click on it. Click on the first available free row and paste the path of your ADB tools. Click on OK and reboot your computer.
  13. Go to “Mi Flash Unlock” folder and click on “miflash_unlock.exe” app.
  14. Log in to your Mi Account and verify it. I’ve used email to verify it as the verification SMS never came.
  15. Agree to all terms.
  16. Enter the fastboot mode on your phone. Click on the “volume down” and “lock” buttons for Xiaomi phones and hold them. Your phone will take a screenshot, but you need to still hold them until it reboots. In the fastboot mode, you’ll see an orange “FASTBOOT” text on the newer models like mine, or a bunny with a hat and a red star on older models.
  17. With the Mi Unlock App open, connect the phone in fastboot mode to the PC, click on “Unlock” and proceed by agreeing to all the warnings. The app will most likely fail and tell you to wait 7 days (some waited even 30 days!). Reboot the phone and use it normally and wait this that time. After the time has passed, reboot your phone in fastboot as per point 16. and connect it to the PC, open the Mi Unlock App, log in and verify, and try unlocking the phone again. This time it should succeed. If the first time fails, try immediately to unlock it again and it should work.
  18. Now you have an unlocked bootloader and a factory reset phone, and you can proceed to rooting your phone if you wish to gain root access!

Installing custom ROM

If you wish, you can install a custom ROM or the official ROM of any version.

  1. Download the ROM you wish to flash to your PC.
  2. Reboot the phone into fastboot mode (as per point 16. in the unlocking bootloader guide above).
  3. Connect the phone to the PC via the USB.
  4. To connect the phone, open the command prompt and type: fastboot devices
  5. To flash your custom ROM, type: fastboot flash recovery YOUR_CUSTOM_ROOM_PATH.zip
  6. Reboot the phone by typing: fastboot reboot

Rooting your phone

  1. Install Magisk app on your phone from the Github Releases page. Find the latest release and download the APK file.
  2. Download the ROM you wish to flash your phone with (for my Mi 10T Lite 5G, MIUI ROM was found on this website.
  3. Enter the zip file (with or without extracting it) and copy the “boot.img” to your phone via USB and note its location.
  4. Open the Magisk app and on “Magisk” click “Install” and select “Select and Patch a file”.
  5. Navigate your phone and select the “boot.img” file to patch. Note the location in the terminal window inside the Magisk app of your newly generated patched boot image file.
  6. Connect the phone to the PC and copy over the patched boot image file to your PC.
  7. After patching it, open the command prompt and type: adb devices
  8. On your phone click the option to remember your PC and select to connect it.
  9. Disconnect your phone from the PC and put it into fastboot mode (as per point 16. in the guide for unlocking the bootloader above).
  10. Connect it to the PC again and type: fastboot devices
  11. Type in the command prompt window: fastboot flash boot PATCHED_BOOT_IMAGE_PATH_ON_PC.img
  12. Find your ROMs recovery file, then type in the command prompt window: fastboot flash recovery recovery.img
  13. To reboot the phone, type: fastboot reboot
  14. Go to the Magisk app and click on “Install”. It might tell you “Device needs additional reboot for Magisk to work properly”. Do it, then open the Magisk app again.
  15. Select direct install. It will install it and reboot your phone.
  16. Download the latest SuperSU app APK file from your phone’s browser and install it.
  17. That’s it! You have gained superuser rights!

Conclusion

Unlocking the bootloader would allow you to install custom ROMs, and rooting your phone is a nice way for power users to gain more access to the phone. Just beware, with great power comes great responsibility, as you could easily mess your OS up on your phone if you do something and invoke sudo unnecessarily.