How to get root rights on Xiaomi Redmi 7: a safe way to unlock the bootloader

The Xiaomi Redmi 7, released in the 2019, is still a popular budget smartphone among customization enthusiasts. Getting root rights on this device opens up access to hidden Android features, the ability to remove embedded software from Xiaomi (such as miui_daemon or Analytics), installing modified firmware and even overclocking the processor. However, the process is far from as simple as on older models: the company has tightened protection, and now requires official permission to unlock the bootloader via Unlock Tool.

In this article, we will discuss the current way to get root on Redmi 7 (codename onc) taking into account all the nuances of 2026: from unlocking the bootloader to installing Magisk via TWRP. Particular attention will be paid to the typical errors that lead to a β€œbrick” (turning the phone into a β€œbrick”), and how to avoid them. If you are a beginner, do not miss the sections about backup and firmware compatibility check!

1. Device Preparation: What to Do Before Unlocking

The first and most important step is to prepare your smartphone to manipulate the system, and neglecting these steps often leads to data loss, inability to unlock the bootloader, or even hardware damage.

  • πŸ“± Version MIUI: Update your firmware to the latest stable version via Settings β†’ About Phone β†’ System Update. For Redmi 7, the current version at 2026 is MIUI 14 (Android 11). Older versions may not support modern unlock tools.
  • πŸ”‹ Battery charge: at least 70%. The unlocking and firmware process can take up to 30–40 minutes, and a sudden power outage during the recording phase boot.img is almost guaranteed to result in a "brick."
  • πŸ” Backup: Copy all the important data (photos, contacts, messages) to your PC or cloud. Once the bootloader is unlocked, the phone will be reset to factory settings.
  • πŸ–₯️ Computer: You will need a PC with Windows 10/11 (for Mi Unlock Tool) or Linux/macOS (for fastboot and adb).

Pay special attention to the binding of the Mi Account. Without it, you can not unlock the bootloader!

  1. The phone has added and confirmed a Xiaomi account (via Settings β†’ Accounts β†’ Mi Account).
  2. In the account settings, the option of Synchronizing data and Find the device is enabled.
  3. The phone was not purchased in a grey way (e.g. via AliExpress with firmware for another region), and such devices may have a locked bootloader at the hardware level.

⚠️ Warning: If you bought Redmi 7 handheld, check the bootloader status through the fastboot oem device-info command. If the response is Device unlocked: false, and the previous owner did not untie your Mi Account, you can not unlock the phone. The only way out is to contact Xiaomi support with proof of purchase.

πŸ“Š You’ve already tried rooting on Xiaomi?
Yes, successfully.
Yeah, but it's a brick.
No, it's my first time.
I tried it, but it didn't work.

2 Unlock the bootloader through the Mi Unlock Tool

The bootloader on Redmi 7 is locked by default, and unlocking it is a mandatory step before getting root. Xiaomi requires official confirmation through the Mi Unlock Tool utility, which checks the account binding and waiting time (usually 7-14 days after the first binding).

Download the latest version of the Mi Unlock Tool from the official website (avoid third-party sources - there are often modified versions with viruses). Install the utility on your PC and follow the steps:

  1. Launch the Mi Unlock Tool on behalf of the administrator.
  2. Sign in with the same Mi Account as you do on your phone.
  3. Put Redmi 7 into fastboot mode: Turn off the phone, then press Volume Down + Power before the Mi Bunny logo appears.
  4. Connect your phone to your PC via the original USB- cable (importantly, cheap cables may not be transferring data to fastboot).
  5. In the utility, press Unlock and follow the instructions. If you receive a message that you need to wait, untie your account, re-attach and try again after a specified time.
Posts in Mi Unlock ToolReason.Decision
Couldn’t unlock. Wait for 168 hoursMi Accounts are tied to devices for less than 7 daysWait for the specified time without untiing the account
Current account is different from the account info on the deviceDifferent accounts on the phone and in the utilityDelete all accounts on your phone, add the right one and reboot
Device is locked. Unlock failedThe bootloader is already unlocked, but the utility does not recognize the statusSkip a step or reflash your phone via fastboot
USB debugging not authorizedUnconfirmed access to debugging via USBOn the phone in fastboot mode confirm permission (if possible)

Once successfully unlocked, the phone will automatically reset to factory settings. Don't worry, that's okay. You can now start installing a custom recavator (TWRP) and getting root.

πŸ’‘

If the Mi Unlock Tool gives you an error of 0x80070005, try disabling the antivirus and running the utility in Windows 8 compatibility mode. Also check that in Device Manager the phone appears as Android Bootloader Interface, not as an unknown device.

3. Installation of TWRP Recovery: version selection and firmware

TWRP (Team Win Recovery Project) is a customized recovery that allows you to install modified firmware, create backups and, in fact, get root. Redmi 7 (onc) has several versions of TWRP, but not all of them work consistently with the latest versions of MIUI. We recommend using the official build from the TWRP team or the proven unofficial from the developer wrztom (for Android 11).

Download the current TWRP image for Redmi 7 from twrp.me (a file with the.img extension). You will also need the fastboot utility (part of the Android SDK Platform Tools). Unpack the archive from fastboot to the root of the C:\ drive for convenience.

Download the official image TWRP For Redmi 7 (onc)|Download Android SDK Platform Tools|Enable debugging on USB developer-setting|Connect your phone to your PC in fastboot mode|Check that the drivers ADB installed (command) `adb devices` should show the device)

-->

Now, run TWRP through fastboot:

  1. Place the downloaded twrp-3.7.0_9-0-onc.img file in the folder from fastboot.
  2. Open the command prompt in this folder (click Shift + right mouse button β†’ Open the PowerShell window here).
  3. Run the command to check the connection: fastboot devices must display the serial number of your Redmi 7.
  4. TWRP: fastboot flash recovery twrp-3.7.0_9-0-onc.img
  5. Reboot to Recovery: fastboot boot twrp-3.7.0_9-0-onc.img

Critical detail: after the first boot in TWRP, you DO NOT restart to the system, otherwise the stock recavator will overwrite TWRP! Immediately proceed to the next step - install Magisk to get root.

4. Getting root rights through Magisk

Magisk is a universal root-rights tool that allows you to check SafetyNet (which is required for banking applications) and easily update your firmware. The last stable version of Magisk at 2026 is v26.4.

Download the Magisk-v26.4.zip file from the official repository on GitHub. Don't use modified builds - they may contain backdoors! You'll also need a bootloader image (boot.img) from your current firmware. It can be extracted in two ways:

  • πŸ“ From firmware: download the full firmware package for Redmi 7 (e.g. onc_global_images_V14.0.2.0.SFLMIXM_20231010.0000.00_11.0_global.zip) and retrieve boot.img from it with the archiver.
  • πŸ“± From your phone: If you already have TWRP installed, you can create a dump through Backup β†’ Boot.

Now, do the following in TWRP:

  1. Copy Magisk-v26.4.zip and boot.img files to your phone (for example, via MTP to TWRP or adb push).
  2. In TWRP, select Install β†’ Select Magisk-v26.4.zip β†’ Swipe to Confirm Flash.
  3. After installation, go to Reboot β†’ Bootloader (not in the system!).
  4. On PC, run a command to extract and modify boot.img: fastboot flash boot magisk_patched.img (where magisk_patched.img is a modified image created by Magisk).
  5. Reboot to the system: fastboot reboot

After the reboot, check for root using the Magisk Manager app (it should appear in the menu) or commands in the terminal:

su

If the command returns the #-root invitation, it is successfully received!

⚠️ Warning: If after installing Magisk, the phone gets stuck on the MIUI logo, you've used an incompatible boot.img Solution: repeat the steps in the right way or run the stock firmware through fastboot.

πŸ’‘

Using Magisk instead of SuperSU is the only reliable way to get root on modern Xiaomi without losing functionality (for example, Google Pay or banking applications).

5. Common Mistakes and How to Avoid Them

Even when following the instructions, users often encounter problems, and here are the most common root errors on Redmi 7 and how to fix them:

Mistake.Reason.Decision
Fastboot: unknown commandWrong path to fastboot or no driversInstall Android SDK Platform Tools and add the fastboot path to the environment variables
The phone is not defined in fastbootProblems with USB- cabel or driversUse the original cable and install drivers via the Mi Flash Tool
E: Failed to mount /data in TWRPEncrypted data sectionSelect Format Data β†’ Yes (All data will be deleted!)
Applications do not work after receiving rootNot coming through SafetyNetEnable MagiskHide in Magisk Settings and add apps to the exclusion list
The phone does not turn on after the firmwareIncompatible version of TWRP or boot.imgSwipe stock firmware through Mi Flash Tool in clean all mode

Another common problem is the loss of IMEI after firmware manipulation, which is caused by damage to the nvram partition.

  • πŸ“‘ Before any action, back up nvram and modem via TWRP.
  • πŸ”§ Do not use unofficial firmware from questionable forums.
  • πŸ”„ If IMEI is missing, restore the backup via TWRP or flash the stock firmware.
What if the phone doesn’t see the SIM- card after root?
If IMEI has become null/null, try: 1. Restore the nvram backup from TWRP. 2. Swipe the stock firmware through the Mi Flash Tool with the clean all and lock tick. 3. Use the SN Write Tool (requires an authorized Xiaomi account for service centers).

6 How to hide root from banking applications

Many apps (e.g. Sberbank Online, Google Pay, Yandex.Money) refuse to work on root devices due to security requirements, but Magisk offers built-in cloaking mechanisms - MagiskHide and SafetyNet.

To fool the checks:

  1. Open Magisk Manager and go to Settings β†’ MagiskHide.
  2. Enable the MagiskHide option and add to the list of apps you need to hide (e.g. Sberbank, Google Play Services).
  3. Install Universal SafetyNet Fix module via Magisk β†’ Modules β†’ Install from the repository.
  4. Reboot the phone.

Check SafetyNet status with the SafetyNet Test app (available on Google Play). If both ctsProfile and basicIntegrity show true, the cloaking worked.

⚠️ Warning: Some banking applications (e.g. Tinkoff) use additional checks that MagiskHide doesn’t bypass.In this case, only temporarily removing root through Magisk β†’ Complete removal (after restarting, the root will disappear until the next install).

7. Update firmware after receiving root

After receiving root, update MIUI through the standard Settings β†’ System Update is not allowed! This will result in root loss and possible download errors.

  • πŸ”„ Through TWRP: Download the full firmware package (.zip) for Redmi 7 from the Xiaomi Firmware Updater. Copy the file to your phone. In TWRP select Install β†’ Select firmware file β†’ Swipe to Confirm Flash. After updating, re-sweep Magisk (as in Section 4).

Through fastboot:

  1. Download the firmware in.tgz format and unpack it.
  2. Connect your phone in fastboot mode and execute the command: fastboot flash all name file firmware.sh
  3. After the firmware is installed, re-install TWRP and Magisk.

Important: When upgrading via fastboot, use the --skip-secondary flag if you have problems with the secondary bootloader (relevant for some versions of MIUI 13/14).

πŸ’‘

Updating through OTA (over the air) with root is a surefire way to get a "brick." Always use manual firmware via TWRP or fastboot!

8. Alternative ways to get root (for experienced)

If the standard Magisk method didn’t work, alternative approaches can be tried, requiring more knowledge and carrying greater risks, but sometimes helping to bypass Xiaomi’s limitations.

  • πŸ”§ Patched Boot via ADB: Remove boot.img from the firmware. Process it through Magisk Manager (Install β†’ Select and Patch a File). Sweat modified boot.img through fastboot flash boot magisk_patched.img.

Plus:

TWRP

Minus:

Install custom firmware (for example, LineageOS):

  1. Download the unofficial firmware for onc (like LineageOS 18.1 or Pixel Experience).
  2. Flip it through TWRP after the system, data, cache.
  3. Install Magisk on top of the custom firmware.

Power users also have an EDL (Emergency Download) unlock method available, which requires an authorized Xiaomi account for service centers and special equipment (Qualcomm HS-USB QDLoader 9008). This method is used to restore bricks, but we do not recommend it for normal rooting due to high risk.

FAQ: Frequent questions about root on Redmi 7

❓ Can I get root without unlocking the bootloader?
No. On all modern Xiaomi smartphones (including Redmi 7), unlocking the bootloader is a prerequisite for getting root. The workarounds (for example, through vulnerabilities in the kernel) either do not work or lead to a loss of warranty and the risk of a β€œbrick”.
❓ Why does the phone not pass SafetyNet after installing Magisk?
The reasons may vary: Installed incompatible Magisk modules (such as Xposed or game modifications); MagiskHide not activated or added applications as exceptions; Magisk unofficial build is used. Solution: remove all modules, install Universal SafetyNet Fix and restart the phone.
❓ How to return the phone to its original state (remove root and lock bootloader)?
To get Redmi 7 back to the effluent state: Download the official firmware for your model from Xiaomi. Unpack the archive and run through the Mi Flash Tool in clean all and lock mode. The bootloader will be locked, root removed, and the phone will return to factory settings. ⚠️ After this procedure, you will have to re-unblock the bootloader if you want to get root again.
❓ Will Google Pay and banking apps work after root?
Yes, but with reservations: Google Pay will work if SafetyNet passes (see Section 6). Russian banking applications (e.g. Sberbank or VTB) can block access even if SafetyNet is successful. In this case, it will help: Using the MagiskHide Props Config module to replace the device's fingerprint. Root removal via Magisk β†’ Complete removal before using the banking application.
❓ Can I get a root on Redmi 7 without a computer?
Technically, yes, but it's extremely inconvenient and risky. You'll need to: Unlock the bootloader through the Mi Unlock Tool on someone else's PC (since you have to wait 7-14 days); Install TWRP through the Official TWRP App (not always on Xiaomi); Swipe Magisk through TWRP using the OTG- USB drive cable. We recommend using the PC, so it's more reliable and easier to debug bugs.