[Xiaomi Mi A2 / 6X Guides, News, & Discussion] balazs312:
So as I saw, there are a lot of users who's afraid of rooting their device, so I decided to make a thread where I write everything down step by step.

I'm not a man of words, so I try to keep it very minimalistic and simple, so newbies can do this too without any issue.

In this thread I'll guide your through on how to flash twrp, root, and use a custom kernel, which is called Hex and can be found here on XDA.

You need to be on September patch, otherwise I cannot guarantee that it will work.

Before we start the process, I need to say that if you brick your device because of something went wrong, don't point your finger at me, I just wrote this to help users who wants to enjoy a better experience on A2.

And one more thing. Bootloader unlocking will wipe every data on your phone so make sure to backup everything!

Let's start then, shall we?

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 :D

- Now we're in Fastboot mode, hooray:victory:

- 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.

- Hope you can keep up with me cause we're done here, let's head to the next step.

4. Installing TWRP and Magisk (and Hex kernel which is optional)

- First we need to know what is our active slot, we can check this in fastboot with "fastboot getvar current-slot"

- Download this recovery by TingyChen and also copy this to the same location

- If you have slot A as active then flash twrp to B partition and vice versa In cmd type "fastboot flash boot_a or boot_b TWRP-3.2.3-jasmine-20180804.img" (Without quotation) - Now we have twrp on our device

- Then type: "fastboot set_active A (or) B " (Also without quotation) - Depending on where you installed TWRP

- Hold down the power button and Volume UP!(This time up) and when the phone resets release the power button and keep pressing the vol up button until you enter twrp

- If you did right, you're in TWRP now, let's start flashing:cool:

- Navigate to Reboot and select Slot A (or B) at the bottom - Select the active slot where your system is

- Flash Custom Kernel (we have Hex for now)

- Flash Magisk_a if you have system on A partition or Magisk_b if you have it on B

Reboot your device and we're done with everything. Now you have fully functional Magisk and Hex custom kernel.

Now you can enable CameraAPI2 with magisk module and use google camera and some other sweet things like substraum for example.