[Xiaomi Mi A2 / 6X Guides, News, & Discussion] GuestX00508:
Hey ! Today i will give you all the different ways/steps for root your Mi A2 easily.

+ How to manually create patched_boot.img for your version (beta...) without extrernal help.​

Your warranty is now void.

We are not responsible for bricked devices, dead
SD cards... Please do some
research if you have any concerns about features
included in this GUIDE before using it! YOU are
choosing to make these modifications.

Summary

- Part 1 : Install drivers and unlock bootloader. Credit to @balazs312

- Part 2 : Root with 2 ways

- Bonus : Backup boot.img and make patched_boot.img

- Part 3 : OTA

Part 1 :

So, First you need to install drivers and unlock your phone bootloader. Skip to part 2 if already done.

1. Installing drivers & Preparing PC

- Download this and extract it

- Open and install "adb-setup-1.4.3.exe"

- When it is done, go to "Drivers" folder and start "miflash_unlock.exe"

- Click on the gear icon top right corner and click on "Check" next to "Click the button to install the drive"

- Do as the installer says

- Hopefully the drivers has been installed so we're done with it, let's head on the next step.

2. Preparing phone for unlocking

- On your phone navigate to Settings->System->About phone and tap the build number until you see "You are developer"

- Go back once and you'll see a new menu called "Developer options"

- Tap on it and search an option called "OEM Unlocking", enable it

- We're done here. Let's keep going

3. Entering fastboot and unlocking bootloader (MAKE A BACKUP of your data!)

- Hold your power button down, tap on restart and hold your volume DOWN button while it resets until you see the Mi bunny doing its thing

- Now we're in Fastboot mode, hooray

- Download this zip and extract it on your PC

- Open it and type "cmd" (without the quotations) in the file manager header where you see (This computer>somethingsomething>Mi A2 fastboot), don't be afraid just type it in, and hit enter and you'll enter into command prompt

- Now we are ready for action

- Type these commands one by one:

fastboot flashing unlock

fastboot flashing unlock_critical

After this, you will see a warning message that your bootloader is unlocked and your data is not safe, blah blah... Just ignore it everytime you power on your phone.

Part 2 :

So there are currently two ways to root his phone. Let's start with the first.

Methode 1 : We will use the new temp twrp. Method by me.

1. Download files...

- Download this TWRP.

- Place it in your adb folder.

- Download Magisk-v17.2_a and Magisk-v17.2_b.

- Copy these 2 zips in your phone internal storage.

2. Check current-slot...

- Plugin your phone to you pc

- Navigate to your settigs on your phone.

- Open Developer settings

- Enable Usb Debugging

- A pop up should appear on your phone scren, hit and box and autorize the pc.

- on your pc, open fastboot command prompt, and type "adb reboot bootloader" , your device should reboot to fastboot

- type "fastboot getvar current-slot". Remember if the result is a or b.

3. Root using temporally twrp

- Reboot your phone in fastboot.

- On your pc, open fastboot command prompt, and type "fastboot boot twrp-3.2.3-jasmine-20181020.img"

- Your phone now reboot into twrp, it down't flash it, so after a reboot twrp will be gone.

- If twrp ask a password for decrypt data put your phone PIN and validate.

- Click on install and select Magisk-v17.2_a if the result in Step 2. is A, and Magisk-v17.2_b if result is B and swipe to install.

- Then select Reboot.

Now you have Magisk 17.2 installed on your phone, and twrp is gone after reboot. You can select beta in Magisk settings and update to 17.3 if you want.

Methode 2 : We will use patched_boot.img.

1. Where to find patched_boot.img ?

- Go here and check if there is your build version. If yes dowload the patched_boot.img file ( need to be on pc ) and skip to step 2. If not continue.

- If you can't find your correct build patched_boot.img (Because you are on the beta, and nobody share the file or something like that....) you can easily make your own using temp twrp. Go to Bonus part, make your patched_boot.img and continue.

2. Pepare files.

- Copy the patched_boot.img in your adb folder

- Be sure to rename it to "patched_boot.img"

- Download latest Magisk Manager apk here (currently v6.0.1)

- Copy the apk on your phone storage.

3. Install Magisk

- Reboot your phone in fastboot.

- Open a fastboot command prompt on your pc.

- Type "fastboot boot patched_boot.img"

- Your phone will reboot, put your pin....

- Go in your prefer file explorer and Install the magisk apk.

- Now open Magisk Manager app

- Click Install, direct install. Wait for the process

- And click reboot.

Now you have Magisk 17.2 installed on your phone. You can select beta in Magisk settings and update to 17.3 if you want.

Bonus

So, i will show you how to backup your current bot img. And how to make your own patched_boot.img, so people who are on Beta OTA can root there phone without any external help...

1. Backup the boot.img

- Download this TWRP.

- Place it in your adb folder.

- Reboot your phone in fastboot.

- On your pc, open fastboot command prompt, and type "fastboot boot twrp-3.2.3-jasmine-20181020.img"

- Your phone now reboot into twrp, it down't flash it, so after a reboot twrp will be gone.

- If twrp ask a password for decrypt data put your phone PIN and validate.

- In TWRP, click on "Advanced"

- Click "File Manager"

- Navigate to /dev/block/platform/soc/c0c4000.sdhci/by-name

- You will se a lot of files, and if you look you will see 3 important files, boot, boot_a and boot_b.

- Click on the "boot" file

- Click "Copy File"

- Navigate to /sdcard

- Click the blue arrow and swipe to confirm

- Click reboot

- Copy the file on your pc, and rename it to "boot.img" instead of "boot".

Now you have backup your stok boot.img you can use it for stock or whatever you want....

2. Create the patched_boot.img file

- Download latest Magisk Manager apk here (currently v6.0.1)

- Install the apk on your phone

- Open Magisk Manager

- Go to settings , click Update Channel and select Beta

- Return to home of Magisk Manager

- Click Install, then Boot image file patch ( don't know the correct typo because for me the app is in french, champion du monde !! xD ) and wait for the end of the process.

Done you now create your own patched_boot.img ! Enjoy !!

Part 3 :

So, now i will explain you how to install OTA when you have magisk.

- First, disable Automatic system updates in developer options, so it won't install OTAs without your acknowledgement.

- Open Magisk Manager, click Uninstall, then Restore Images. Don't reboot !

- Now Search for update and wait for the process. BUT do not press the "Restart now" or "Reboot" button !

- Open Magisk Manager, hit Install, then Install to inactive slot.

- Reboot when it's done.

If it don't work (strange) and ota failed, you can find your stock boot.img for your build version here, or backup your boot.img using the[ B]1.[/B] of the Bonus part and flash it using the command "fastboot flash boot_( your current slot) boot.img" (you can check your current slot with command "fastboot getvar current-slot).

If you have issues or something like that, here are some telegram group :

MiA2dev

MiA2OffTopic

HexKernel