I'm new to Android and for a newbie I found the installation procedure often complex, confusing and frustrating. I've experiences countless boot loops, TWRP boot issues, fears of having bricked my phone. I've therefore created this instruction. Maybe other Android newbies that want to experiment with Pixel Experience on their Mi 9T/K20 get some value out of it.
TIP: If you screwed up, try repeat step 3 & 4 again to reset the device to factory ROM.
In my case, if I follow the steps below to the letter. I can get PE running on any Mi9T/K20.
However, results may vary.
FIRST: Connect your device to USB. Please note that the procedure below will erase all data!
1) UNLOCK DEVICE
a. Download miflash_unlock from http://en.miui.com/unlock/download_en.html
b. Extract the zip file to a new folder: c:\xiaomi
c. Put your Xiaomi device in Fastboot by keeping Volume DOWN + Power On/Off pressed
d. From c:\xiaomi, run: miflash_unlock.exe
e. Reboot your phone after it has been unlocked successfully
(note that Xiaomi has a wait time before your phone can be unlocked)
3) CLEAN UP EVERYTHING
a. Put your Xiaomi device in Fastboot by keeping Volume DOWN + Power On/Off pressed
b. Open a Command Window (Start > CMD)
c. Type: fastboot erase system -w
d. Type: fastboot erase boot
e. Type: fastboot erase recovery
f. Type: fastboot reboot
4) FLASH A CLEAN FACTORY ROM
a. Download the latest ROM (select type: Fastboot) from: https://xiaomifirmwareupdater.com/miui/davinci/
b. Unpack the file to c:\xiaomi
c. Open a command prompt and type: cd\xiaomi
d. type: flash_all.bat
e. Once the phone reboots, keep pressing Volume DOWN + Power On/Off to enter Fastboot
5) INSTALL TWRP RECOVERY
a. Download TWRP recovery for the K20 Mi9T from here: https://xiaomi-miui.gr/community/index.php/Thread/25256-TWRP-3-3-X-X-για-συσκευές-XIAOMI/
c. Save the downloaded file in c:\xiaomi
d. Open a command window and type: fastboot flash recovery c:\xiaomi\[name of the downloaded image].img
e. Reboot you phone by keeping Volume UP + Power On/Off pressed until it vibrates and you see the Mi logo.
f. You are now booting into TWRP
7) INSTALL PIXEL EXPERIENCE
a. In TWRP click Install and select PixelExperience
b. Click the button "Add more Zips" and add Magisk
c. Click the button "Add more Zips and add Permissiver
d. Wipe Cache/Dalvik
You device will restart and -after a short while- boot into Pixel Experience.
Enjoy it, it's great!
NOTE: To upgrade to a newer version without wiping your configuration/apps etc: download the new version of Pixel Experience for K20/Mi9T and follow steps 6E till 7E above.
Edit 15/8/2019: After using it for a few days I'm still impressed. More than good enough to work as a daily driver. I've listed below what works and what doesn't work.
Any recommendation to fix these is appreciated.
What does work (to my surprise):
- Behind glass fingerprint registration & unlock
- Face unlock with pop-up front cam
- NFC payment (bunq bank app)
- Same long battery life
- All 3 lenses in Gcam
- Everything else
What doesn't work:
- Double Tap to Wake
- Google Playground (AR)
- Slow motion and Photo Kiosk in Gcam
- I noticed that I cannot do front cam video. May need to try another Gcam APK.
- in some apps the fingerprint overlaps with the keypad making it hard to press '8'
- Netflix does not show in Google Play Store when your device is rooted.
- I disabled Pocket detection as a precaution (some suggested it may cause deep sleep)
- Adaptive Brightness. When enabled, the screen toggles unpredictably between bright and dark.
See below a potential fix in case you run into issues:
Please note: In case your device turns totally dark directly after boot, do this:
- Remove the SIM
- Find a bright room (sunlight preferred)
- Reboot by pressing power until the logo appears
- Wait until the screen turns dark (press the power button if you see the clock)
- Swipe down from the top
- You still won't see anything yet but the brightness slider is approx 1 cm from the top. Try and swipe it to the right. Keep trying until the screen lights up.
- Disable Adaptive Brightness (Settings > Display > Adaptive Brightness)
Fixed Media lags / No Audio output for all users.
Fixed SafetyNet Failure.
Added VoLTE support for all users.
Imported FOD changes by Cosmin Tanislav.
Fixed Sleep of Death.
Added Pixel3 live wallpapers support.
Miscellaneous Improvements , Padding fixes & Minor Bug fixes.