How to Install TWRP Recovery and Root Xiaomi Mi A1 using Magisk

Root Xiaomi Mi A1 and Install TWRP Recovery

TWRP now officially supports Xiaomi’s first Android One device. Follow this guide to easily install TWRP recovery and root Xiaomi Mi A1 (Tissot) on Android Pie and Oreo using Magisk.

The rooting scene has been pretty challenging since Google released the first generation Pixel devices in 2016. The devices brought the all-new A/B partitioning system to support seamless system updates. Overall, this was a great innovation and prevents any scenario of an unbootable device after an OTA update. But the new partition scheme brought enough obstacles for the development community to overcome. Since the release of the Mi A1 in September 2017, the developers have been trying the best to find a working solution for root and TWRP.

After a lot of testing and updates, the Mi A1 gained the official support of TWRP in 2018. Ever since then, the recovery has been constantly updated and is now compatible with Xiaomi Mi A1 running Android Pie, Oreo, and Nougat. TWRP for Mi A1 is being maintained and developed by XDA Recognized Developer nicknitewolf. An unofficial version of the recovery is also available, which supports Treble-based custom ROMs and is being maintained by XDA Senior Member Giovix92.

Root Xiaomi Mi A1 and Install TWRP Recovery

The instructions below will help you install TWRP on Xiaomi Mi A1. It will begin by temporarily booting the TWRP recovery image and then installing the image using the ‘Install Recovery Ramdisk’ option. Once installed, you can flash the Magisk installer zip file to easily root Xiaomi Mi A1.

Table of Contents

Prerequisites

  • Before you do anything, make sure to backup your device completely. You can follow our guide on how to backup Android phones.
  • In order to install TWRP and root, you must first unlock your phone’s bootloader. Note that unlocking the bootloader will wipe all the data stored on the phone. So make sure that you have backed-up all your data beforehand.
    • To do so, boot your phone into Fastboot Mode. Then connect it to the PC using the USB cable and execute the following command via the CMD/PowerShell:
      fastboot oem unlock
  • Download and install Xiaomi USB Drivers on your PC.
  • Charge your Mi A1 to at least 50-60% battery level. This shall help avoid any sudden shutdowns during the process.
  • Install ADB and Fastboot on your PC. You can also use Minimal ADB and Fastboot alternatively.

Make sure that you have fulfilled all the requirements listed above before you head below to the instructions to install TWRP recovery and root Xiaomi Mi A1.

Downloads

Note: Starting with TWRP 3.3, there’s no need to download a separate installer zip. You can simply use the ‘Install Recovery Ramdisk’ option to permanently install the recovery.

How to Install TWRP Recovery on Xiaomi Mi A1

  1. Download TWRP recovery image for your Xiaomi Mi A1.
  2. Connect your phone to the PC and transfer the downloaded file to the phone’s storage.
  3. Power off your phone completely.
  4. Press and hold the Volume Down + Power buttons altogether to boot your Mi A1 into Fastboot Mode.
    Install TWRP Recovery on Xiaomi Mi A1 - Boot into Fastboot Mode
  5. Copy the TWRP recovery image (e.g. twrp-3.3.1-0-tissot.img) file to the folder where all the ADB and Fastboot binaries are present (e.g. C:\adb).
  6. Press the SHIFT key and right-click on an empty space inside this folder.
  7. Select ‘Open PowerShell window here’ from the menu that appears.
    Open PowerShell on Windows
  8. Enter the following command to make sure that your device is being detected properly. If you’re using Linux/macOS, make sure to add dot and front-slash (./) prior to the command(s).
    fastboot devices
  9. The command shall return a device ID, along with the ‘fastboot’ message.
    Root Xiaomi Mi A1 - Fastboot Devices command
  10. Now, enter the following command to temporarily boot TWRP recovery on Mi A1:
    fastboot boot twrp-recovery-image.img
  11. Make sure to replace “twrp-recovery-image.img” with the actual filename of the TWRP recovery image.
    • For example:
      fastboot boot twrp-3.3.1-0-tissot.img
  12. The device should now boot into TWRP recovery mode.
  13. Go to the ‘Advanced’ menu in TWRP and tap on the ‘Install Recovery Ramdisk’ option.
  14. Select the TWRP recovery image file (twrp-3.3.1-0-tissot.img).
  15. Finally, swipe the button to confirm the flashing process and permanently install TWRP recovery on your Xiaomi Mi A1.

Now with TWRP installed, you can follow the instructions below to root Xiaomi Mi A1 using Magisk.

Recommended: Enable Camera2 API and Download GCam Port for Xiaomi Mi A1.

Instructions to Root Xiaomi Mi A1

  1. First, download the latest Magisk installer zip file.
  2. Power off your Xiaomi Mi A1 completely.
  3. Press and hold the Volume Up and Power button to enter TWRP recovery mode.
  4. Go to the ‘Mount’ menu in TWRP.
  5. Tap on the ‘Enable MTP’ button and connect your phone to the PC using the USB cable.
  6. Download the Magisk installer zip file and transfer it to your phone’s storage.
  7. Once transferred, disconnect the phone from the PC.
  8. Go back to the TWRP main screen and tap on the ‘Install’ button.
  9. Navigate to the storage and select the Magisk installer zip file (Magisk-v20.3.zip).
    Flashing Magisk in TWRP to Root Xiaomi Mi A1
  10. Finally, swipe the button to flash the file and root Xiaomi Mi A1 using Magisk.
  11. Press the ‘Reboot System’ button.

Once your Mi A1 boots into the OS, you shall see “Magisk Manager” in the app drawer. You can leverage it to hide root from certain apps or install modules to customize almost any aspect of the software. You can now also use root-enabled apps on your device, install mods like ViPER4Android and Dolby Atmos, and customize it to your needs.

If you have any trouble while performing the instructions to install TWRP and root Xiaomi Mi A1, then feel free to drop a comment.

TWRP source: 1, 2