[GUIDE] How to Root Xiaomi Mi A2 Magisk

Search This thread

Andres Videla

Member
Sep 12, 2016
24
34
Clarification:
This tutorial only works in the system compilation V9.6.10.0.ODIMIFE, August 5 2018.

Requirements:

Unlocked the bootloader, PC with the installed drivers and the adb tools.

Here is the guide on how to unblock the bootloader, install the drivers and the adb tools.

Steps:

1-Preparing the smartphone

Download Magisk manager from the following link, and install it on our cell phone.

Then we will proceed to turn off our smartphone.
Once turned off, we will press at the same time volume - and power for about 5 seconds, until our cell phone turns on (this in order to enter the fastboot mode), if everything was done correctly, the following image will appear on your screen.
fastboot.png


We connect the cell phone to the PC

2-Preparing the PC
Download the following .rar file and extract it and find two folders.
The folder "ROOT XIAOMI MI A2 MAGISK 16" is for those who wish to root their smartphone with version 16 of Magisk.
The folder "ROOT XIAOMI MI A2 MAGISK 16.7" is for those who wish to root their smartphone with version 16.7 of Magisk.

You must choose whichever you like and open it, inside it you will find the .bat file called "ROOT AUTO", (we make sure to have our smartphone connected to the PC in fastboot mode) we double click to execute it, and it will begin to flash the "patched_boot" file. After finishing the flashing, you must double click on the .bat file called "REINICIAR REBOOT" and your smartphone will restart.

Finally, open the Magisk Manager app and you can verify that your smartphone is rooted with the version you chose from Magisk.

Suggestion:

If for some reason it does not allow you to install modules, I advise you the following solution.

Enter the Magisk Maneager app, then the "Install" option, select "install" again and finally select "Direct Install (Recommended)".
With that, the boot image will be patched again, solving the problem.

Here I leave a video on YouTube that is a visual guide to the procedure.

In the future I will share a guide on how to root regardless of the compilation of the system.
 
Last edited:

hugopg

Senior Member
Jan 8, 2011
65
18
If the next OTA arrives, what should I do? Can it soft brick the device? What I need to do to update and mantain the root? Thank you
 

Tutych

Member
May 17, 2008
32
10
Yes. I just updated to 17.
Use the recommended option.
Update the manager app too.
 

Malobestino

Senior Member
Oct 14, 2010
66
12
Milan
Xiaomi Mi A2
Google Pixel 4a
NVM
I've figured it out by myself

Sorry to be such a big noob, but i don't understand how to update magisk.

I tried to follow again this guide and to use the "ROOT AUTO.BAT" file inside the ROOT XIAOMI MI A2 MAGISK 16 folder, but everytime it reboots into the system Magisk 17.1 is asking to be installed and there's no "direct install" option (i can download the zip file or select the boot img to update).

I already tried to uninstall the magisk manager app and to reinstall it only after the aformetioned procedure, but the result is the same.

I tried to install the old Magisk manager 5.8.3, to use magisk 16, but it says it's not rooted and it asks for update.

I tried following this other guide, and using the direct command "fastboot boot patched_boot.img", but the result is always the same: there's no option for direct install Magisk and there's no root.

Please help me. What am I doing wrong?


Posting the solution for all the other noobs like me:

With the new magisk version installed, I downloaded on my phone the stock boot.img (of the august firmware that is currenlty running on my phone) as indicated in this post from the OTA dump thread .

Then I launched the magisk app (still without root) and selected install, and chose boot image to patch from the download folder on the phone
The magisk app patched the boot image creating the patched_boot.img that i trasnferred on my pc.

I then used the automatic method in this thread replacing the patched boot img in the folder, rebboted the phone and now I have root on magisk 17.1

Sorry to be such a noob but I'm not very experienced with magisk
 
Last edited:

Syed Shahriar

Senior Member
Aug 10, 2018
54
4
NVM
I've figured it out by myself

Sorry to be such a big noob, but i don't understand how to update magisk.

I tried to follow again this guide and to use the "ROOT AUTO.BAT" file inside the ROOT XIAOMI MI A2 MAGISK 16 folder, but everytime it reboots into the system Magisk 17.1 is asking to be installed and there's no "direct install" option (i can download the zip file or select the boot img to update).

I already tried to uninstall the magisk manager app and to reinstall it only after the aformetioned procedure, but the result is the same.

I tried to install the old Magisk manager 5.8.3, to use magisk 16, but it says it's not rooted and it asks for update.

I tried following this other guide, and using the direct command "fastboot boot patched_boot.img", but the result is always the same: there's no option for direct install Magisk and there's no root.

Please help me. What am I doing wrong?


Posting the solution for all the other noobs like me:

With the new magisk version installed, I downloaded on my phone the stock boot.img (of the august firmware that is currenlty running on my phone) as indicated in this post from the OTA dump thread .

Then I launched the magisk app (still without root) and selected install, and chose boot image to patch from the download folder on the phone
The magisk app patched the boot image creating the patched_boot.img that i trasnferred on my pc.

I then used the automatic method in this thread replacing the patched boot img in the folder, rebboted the phone and now I have root on magisk 17.1

Sorry to be such a noob but I'm not very experienced with magisk

after a reboot root is gone and also magisk shows not installed
 

Syed Shahriar

Senior Member
Aug 10, 2018
54
4
I dont know how to help you.
For me is working fine e even after rebooting the device.

Maybe someone more experienced than me can give you a better solution

""Then I launched the magisk app (still without root) and selected install, and chose boot image to patch from the download folder on the phone
The magisk app patched the boot image creating the patched_boot.img that i trasnferred on my pc.

I then used the automatic method in this thread replacing the patched boot img in the folder, rebboted the phone and now I have root on magisk 17.1""


can u explain these methods more elaborately please?
i have downloaded noot.img from august update.
 

Malobestino

Senior Member
Oct 14, 2010
66
12
Milan
Xiaomi Mi A2
Google Pixel 4a
""Then I launched the magisk app (still without root) and selected install, and chose boot image to patch from the download folder on the phone
The magisk app patched the boot image creating the patched_boot.img that i trasnferred on my pc.

I then used the automatic method in this thread replacing the patched boot img in the folder, rebboted the phone and now I have root on magisk 17.1""


can u explain these methods more elaborately please?
i have downloaded noot.img from august update.

  • I installed magisk manager 5.9.1 on the phone and it says that magisk is missing and is asking to download magisk 17.1
  • Downloaded stock boot.img from the august update (since the phone has that firmware version installed) from the link in this post
  • I launched magisk manager 5.9.1 and once again it says that no magisk is installed
  • I tap install and choose the "patch boot image file" method and then selected the stock boot image that i previously downloaded.
  • Magisk downloads magisk v17.1 and then patchs the boot.img creating a new patched_boot.img
  • I copied that patched_boot.img on the PC

From there i basically followed the OP post of this thread.:
  • Inside the ROOT XIAOMI MI A2 MAGISK 16 folder i renamed the old patched_boot.img to old.patched_boot.img and then put the new patched_boot.img inside the folder
  • put the phone in fastboot mode and connected it to the pc
  • I ran the ROOT AUTO.bat file (which basically flashes the patched_image.img in the phone) and then REINICIAR REBOOT.bat
 
Last edited:
  • Like
Reactions: Syed Shahriar

AsterixLG33

Member
Jan 23, 2019
5
0
No wifi

Thanks for this work. Unfortunately installing Magisk v18 (performed through TWRP) removes the wifi on my Pie roms (mac address 02:00:00.:00...) The only way to fix is to remove Magisk, using the Magisk manager for instance. Do you have any solution to keep the wifi working ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Clarification:
    This tutorial only works in the system compilation V9.6.10.0.ODIMIFE, August 5 2018.

    Requirements:

    Unlocked the bootloader, PC with the installed drivers and the adb tools.

    Here is the guide on how to unblock the bootloader, install the drivers and the adb tools.

    Steps:

    1-Preparing the smartphone

    Download Magisk manager from the following link, and install it on our cell phone.

    Then we will proceed to turn off our smartphone.
    Once turned off, we will press at the same time volume - and power for about 5 seconds, until our cell phone turns on (this in order to enter the fastboot mode), if everything was done correctly, the following image will appear on your screen.
    fastboot.png


    We connect the cell phone to the PC

    2-Preparing the PC
    Download the following .rar file and extract it and find two folders.
    The folder "ROOT XIAOMI MI A2 MAGISK 16" is for those who wish to root their smartphone with version 16 of Magisk.
    The folder "ROOT XIAOMI MI A2 MAGISK 16.7" is for those who wish to root their smartphone with version 16.7 of Magisk.

    You must choose whichever you like and open it, inside it you will find the .bat file called "ROOT AUTO", (we make sure to have our smartphone connected to the PC in fastboot mode) we double click to execute it, and it will begin to flash the "patched_boot" file. After finishing the flashing, you must double click on the .bat file called "REINICIAR REBOOT" and your smartphone will restart.

    Finally, open the Magisk Manager app and you can verify that your smartphone is rooted with the version you chose from Magisk.

    Suggestion:

    If for some reason it does not allow you to install modules, I advise you the following solution.

    Enter the Magisk Maneager app, then the "Install" option, select "install" again and finally select "Direct Install (Recommended)".
    With that, the boot image will be patched again, solving the problem.

    Here I leave a video on YouTube that is a visual guide to the procedure.

    In the future I will share a guide on how to root regardless of the compilation of the system.
    1
    ""Then I launched the magisk app (still without root) and selected install, and chose boot image to patch from the download folder on the phone
    The magisk app patched the boot image creating the patched_boot.img that i trasnferred on my pc.

    I then used the automatic method in this thread replacing the patched boot img in the folder, rebboted the phone and now I have root on magisk 17.1""


    can u explain these methods more elaborately please?
    i have downloaded noot.img from august update.

    • I installed magisk manager 5.9.1 on the phone and it says that magisk is missing and is asking to download magisk 17.1
    • Downloaded stock boot.img from the august update (since the phone has that firmware version installed) from the link in this post
    • I launched magisk manager 5.9.1 and once again it says that no magisk is installed
    • I tap install and choose the "patch boot image file" method and then selected the stock boot image that i previously downloaded.
    • Magisk downloads magisk v17.1 and then patchs the boot.img creating a new patched_boot.img
    • I copied that patched_boot.img on the PC

    From there i basically followed the OP post of this thread.:
    • Inside the ROOT XIAOMI MI A2 MAGISK 16 folder i renamed the old patched_boot.img to old.patched_boot.img and then put the new patched_boot.img inside the folder
    • put the phone in fastboot mode and connected it to the pc
    • I ran the ROOT AUTO.bat file (which basically flashes the patched_image.img in the phone) and then REINICIAR REBOOT.bat