How to root and install TWRP in Mi A1 – Step by step guide

Mi A1:

Mi A1 is undoubtedly one of the best budget Android One smartphone from Xiaomi. When Android P is already on the cards, there is no official update from the company yet. Here we’ll see the step by step process on how to root Mi A1 and install TWRP Recovery. There are several tools available to root your device. Magisk is one of the best and we are using it here.

If you want to root your Mi A1 without TWRP recovery you can follow this guide.

Caution: Before proceeding, make sure that you’ve taken the complete back up of your device incuding media and contacts.

Pre requisites:

  • Move the downloaded files to the folder where ADB/fast boot is installed.
  • Rename the downloaded  recovery××.img  to just recovery.img for easier access.
  • Download the latest Magisk from here in your Phone

Let’s Proceed now. Please follow the below steps in order and let us know your feedback in comments.

What we are going to do:

  • Unlocking bootloader
  • Installing TWRP
  • Installing Magisk

Unlocking Bootloader:

  • In your device, go to About phone and tap on Build number for few time. This will enable Developer options.
  • Go to settings–> developer option in your device and enable OEM unlocking and USB debugging. Below are the sample images where you can find both options.

 

USB DEBUGGING sample. Click to enlarge

 

OEM Unlock sample. Click to enlarge
  • Make sure Fastboot is installed in your PC. Here is the simple guide to install fastboot
  • Now turn off your device.
  • Once the device is completely turned off, press and hold voume down+power button at the same time. This will boot your phone into fastboot
  • Now connect your phone to your PC with the standard usb cable and wait till the phone is detected

OEM Unlocking:

  • Go to the folder where Fast boot is installed.
  • Now press SHIFT key and right-click on an empty space inside the folder and Select ‘Open PowerShell window here’ from the right click menu that appears. If your PC running on windows 10 the option will “Open command window here”
  • A PowerShell window shall open on your PC.
  • Now type the below command in the prompt to unlock your bootloader.
Command
fastboot oem unlock
  • You can use below command to confirm whether the bootloader is unlocked.
Command
fastboot oem device-info

 

Installing TWRP:

  1. Now use the below command in to install TWRP recovery. (Make sure that recovery.img is available in the current directory)
    Command
    fastboot boot  recovery.img
  2. The flashing process will start now. Once it is done, your device will boot into recovery mode now.
  3. If your device successfully rebooted in the recovery mode, Please skip this step and proceed to next process. If not
    • Disconnect your device from the PC
    • Press and hold voume down+power button at the same time to boot into recover mode
    • Connect your device with the PC via standard usb cable and wait till your phone is detected.
    • Now run the below command in your fastboot terminal.
    • Command
      fastboot set_active b
    • Try flashing the device with the same command as mentioned in the step 1.
    • If it doesn’t boot into recovery mode , it means both the times only slot B was active. So Now activate the Slot A using below command and try flashing the device. This time it should work
    • Command
      fastboot set_active a

Installing Magisk:

  • Reboot your device in TWRP screen (press and hold voume down+power button at the same time)
  • Below is how TWRP screen will appear(Color may vary depends upon the version).
  • Click on Install, Browse and select the downloaded Magisk file in your phone.
  • Swipe to confirm the flashing and wait till the process completes. Now, click on Reboot in your TWRP home page
TWRP (Click to expand)

That is it , You’ve successfully rooted your device now. You are all set to explore :). Struck any where? Please let us know in comments.

If you want to root your Mi A1 without TWRP recovery you can follow this guide.

 

Source

Leave a Reply