Just to close this, I think until today under Android 11 this is still messy.
I had somehow managed o flash 10 over 11, but there weere some leftover it seems and that was causing the bootloop.
clean install on 10 and everything runs nice
i had a nice mi mix 3 in black, until it fall down around a month ago, now use the poco f2 pro.
my ceramic back, the front camera glass and the display were cracked, therefore new repair parts would be more expensive than the phone ever was.
anybody here as a black mix 3 with a broken board...
Just download the latest stable here, format data in twrp and flash again.
Should be all good.
If not, download a fastboot rom and start from scratch, using Miflash tool or just flash through fastboot.
If you use MiFlash remember to use clear all option only, without relocking the bootloader...
right, i see too, magisk is more beautiful way to achieve those changes (and longer lasting)
i think also it is much more safe.
By the way, I used your module template for some apps (Elixir System)
and it works just like a charm.