I just wanted to share my experience so maybe someone have less problems.
I got a hold of this device, previous owners didn't use it they claimed.
They did update it tho, I think it was Android 10. The installer needed android 9.
So I enabled dev, unlocked bootloader. Used twrp to format and flash back to android 9 using the provided image.
This went fine but I am unsure if I didn't remove enough since the first boot was telling me to 'repair android'.
So tried to use ubports installer now, but after it where stuck for a long time I knew something where wrong.
Where still having android boot splashscreens, but also fastboot where semi broken now, it only said 'press any key to reboot device' upon connecting it to a pc/trying to use fastboot. This is where I started using alot of time, and I went to bed.
Next day I found a registry hack, there where 3 different keys(w10).
This keept the connection up with fastboot.
I also think it made the vendor id that is checked under flashing 'be ok'
Used 'xiaomi flasher' to flash back to 8.1 Oreo factory global image.
Proceeded to update the phone from its system menu, two times to Android 9.
Now the ubports installer also worked. Fastboot seemed to communicate with the installer.
It said installation success but the boot still showed android.
From the 'restore menu' showed that the installer had problems with an 'mv' command into the /data dir. Also 3 other mv commands where failing (bootloader...).
So then I booted into fastboot, booted twrp from there. Deleted 'system' and 'data' partitions, since 'data' partition I knew for a fact where encrypted. This was the last peace of the puzzle.
Ubports installer installed again, followed the steps instructed and success.
tested *calling *camera *wifi,*gpu-accel. Very happy with few issues.
not tested *sms *alarm.
not confirmed bug *microphone goes slient after 2min in active call.