[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] twistyplain:
Thats true. Looks like [MENTION=9926706]Oloha3[/MENTION] flashed the ROM and gapps in different partitions.

What they should have done is to change active partition to b, restart twrp, installed havoc, change active partition back to a, restart twrp again, and flashed gapps.

The A/B partition thing is a bit confusing but another thing that people don't mention often is that different items get flashed differently in this partition scheme.

Here's what I know (think I know)so far. Anybody with more accurate information is free to correct me ??

If you flash a ROM, it is installed on the non-active partition.

If you flash gapps and anything like an app update package, it goes into the active partition.

If you flash a kernel, it goes into the active partition.

If you flash magisk, it goes into the active partition.

Don't flash twrp if you're on pie because it doesn't fully support pie yet. To use TWRP, boot into it temporarily via fastboot command and do your thing(s).

Of course a developer can make the zip file to install in a different partition or both disregarding the above rules which are the defaults unless a dev chooses otherwise.

Also, the flashing order must be very specific to avoid bootloops because the bootloader, kernel, and recovery are all in the boot partition. And some things like custom kernel and magisk both alter the bootloader.

If you want to flash a custom ROM with a custom kernel and magisk you should follow these steps to avoid a soft brick.

The below steps will wipe everything from your phone including media such as photos, music and downloaded stuff so back everything up. Wiping everything will prevent encryption problems because TWRP currently doesn't support decryption in Android Pie on mi A2.

Firstly, start phone in fastboot mode and boot (Don't flash) twrp via fastboot command. Note your current active slot

From now I'm assuming you start with slot A as active.

Step 1: Wipe system, data, cache, dalvik cache, internal

Step 2: Go back and format data and type yes to confirm

Step 3: Change active slot to B

Step 4: Reboot to bootloader within twrp menu and boot TWRP again via fastboot command

Step 5: Do same wipes as in step 1 and 2: Note, everything including music, photos will be deleted so have them backuped

Step 6: Copy ROM and any other things you want to flash into phone via mtp in twrp. You can flash rom and gapps only if you don't want to root.

Step 7: Flash ROM zip. If current slot is B, ROM will go into inactive slot A

Step 8: Change active slot to A, reboot to fastboot and boot TWRP with fastboot command

Step 9: Flash gapps

Step 10: Flash kernel (optional)

Step 11: Flash magisk (optional)

Done!! Reboot system. Your phone should boot into new ROM rooted and with your custom kernel (of you chose to install them).

Note: If you flash hex kernel, your phone might go into bootloop unless you flash magisk as well.

The stable TWRP 3.2.3 has issues with newer a2 devices because they have a display made by JDI (older phones have a display made by tianma). The jdi drivers are not present in TWRP 3.2.3. However, TWRP 3.3 has them but it fails to flash zip files.

To restart twrp, dont select reboot recovery via TWRP menu. Instead, reboot bootloader and once it goes into fastboot mode use command to boot TWRP

Make sure ADB drivers for mi A2 are installed on your pc

To do any modifications to your phone, make sure in developer options you have enabled oem unlocking, disabled automatic system updates, enabled usb debugging and then used fastboot to unlock oem, unlock flashing, and unlock flashing_critical

If you don't unlock flashing_critical you won't be able to return to stock rom... Ever!!

To find the relevant fastboot commands google them. You should find them in mi a2 tutorials for unlocking bootloader and flashing custom ROM.