Install the Android Debug Bridge (ADB)
https://wiki.lineageos.org/adb_fastboot_guide.html
https://github.com/M0Rf30/android-udev-rules#installation
# check if device is found
adb devices
# reboot into sideload modus
adb reboot sideload
Or manually boot into TWRP recovery, holding Volume Up + Power when the phone is off. Navigate to Advanced
-> ADB Sideload
.
Update MIUI Firmware
If your current MIUI Firmware does not support Android 10, you have to update it first.
Download the newest MIUI Firmware for your device from https://xiaomifirmwareupdater.com/firmware/dipper/.
Flash the new Firmware via TWRP or via ADB sideload.
adb sideload Downloads/fw_dipper_miui_MI8Global_V12.0.2.0.QEAMIXM_4e38c51916_10.0.zip
Download and flash new LineageOS image
I’m using the LineageOS fork LineageOS for microG. Download it from here: https://download.lineage.microg.org/dipper/ (MI 8 = dipper)
The upgrade steps are the same as for the official rom: https://wiki.lineageos.org/devices/dipper/upgrade. In my case only flashing the new image.
adb sideload Downloads/lineage-17.1-20210327-microG-dipper.zip