How to Get Out of TWRP Recovery on Xiaomi: A Complete Guide to Solutions for All Cases

Loading a Xiaomi smartphone into TWRP Recovery mode instead of a regular system is a common situation after a failed firmware, experimenting with root rights or accidentally pressing button combinations. Many users panic when they see a black screen with color buttons, but there is always a way out. In this article, we will analyze all possible scenarios, from a simple reboot to restore the system through ADB, when the phone refuses to boot normally.

It is important to understand that the reasons for getting into TWRP are different: it can be the result of installing custom firmware, a failure when updating MIUI, or even a ban of the Mi Account account after unlocking the bootloader. We will consider the solutions for each case, including situations where the system is damaged and the backup is missing. All instructions are adapted for modern Xiaomi, Redmi and POCO models (2020-2026).

If you’ve never worked with TWRP, don’t be afraid: the custom recavator interface is intuitive, and our step-by-step photo guides will help even a beginner understand it.

Why is Xiaomi loading into TWRP instead of the system?

Before you try to exit TWRP Recovery, you need to understand why the smartphone got there.

  • πŸ”„ Failed update MIUI via OTA or manually (e.g. interrupted firmware installation).
  • πŸ”“ Unlock the bootloader without installing the correct firmware.
  • πŸ“± Install custom ROM (e.g. LineageOS or Pixel Experience) with errors.
  • ⚑ Reset to factory settings via TWRP without deleting cryptographic keys (on encrypted /data devices).
  • πŸ”‹ Battery discharge during critical operations (e.g., when running through fastboot).
  • πŸ› οΈ Damage to a boot or system section due to improper root rights manipulation.

On Xiaomi devices with a locked bootloader (for example, on the new Redmi Note 12 or Xiaomi 13), hitting TWRP is often accompanied by the error "Device is locked".

If the bootloader is unlocked, but the system is not loading, the problem is the damaged partitions, which can help either restore from the backup or flash it over.

πŸ“Š Your Xiaomi boots to TWRP after
Failed update
Custom firmware installations
Unlock the loader
Resetting settings
I don't know why.

Method 1: Simple Rebut (if the system is intact)

If your Xiaomi got into TWRP Recovery by accident (for example, after pressing a button combination), and the system is actually working, just perform a normal reboot.

  1. In the main TWRP menu, click the Reboot button (usually located in the lower right corner).
  2. Select System (sometimes called Reboot to System).
  3. Confirm the action by swipe (if required) or by clicking on the screen.

If the phone is then loaded back into TWRP, it's more serious, like the boot partition is damaged or the system's core is missing, so move on to the next one.

β˜‘οΈ Pre-reboot check

Done: 0 / 4

What if the Reboot to System button is missing? This means that the TWRP does not detect the installed system.

  • πŸ—ƒοΈ System partition is deleted or corrupted.
  • πŸ”‘ The system is encrypted and TWRP cannot mount it (typically for MIUI on Android 10+).
  • πŸ“¦ Installed firmware that is incompatible with the bootloader version.

Method 2: Restore the system from the TWRP backup

If you have previously backed up through TWRP (and you must do this before any firmware manipulation), it will take only 5-10 minutes to recover.

  1. In the main TWRP menu, select Restore.
  2. Specify the backup folder (usually located in the /TWRP/BACKUPS/ or on the external SD- card).
  3. Check the recovery sections: πŸ“ Boot is the boot partition (required!). πŸ–₯️ System is the system itself (MIUI or custom ROM). πŸ—„οΈ Data is user data (unless you're afraid to lose the current one).

Swipe for confirmation and wait for the process to end.

Reboot β†’ System

Important: If the backup is built on another version of MIUI or Android, the recovery can lead to a bootloop, which requires a complete firmware re-flash.

SectionWhat does it contain?Should we rebuild?
BootThe kernel and boot filesβœ… Yes (critical to download)
SystemMIUI or custom ROM filesβœ… Yes (otherwise the system won't start)
DataApplications, settings, user files⚠️ Only if the backup is fresh
VendorXiaomi proprietary driversβœ… Yes (otherwise there will be no communications, cameras, etc.)
EFSIMEI and network settings❌ No (may cause loss of network)

If there is no backup, or recovery has not helped, move on to the next method.

πŸ’‘

Always check the checksums (MD5) of TWRP backups! A damaged archive can turn a phone into a brick.

Method 3: Install the official firmware via TWRP (for unlocked bootloader)

If the system is damaged and the backup is not, you can install the official MIUI firmware directly through TWRP. This method only works on devices with the bootloader unlocked.

  • πŸ“± Firmware in.zip format for your model (download from the official Xiaomi website).
  • πŸ”Œ USB- Cable and computer (for file transfer if internal memory is not mounted).
  • πŸ”‹ Battery charge >50% (to keep the process running).

Step-by-step:

  1. Download the firmware for your model (e.g. Redmi Note 11 - ingres_global_images...). Important: choose the version for Recovery, not Fastboot!
  2. Transfer the.zip file to the phone's internal memory or to the SD- card. If the TWRP does not see the internal memory: Connect the phone to a PC. In TWRP, select Mount β†’ Enable MTP. Copy the firmware to the /sdcard folder.

Install

Wipe β†’ Format Data

Reboot to the system.

⚠️ Warning: Installing firmware via TWRP on locked bootloaders (Xiaomi 12T, Redmi Note 12 Pro+ and later) will result in an "anti-rollback" error and total loss of performance!

What to do if TWRP writes "Failed to mount /data"
This error occurs due to the encryption of the /data partition on MIUI. Solution: 1. In TWRP, select Wipe β†’ Format Data (this will delete all data!). 2. Enter yes for confirmation. 3. After formatting, re-install the firmware. If it doesn't help, go through Fastboot.

Method 4: Exit through ADB (for power users)

If TWRP doesn't respond to the sensor or buttons and the system doesn't boot, you can try to log out via ADB (Android Debug Bridge), which requires a computer and drivers installed.

What you need:

  • πŸ’» Computer with installed ADB and Fastboot.
  • πŸ”Œ USB-cable (preferably original).
  • πŸ”§ Included debugging by USB (if previously activated).

Instructions:

  1. Connect the phone to the PC.
  2. Open the command prompt (Win + R β†’ cmd) and check the connection: adb devices If the device is displayed, go to step 3. If not, install the drivers or try another cable.
  3. Run the command to reboot to the system: adb reboot system If this doesn't work, try: adb shell reboot -p (this simulates pressing the power button).
  4. If ADB doesn’t see the device, but the phone is defined as Qualcomm HS-USB... try rebooting in Fastboot: adb reboot bootloader and then flashing through fastboot.

If the ADB- commands do not help, and the phone still loads into the TWRP, then only the flashing through fastboot (the 5 method) remains.

πŸ’‘

ADB only works if USB debugging has been enabled before! On locked bootloaders, this method is useless.

Method 5: Complete Fastboot Flashback (extreme case)

If all the previous methods didn't work, you'd have to flash your phone through Fastboot, which is the most reliable way to bring Xiaomi back to life, but it requires:

  • πŸ”“ Unlocked bootloader (otherwise, the "device locked" error will be).
  • πŸ“₯ Official firmware in.tgz or.zip format for Fastboot.
  • πŸ’» Computer with fastboot and drivers installed.

Step-by-step:

  1. Download the firmware for your model from the Xiaomi website (choose the Fastboot version).
  2. Unpack the archive into a folder (e.g., C:\miui_fastboot).
  3. Turn your phone into Fastboot mode: Turn off the device. Press Power + Volβˆ’ until the hare appears in the eardress cap.
  4. Connect your phone to your PC and check for detection: fastboot devices
  5. Run the firmware: For Windows: run the flash_all.bat file. For Linux/Mac: run./flash_all.sh.

Wait for the end (5-10 minutes) and restart.

Possible errors and solutions:

  • 🚫 Anti-rollback: So you're trying to flash the old version MIUI. Download the newer firmware.
  • πŸ”’ Device locked: bootloader locked. You need to officially unlock it through the Mi Unlock Tool.
  • πŸ”Œ "Waiting for device": no drivers or cable problem installed.

⚠️ Warning: Fastboot removes all data, including photos and apps! If your phone had important files, try extracting them first through TWRP (Mount β†’ Enable MTP).

Frequent Mistakes and How to Avoid Them

When working with TWRP and firmware, users often make the same mistakes, and here are the most common ways to prevent them:

Mistake.Reason.Decision
Failed to mount /data (Invalid argument)Encrypting the partition on MIUI 12+Execute Format Data in TWRP
E: Unknown command [log]An outdated version of TWRPUpdate TWRP to the latest version
The phone turns off when loadingBoot section damagedCheck boot.img via Fastboot
This package is for "ingres" devices; this is a ""The firmware is not for your modelDownload the correct version of MIUI
TWRP does not see internal memoryUserdata section damagedUse an external SD- card

Another common problem is bootloop after installing the firmware.

  • πŸ”„ Incompatibility of the MIUI version and the bootloader (e.g., attempting to put MIUI 14 on the bootloader from MIUI 13).
  • πŸ—‘οΈ Incomplete cleaning before firmware (old system files remain).
  • πŸ”§ Incorrectly established root rights (Magisk or SuperSU).

Bootloop solution:

  1. Download to TWRP.
  2. Run Wipe β†’ Advanced Wipe and mark Dalvik, Cache, System, Data.
  3. Fastboot or restore the backup.

FAQ: Answers to Frequent Questions

My Xiaomi is loaded into TWRP after resetting. What do I do?
This is typical of encrypted partition devices /data. When reset through TWRP, the encryption keys are reset and the system cannot mount the data. Solution: In TWRP select Wipe β†’ Format Data. Enter yes for confirmation. Reboot. If the system doesn't boot, go through Fastboot. ⚠️ All data will be deleted!
Can I log out of TWRP without losing data?
Yes, if the system is intact, but the phone is loaded into the recavator for some reason. Try: In TWRP, select Mount β†’ Enable MTP. Connect the phone to your PC and copy important files. Reboot through Reboot β†’ System. If the system is damaged, you can try to extract the data through ADB pull (if debugging was enabled).
After you log out of TWRP, the phone asks for a password, but there's no password.
This is because of the /data encryption on MIUI. Solutions: If you know the old password, enter it. If you don't know, run Format Data in TWRP (data will be deleted!). Some models are helped by the firmware via Fastboot with the clean_all_and_lock tick (but this will block the bootloader!).
TWRP doesn't respond to the sensor. How do you control it?
If the sensor is not working in TWRP, use: πŸ”§ Hardware buttons: Vol+ up/select. Volβˆ’down. Power is confirmation. πŸ–±οΈ OTG- Mouse: some versions of TWRP support USB- Mouse. πŸ’» ADB: you can send commands from a PC (e.g. adb reboot system). If nothing helps, go through Fastboot.
Can I install TWRP on the new Xiaomi (2023-2026)?
On modern devices (Xiaomi 13, Redmi Note 12, POCO F5), the installation of TWRP is complicated: πŸ”’ The bootloader is blocked after unlocking after 72 hours (on some models). πŸ›‘οΈ An Anti-Rollback mechanism is introduced, which does not allow you to roll back to the old firmware. πŸ”§ Requires a patched boot.img to bypass checks. Recommendation: Use XDA Developers to find relevant guides on your model.