[Xiaomi Mi A1 Questions & Answers] Nafis-ul-Islam:
EDIT 2: ISSUE SOLVED. Go to the bottom of this comment for how to get it done right. Credits to [MENTION=9624590]rizkyxculture[/MENTION] and [MENTION=7963375]orma1[/MENTION]

So I'm one of those people that just jumped onto the Pie release as soon as it came out, and realized only afterwards that it was by far the worst update I could've hoped for. It completely broke the focus on my GCam, (and added on top an absolutely crap UI that is in every way a downgrade from oreo's UI). I wasn't too depressed initally though, as I guessed I could easily downgrade to a previous stock version. Now after reading some posts here and there I realized that I cannot roll back my device thanks to some anti-rollback feature the Xiaomi gods implemented in Pie, and that rolling back results in a bootloop. I've seen some threads where they give a separate EFS file IIRC, but I'm quite skeptical about using it as it contains IMEI info that is unique to every device, so it might conflict with my own IMEI. Hence why I'm hesistant to flash my phone and probably face a repair bill involving a motherboard change as a consequence.

So my question is, what exactly should I do to safely revert back to Oreo (that absolutely guaranteed works, retaining IMEI and everything else), and if not, how can I fix GCam on this phone?

Aside from that I did check whether the anti-rollback feature was enabled or not using the commands, to be sure:

adb reboot bootloader

fastboot getvar anti

and got the result:

anti:

Which makes me think it's just some dud. So am I good to just flash the oreo xiaomi stock rom using xiaomi flash tool by unlocking the bootloader first?

EDIT: I'm running the March 5 security patch.

EDIT 2: Sorry for necroing this thread, but just to clear things up a bit, from my own experience, and include and clarify what [MENTION=7963375]orma1[/MENTION] said below in this thread so you don't have to scroll down. Before all this, make sure you have SYSTEM WIDE ADB AND FASTBOOT INSTALLED for simplicity's sake.

All credits go to [MENTION=7963375]orma1[/MENTION] and [MENTION=9624590]rizkyxculture[/MENTION] for your amazing efforts into this <3. None of it is mine, so thank them in their respective comments/threads if you wish to.

1. REMOVE ALL PASSWORDS AND FINGERPRINTS BEFORE PROCEEDING WHILE IN PIE, and do CLEAN DATA WIPE (do not choose the relock bootloader in Mi Flash Tool).

2. Do everything in that guide sent, and at the end, where rizky mentions flashing November update after the TWRP restore, don't do it. Instead, re-flash the March update. Thanks [MENTION=7963375]orma1[/MENTION] for your comment. If your phone just straight up boots like mine did, without bootlooping, just power it off and go to fastboot again. Link to guide: https://xdaforums.com/mi-a1/how-to/tutorial-downgrade-9-0-to-8-1-edl-imei-t3879624.

3. Once your phone boots normally, go to developer options, and uncheck the automatic system updates to prevent it from going to pie automatically later on. in the future. Install GCam at this stage if you wish (follow manual installation guide on XDA). Link: https://xdaforums.com/showpost.php?p=75541654&postcount=98

4. After you've installed GCam (which is why you're probably doing all this in the first place, or not, regardless), chances are you still want to keep your warranty (and for security reasons) and therefore you should relock your bootloader, else the servicemen are just going to see that BIG warning at your phone's boot, and are likely revoke any warranty straight up. To do this, simply go back to fastboot and type the command below in Command Prompt and WHILE FIRMLY PRESSING AND HOLDING THE VOLUME DOWN BUTTON (or copy paste the line below WHILE FIRMLY PRESSING AND HOLDING THE VOLUME DOWN BUTTON):

fastboot oem lock

Once it says okay, type the following command:

fastboot reboot

Done. Now reboot, go to system update, and download and install the November update. Enjoy your still in warranty Mi A1 with Oreo and/or GCam (just make sure you uninstall the apk when giving it to the service center should you ever need to service it). Also, the power down button press prevents the auto data wipe function from activating. Have fun.

Also I have verified this works even on the April 2019 update. Just don't update any further, else I can't be sure.