[Xiaomi Mi A1 ROMs, Kernels, Recoveries, & Other De] Creater0822:
Magisk causing boot loop

For some reason flashing Magisk 20.2 has caused a bootloop.

Before I continue with the details I'd like to define a term that I (as non-phone nerd) think is correct, which is:

Dirty flash = Flashing a LOS zip on a phone where only the "System" partition has been wiped and the "Data" partition has not been wiped.

With the above terminology I'm defining:

Clean install = Flashing a LOS zip on a phone where the partitions "Dalvik / ART Cache", "System" and "Data" have all been wiped beforehand.

If my above-given definitions are not the correct terminology, you'll still know what I'm talking about. Though if that's the case, also feel free to enlighten me to the true definition of this so called Dirty flash.

Okay moving on:

What I have discovered since many months ago is that I've been starting to receive boot loops by doing the following things that have (obviously) always worked before

Dirty flashing a newer LOS zip

Reboot into bootloader and fastboot boot TWRP from image

(optionally) followed by swapping slot, flash TWRP cause LOS' stock recovery sucks, then swap the slot back of course

Flash OpenGapps: Which since any version newer than 6 oct 2019 throws a stupid error falsely claiming that my device's architecture's ARM, however I have noticed that those newer OpenGapp zip files flash fine on a clean install without throwing that dumb error. (More on that later)

Flash Magisk: Since idk-how-many-months anymore, flashing Magisk after a dirty flash always causes a boot loop.

As additional information about the above-summarized: My many-months-old installation of LOS was capable to have Magisk updated up to 20.1, it was version 20.2 which had produced a boot loop.

So next up:

I finally decided it was probably time to just waste a lot of hours installing the latest LOS clean and go through the painfully boring trial of re-installing all my apps, Magisk modules, Xposed modules and worst of all do every setting on every app.

So I did all the conventional steps of flashing LOS, flashing TWRP (cause LOS' stock recovery sucks), flashing OpenGapps, flashing Magisk

and I flashed Canting

My system boots fine, no boot loops at all. But I soon noticed that System UI kept crashing and crashing. I theorized that it's likely because of Canting, since I afterwards noticed that Canting wasn't updated for months (This is semi-off-topic as I don't expect to need help solving these crashes)

With the previous problem occurring I had decided to wait for the next day's LOS to come out and dirty flash it over, so that this Canting kernel (which was probably the cause of my crashes) would be overwritten by LOS' stock kernel, just simple reasoning.

Finally: I dirty flashed the one day newer LOS and all the other stuff, and I get a boot loop.

(optional fact) Trying to install the latest OpenGapps (which had worked on clean install the previous day before) I again get the "Your phone's architecture is ARM" nonsense as error.

Now to put it all together:

After many months of laziness I've finally decided it was time to formulate this issue into a post and just share it. With that said: Here's the problem in details, good luck giving me possible answer(s) on why this is happening.