[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Sandeeep Kiran:
Info about Persist and why it is IMPORTANT to make a Backup

To make a Backup: Go to orangefox/TWRP recovery and select the Backup option and choose the persist.img option and back that up. Make a copy on your PC for added protection.

Persist.img is "persist" which contains data that shouldn't be changed after the device shipped, for example, calibration data of chips(wifi, bt, camera, etc.), certificates, and other security-related files. Persist is having keys to decrypt several pieces of stuff, it is device-specific and you shouldn't flash persist of others, very very bad idea.

How you are losing L1? By flashing someone else persist.img file, and if you have done that you already lost it. You cannot recover it. You can still restore your own old persist back up, and if you are lucky you will get L1 back. Never play with the persist partition it has important information specific to your device.

In case you've just lost it, and you've realized it immediately (cause sensors, pop-up, L1 are broken), & haven't done anything to modify yet. Then you can try to restore the context. Try doing this in a terminal emulator like termux (case-sensitive) Termux is an app on play store (requires root):

su

restorecon -F -R /mnt/vendor/persist/

There is also this really nice guide by William Feng that explains the same but a bit better here:

Backup and restore persist on K20 Pro and 9T Pro

Pop-up Camera Stuck Open Fix

Does not work on MIUI based ROMs. The App must be used on AOSP ROMs

Due to some reason you did, your phone's pop-up camera is stuck open. Too scared to push it down, or it isn't going down.

Download the apk k20pro_motor.apk from attachments below > Install it > when you open it, the dialog box will inform you to set the current state of the camera. Then click on the button to get the pop-up camera down.

Enjoy. Complete Credits to @acervenky from https://xdaforums.com/k20-pro/themes/app-xiaomi-motor-control-k20-pro-t3984181

Xiaomi.eu and other Custom MIUI ROMs

Right, so Xiaomi.eu is a forum like XDA where devs make miui like ROMs without the Mi ads and tracking and are more optimized.

The website is: https://xiaomi.eu/community/threads/miui-11-0-stable-release.52628/

Under there, you go to MIUI 11 ROMs > stable ROMs > download the proper ROM zip file.

The direct download link is https://sourceforge.net/projects/xi...files/xiaomi.eu/MIUI-STABLE-RELEASES/MIUIv11/ or you can use: https://androidfilehost.com/?w=files&flid=300229

Now download xiaomi.eu_multi_HMK20ProMI9TPro_V11.0.5.0.QFKCNXM_v11-10.zip CAUTION, the word PRO has to be there. we have k20p not k20.

This works for only Raphael users, not Indian raphaelin users. (For raphaelin users use Orangefox 10.6 it will work then.)

The difference between Stable and beta is that in beta, newer features, security is implemented and tested, this has bugs, once those features are stable, it becomes a STABLE rom, then the next batch of features are added to the beta. Get STABLE though, it's better, the beta has weekly 2GB updates.

Now flashing is easy, Follow the rules in the first post/comment on how to flash a miui ROM.

Equally, you may also choose to use MortalOS which is a debloated MIUI ROM which can be found here -> https://xdaforums.com/k20-pro/development/memeui-12-rc5-09-05-2020-t4097469

Issues Related to L1, restoring, and china-based miui roms

Thanks to @Raaj52 for conducting experiments to confirm and collect this information.

You must have a global/Indian variant phone which currently has widevine working properly to have a chance at restoring it later. China phones can't get L1 (or at least, I haven't learned a way to do so yet.)

What is Widevine L1 and L3?:

Right, so L1 or widevine L1 is a DRM security made by google after they noticed people use root, etc to steal copyrighted videos and movies in full HD and post them somewhere else for free. (Netflix and Amazon prime video app being affected.)

Losing this, means you get L3, and widevine L3 does not allow you to stream Full HD videos anymore, but you can stream SD low-quality videos. Which is never ideal.[

Now, EU latest stable, MortalOS uses modified china vendor with k20p L1 patch

So how do I save my L1 then? L1 Retention?:

Fortunately @Raaj52 found out that if you take a full Ofox or TWRP backup or everything from EU rom, (making a save on the PC, just in case) before moving to those aforementioned China-based ROMs is good.

When you try flashing miui EU latest stable after losing it by flashing a MIUI custom ROM based on China vendors, your phone gets L1, it shows you have L1 too, however, the apps on your phone DO NOT recognize it, technically the phone recognizes the widevine L1 as broken, and somehow considers it L3.

Here is where the Backup you made comes in handy, Clean flashing the backup completely and perfectly restores your L1. He also states that moving from China-based ROMs to AOSP ROMs like EvoX via clean flash (wiping vendor as well and flashing the proper vendor before flashing the AOSP ROM in the recovery) will also restore L1 (remember to format data partition when moving from miui to AOSP)

Now, It should be noted that cross-flashing vendors is very DANGEROUS, as this may break your Fingerprint Sensor, DTBO and proximity sensors. Therefore you must always flash the proper vendor for your phone (global, Indian, china) don't try flashing a vendor that isn't for your device. Unless if it's a custom MIUI rom as custom MIUI Roms come included with a Vendor. (wipe vendor before flashing custom miui ROM, after flash, don't touch the vendor)

Global vendor and Indian vendor are partially similar, and we have reason to believe that EU stable uses a modified vendor that works for both Raphael and Rapahelin. This is why EU ROMs works on both devices (MI 9t-pro and K20-pro)

Some Things to be Cautious about and to note:

Quoting our messages on telegram here:

How Get Back To My Stock ROM and/or Lock Bootloader?

To get back to your stock ROM, you have two methods, namely recovery zip ROM flash or fastboot ROM flash.

Get your stock rom from https://xiaomifirmwareupdater.com/archive/miui/raphael/

or if you need the Indian variant, Get your stock rom from https://xiaomifirmwareupdater.com/archive/miui/raphaelin/

Now, AND THIS IS SUPER IMPORTANT. Make sure you double-check and download the proper device's Region, codename, android version, and THE TYPE!!! (there are two types: recovery and fastboot types, choose the one you need)

Now for the recovery method, flash the recovery type .zip file the same way you flash any miui custom ROM. Check guide in first post/comment for method.

Now for the fastboot method, go to your mi-flash tool and enter fastboot on your device, and flash the rom there. (Now, I personally never did this method, so I can't guide the exact steps for this method, sorry)

LOCKING BOOTLOADER: You must first be using the proper stock vendor, stock rom via fastboot, and not have magisk or any MODs running on your phone.

If you violate these, you WILL Hard brick your device.

It is because of this I VERY STRONGLY advise against locking your bootloader for any reason whatsoever. JUST DON'T!!!

However, you can you the mi-flash tool (safest) or the debloater tool to lock your bootloader if you definitely must do it.

Latest MIUI-CN builds and miui custom ROMs soft bricking your device? (Mostly Raphaelin users)

Right, so this is a Xiaomi thing, which happens to many Xiaomi-based devices. It was later observed by a member on telegram that this usually happens to devices without NFC. In our case of Raphael - This would be Indian devices or Raphaelin devices.

I personally haven't experienced this, so I can't give a personal experienced-based guide on fixing this. However, another user on telegram @rockyanexpert solved his problem and shared this guide given below with me.

[

By these same people, they made a guide here: System destroyed issues

~FINISH

~Do Comment and Thank, it'll bump this guide to be noticed more, so others can find this guide and get help as well