[Xiaomi Mi A2 / 6X Guides, News, & Discussion] AsItLies:
After having read many threads on this subject, it seems to become overly complicated by root, not root, lock, unlock, ota updates, no ota updates, etc etc.

So some basic information first, about what this guide accomplishes and what it doesn't;

1) No root involved, not installed at any time.

2) No changes to 'System' (OTA *should* work - I've yet to verify though)

3) BootLoader has to be unlocked (and stay unlocked, re locking causes a wipe - at least for me it did)

4) Your device will show up as 'uncertified' in PlayStore

5) There's no 'tool' involved, you aren't tied to any specific software version (or Magisk version obviously)

6) You will need TWRP (I used TWRP-3.2.3-jasmine-20180804.img) and also the boot.img for your current **previous version** software.

I of course take no responsibility for any negative results you experience, it's a use at your own risk Guide, as they all are.

I. Remove any accounts (gmail etc) on the device. Also remove finger print unlock and pattern (pin etc).

II. Enable developer options; OEM unlock and adb debugging

III. Connect to pc and verify 'adb devices' see's your device. Then type 'adb reboot bootloader'

IV. Once in fastboot, verify with 'fastboot devices'. Then do 'fastboot OEM unlock' (device will wipe and reboot)

(again enable Dev options and then enable adb debugging, then again do 'adb reboot bootloader')

V. Now check which is the active partition with 'fastboot getvar currdent-slot', make a note of it being a or b.

VI. Install TWRP on the NON active partition with 'fastboot flash boot_b <name of twrp>.img' (or boot_a if that is NON active).

VII. Now set that partition active with; 'fastboot set_active b' (or a - whichever one u installed TWRP to).

VIII. Now we'll type 'fastboot reboot' BUT, before hitting enter, hold down Vol UP. Keep it down until twrp boots.

IX. Once in TWRP ('adb devices' should work), we'll type 'adb shell', then once at the shell command prompt, type:

'setprop persist.camera.HAL3.enabled 1' and <enter> then type; 'setprop persist.camera.eis.enable 1' <enter> (These values won't be propagated to any tables until after a reboot, so don't check them now) then exit adb shell with 'exit' <enter>.

X. Now we press the 'Reboot' in TWRP but choose the original slot (you jotted down above right?). So if you booted TWRP on slot B, here you will choose slot A to set active in reboot.

XI. Once rebooted you can get a Cam2API checker on playstore and verify results. I'd also suggest rebooting to fastboot mode and flashing (your specific for your current **Previous** software) boot.img in place of TWRP - I'd guess that will remove any trace of modifications so OTA 'should' work - have not been able to verify that part yet, as mentioned above.

A little long and time consuming, hopefully not too verbose. But, you can now install GCam ports and they should function properly. This is the one I installed MGCamera_5.1.0.18_R4X_v.5.1.19.apk and cursory indications are all is working well.

Hopefully you've read to here before starting (you really should do that you know, always), because here's a question to ask yourself; Is this worth it? I mean, absolutely the GCam processing software is better, but you need to ask yourself if it's worth the trouble and lack of security and possible bricking, to you?

If you do decide to go ahead, proceed slowly, take your time. If you have any questions or doubts, this is the original thread I used (with my modifications outlined above). So any credit really goes to this guide:

https://www.theandroidsoul.com/xiaomi-mi-a2-root/

EDIT to ADD (10/08/18): as noted above, TWRP was flashed to the NON active Partition. What that means is the non-active partition has the *previous* update on it, not the newest. So when re-flashing that non active boot partition (after using TWRP) you should use the boot.img from the previous version you had installed. That will hopefully remove any trace of TWRP having been installed.