Xiaomi Mi A1
tissot
Android One
TWRP Recovery
Nandroid
Many users experience bugs like FAILED (remote: 'Flashing is not allowed in Lock State') or hanging on the Mi logo after firmware. This article will help avoid typical problems using current techniques for the Mi A1 in 2026. We will look at official and alternative unlocking methods, proven versions of TWRP, and give recommendations for backing up data before starting the procedure.
β οΈ Important: Installation process TWRP It erases all the data on the device. If you don't backup, photos, contacts and apps will be lost without recovery. DRM-Keys that can affect the quality of photos in the stock camera Xiaomi.
1. Device Preparation: What to Do Before Installing TWRP
Before you start TWRP Recovery firmware, you need to follow a few critical steps, and neglecting them can lead to a device blink (complete failure) or data loss.
First, check the MIUI version and Android build number in the Settings β About Phone menu. For the Mi A1, current TWRP versions work on all firmware, but some custom ROMs require a specific version of Android (e.g., 8.1 Oreo or 9 Pie). If you plan to install custom firmware after TWRP, check its requirements in advance.
Second, make sure that the device has USB debugging and OEM unlocking permission, which are hidden in the developer menu to activate:
- Go to Settings. β The phone.
- Click 7 times on the item "Build Number" (the notification "You became a developer").
- Go back to the main settings menu and open it for developers.
- Activate the USB Debugging and OEM Unlock switches.
β οΈ Note: On some versions MIUI release point OEM If you do, re-activate the developer menu and turn on the option again.
Finally, prepare your Windows/Linux computer and install the necessary tools:
- π§ ADB Fastboot (download the official package from Google).
- π± Xiaomi Drivers (for Windows β Mi) PC Suite or manual installation via Device Manager).
- π File. TWRP for Mi A1 (current-age β twrp-3.7.0_9-0-tissot.img).
- π Mi Unlock Tool (if the bootloader is not yet unlocked).
Make a backup of data on a PC or cloud|Check out the Android version and MIUI|Enable debugging on USB unlock OEM|Download ADB/Fastboot and Xiaomi drivers|Prepare the file TWRP fortissot-->
Unlocking the bootloader: official and alternative methods
The Xiaomi Mi A1 bootloader is locked by default, and without unlocking it, it is impossible to flash TWRP. The official method involves using the Mi Unlock Tool utility, but it has limitations: binding to the Mi Account and waiting 72-168 hours (depending on Xiaomi policy).
If you have not previously unlocked the bootloader on this device, follow the official procedure:
- Download Mi Unlock Tool from the official website.
- Log in to your Mi Account on your phone and in the tool on your PC.
- Connect the Mi A1 to your computer in Fastboot mode (turn off the phone, then press Volume Down + Power).
- Run the Mi Unlock Tool and follow the instructions. If you receive a message to wait, wait until the timer ends.
β οΈ Attention: After unlocking the Xiaomi Mi bootloader A1 All data, including photos and apps, will be deleted, and the device can be granted Unlocked status on the Fastboot menu, which will cancel the warranty (if it is still valid).
If the official method does not work (for example, due to a Couldnβt unlock error), you can use an alternative method via fastboot oem unlock.
fastboot oem unlock-goIf the command is successful, the bootloader will be unlocked without resetting. MIUI It may require additional manipulation of EDL-regime.
Official (Mi Unlock Tool)| Alternative (fastboot oem unlock)|Never unlocked |Another way-->
3. Install TWRP Recovery via Fastboot
After unlocking the loader, you can start to firmware TWRP. This will require a recovery file in.img format (for example, twrp-3.7.0_9-0-tissot.img) and access to Fastboot mode.
Connect the Mi A1 to your computer in Fastboot mode (Put Volume Down + Power When the phone is off). Open the command prompt in the ADB/Fastboot folder and execute:
fastboot flash recovery twrp-3.7.0_9-0-tissot.imgIf the firmware is successful, you'll see OKAY. But that's not enough -- you'll have to stop the stock firmware from overwriting TWRP when you first download it.
fastboot boot twrp-3.7.0_9-0-tissot.imgThis command will load the device directly into the TWRP, bypassing the stock Recovery. Now you need to manually disable the automatic overwrite:
- In TWRP, go to Mount and mark System.
- Go back to the main menu and select Advanced β File Manager.
- Go to /system/etc and find the recovery-from-boot.p file (or install-recovery.sh).
- Delete or rename this file.
Critical detail: If you do not remove recovery-from-boot.p, stock firmware will overwrite TWRP the first time you reboot it in Android.
π‘
If after the firmware TWRP device got stuck on the Mi logo, try to boot into the Recovery manually: turn off the phone, then press Volume up + Power for 10-15 seconds.
4. Typical errors and their solutions
Even with the exact instructions, users of Xiaomi Mi A1 often face problems.
π΄ Mistake: FAILED (remote: 'Flashing is not allowed in Lock State')
That means the bootloader is not unlocked.
- π Unlock the device through the Mi Unlock Tool (see Section 2).
- π If the unlock is already done, but the error remains, try the command fastboot flashing unlock.
π΄ Error: Invalid sparse file format at header magi
The problem arises when you try to flash a corrupted TWRP file.
- π₯ Download the file again from the official website.
- π₯οΈ Check the checksum (MD5) file using the certutil utility -hashfile twrp.img MD5.
π΄ The device hung on the Mi logo after firmware TWRP
This is because of the conflict between the stock core and the custom recaveri.
- π§ Check it out. TWRP Once again, then install custom firmware or Magisk for root rights.
| Mistake. | Reason. | Decision |
|---|---|---|
| device not found | There are no drivers or incorrect connection | Install Xiaomi drivers, check cable and USB port |
| failed to load auth certificate | The problem with authorization in Mi Unlock Tool | Re-link your Mi Account in your phone settings |
| TWRP doesn't touch the screen | The Incompatible Version of Recaveri | Download TWRP 3.7.0 or later for tissot |
| E: unable to mount /data | Encrypted data section | Run Format Data in TWRP (Data Loss!) |
5. Additional TWRP settings: backup, root and custom firmware
Once you have successfully installed TWRP, you can start to expand your settings, and the first thing you should do is create a full backup of your current firmware, which will save you if your custom ROM firmware fails or you have other bugs.
To create a backup in TWRP:
- Go to Backup.
- Check the Boot, System, Data and EFS sections (if any).
- Select a storage location (internal memory or microSD).
- Swipe to start the backup.
The backup file will be saved in the TWRP/BACKUPS folder, and you can copy it to your PC for security.
If you are planning to get root rights, download the latest Magisk.zip from the official repository and run it through TWRP:
- Download Magisk-v26.4.zip (up-to-date version for 2026).
- In TWRP, select Install and specify the path to the file.
- Swipe for confirmation and restart.
For custom firmware installation (e.g. LineageOS or Pixel Experience):
- π₯ Download the firmware in.zip format for tissot.
- π§Ή Run the Wipe. β Advanced Wipe (tag Dalvik, Cache, System, Data).
- π¦ Flip the firmware through Install.
- π Restart (the first download can take 10-15 minutes).
What if the phone does not turn on after the custom ROM firmware?
6.How to return the stock Recovery and block the loader
If you need to return the device to its original state (for example, for sale or warranty repair), you will need to flash the stock reavers and lock the bootloader.This process is also useful if the TWRP is unstable or you want to upgrade through OTA.
For the return of stock Recovery:
- Download the official firmware for the Mi A1 from the Xiaomi website.
- Unpack the archive and find the recovery.img file.
- Fastboot: Fastboot Flash Recovery recovery.img
To block the loader, use the command:
fastboot oem lockβ οΈ Attention: Locking the bootloader deletes all data and returns the device to the factory settings. TWRP or custom firmware without re-unblocking.
If the device doesnβt boot after locking, try flashing the full stock firmware through the Mi Flash Tool in Clean All mode. This will return the Mi A1 to the βout of the boxβ state.
π‘
Locking the bootloader will cancel all modifications, including root rights and custom firmware. The device will return to the effluent state, but will lose the ability to firmware TWRP without re-unlocking.
7. Security and optimization tips
Installing TWRP and custom firmware is a great opportunity, but it also comes with risks. Follow these guidelines to minimize problems:
π Security of data:
- π± Regularly create backups in TWRP (especially before updates).
- π Donβt store important data on your phone β use cloud services or external drives.
- π‘οΈ Install Magisk instead of SuperSU for more robust root rights management.
β‘ Optimizing productivity:
- π After custom-made firmware ROM Do the Dalvik Cache Wipe in the TWRP lag-breaker.
- π Turn off unnecessary background processes with Magisk or Greenify.
- π To save battery life, use cores with optimized profiles (e.g. FrancoKernel for Mi). A1).
π§ Solving Update Problems:
MIUI stock updates via OTA are not compatible with TWRP and custom firmware.
- Download the full service package (.zip) from the official website.
- Write it through TWRP (donβt forget Wipe Cache/Dalvik).
- Avoid updates via Settings β System Update β this will lead to a TWRP overwrite.
π‘
If the network is lost after the custom ROM firmware, check the APN settings manually or run the modem (modem.img) from the stock firmware.