[Redmi K20 / Xiaomi Mi 9T ROMs, Kernels, Recoveries] starflower:
Hello Community and PE maintainers,

With a few challenges I now got Pixel Experience running well on my device and have a bit of feedback, reports and tips.

First, I think it would be a good idea to give the "Installation Steps" an overhaul. It seems a lot of people run into issues because they overlook flashing the firmware file. My suggestion would be to use the following:

Have Stock MIUI with Android 10 installed (i.e. the build number starts with a Q as in V11.0.4.0.QFJMIXM instead of a P as in V11.0.1.0.PFJMIXM)

If you have some other ROM installed, just flash the stock ROM for your device from http://c.mi.com//miuidownload/detail?device=1700361 using TWRP

Make sure your device is unlocked and has TWRP installed, boot into TWRP

Copy ZIP of the firmware onto /sdcard and flash it

The firmware file for your device is linked in the Changelog under "Vendor Links" on the download page

Format /data, type "yes" to confirm, reboot into TWRP again

Copy ZIP of Pixel Experience or Pixel Experience Plus onto /sdcard and flash it

Wipe Dalvik/Cache, reboot to system (first boot can take some time)

(optional) Only after the first boot in Pixel Experience flash additional ZIP files (e.g. Magisk)

What do you think? For reference the current one:

Next, here are some bugs and weird behaviours (Pixel Experience non-Plus):

Settings that do not survive restart

Display > (Advanced) > Lock screen display > Advanced Settings > Pick-up

System > Front camera effects > (both) Visual effect / Front camera effects (I think this is known already)

File transfer via MTP sometimes does not work, I see the files, but when I try to transfer something onto the device I get an error message. Setting file transfer as the default in developer options seems to reduce this happening. (macOS, AndroidFileTransfer app)

The first time I flashed my phone I flashed PE+ and the provided camera app had random crashes sometimes when I had HDR and AI Cam on, but not all the time. At this point in time I have PE (non-Plus) with ANXCamera installed via Magisk, so I can not tell whether this would happen on PE too.

The provided Camera app is an older one. I found ANXCamera has newer builds. As I first did not want to root my device, I flashed the ZIPs via TWRP in the same step as flashing the PE+ ROM, after boot, the Camera was the default one. I then rebooted and flashed again and it worked. That is why I included the optional step 7 above as "after the first boot". I assume there is a "on first boot" script somewhere that does some things (it also seems to remove the PE ROM ZIP from /sdcard).

Finally, some tips and tricks I found out during this weekend flashing the device in multiple configurations. Maybe this is helpful to other users.

My first flash was pretty buggy because I overlooked the firmware file. Hence the suggested steps above.

If I understand it correctly the provided camera is based off the stock MIUI camera, but at an older version and does not support GPS location tagging of photos. ANXCamera is a port of the MIUI camera too and is working pretty well for me. It has a few more features than the provided camera app, GPS tagging, and comes with davinci specific optimizations. I am running ANXCameraUnity_177.HungryIcyAmethystsunbird with 48MPFixQ_171.ImprobablePrivateBluebottle addon. If you have root, install it via Magisk Modules, else you can flash the ZIP files via TWRP. Only do this after you booted to PE for the first time and set the device up, or else it won't work. It replaces the provided camera (it is based off the same MIUI cam after all and I think it has the same vendor id). Get it at https://camera.aeonax.com/ In the default configuration if you use the double tap power button from a locked device, it asks you for finger print. You can install ANXCamera Pro from the app store and set the "Android One" toggle to true, but then you loose 960 fps slow motion camera (the app crashes if you want to shoot a 960 fps slomo, but you can turn the option off all together with the 960FPS toggle in the ANXCamera Pro app so it does not show up anymore). Maybe the maintainers can base their camera off this one in the future?

I have Magisk installed and the device still passes the SafetyNet check. Some apps do some nasty checks though. I used "Hide Magisk Manager" and the "Magisk Hide" functionality to hide it from an app and the app still didn't start. The solution was that the app searches though the internal storage for the words magisk and twrp, so I had to delete the magisk ZIPs and the TWRP folder that TWRP creates on the internal storage to store config files. Then everything worked.

I hope people find this helpful.

Best wishes

Starflower