[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] LyNChP1N:
--->This is a working method as of May 2023 to have root on any rom version for redmi k20pro.

--->This will help you root and keep root hidden along with using lsposed modules.

--->These steps work on any device and any rom

You can find extra guides for the steps you dont understand by searching on xda forums. Some of these guides are linked to at the bottom of this post

Your bootloader needs to be unlocked to follow this guide. See link at bottom for guides to do the same.

****************************

I am not responsible for any data loss or damage. Follow at your own Risk

****************************​

1. Install twrp or orangefox recovery on your phone.

2. Flash Magisk 25.2 (Version 26 has many issues. This version is better to use)

3. Reboot, install magisk apk(rename magisk.zip file to magisk.apk and install)

4. In magisk modules, install shamiko

5. In magisk modules, install safetynet 2.4.0

6. Add any app you want to hide root from in denylist of magisk. Additionally add Google play Services, Google play store, google services framework and google play protect to denylist(enable show system apps option in menu available on top right of denylist)

(IMP: Do not enable enforce denylist, Shamiko does this function)

7. If you have already logged into google play store and it shows device not certified in about section of play store -remove google account from phone and clear data of play store, play services, google services framework. Reboot amd try again. It will show certified status after about 10 minutes of logging in

8. Some custom roms may have device fingerprints which will get detected as custom rom. If that happens, use hide user debug and lineage props magisk module. Note: This version from github can only be flashed in Androidacy Fox Module Manager due to issue in zip packaging. Download this file which is just a properly repackaged version that can be flashed in any magisk manager.

Next install Reset Sensitive props magisk module. A combination of simply installing these modules will fix custom rom detection on any custom rom.(Example on opening whatsapp or GPay for first time)

Additional step(not necessary): Your rom may have additional build.prop entries that indicate a custom rom. Look for such build properties by opening build.prop in root browser on your device, then change any that have a custom rom name in them using magiskhideprops(Refer instructions to use magiskhideprops in the link)

9. Now, hide the magisk app in magisk app settings(set name to something like setting or app)

10. Freeze magisk manager app using link2sd/swift backup/ airfrozen or any other similar app. You can enable app when you need to install or disable modules or grant superuser access to new apps. You can also use Androidacy Fox MMM manager to find, install and remove magisk modules

_____________________________________________________________________________

Done, you can stop at this stage if you dont need lsposed.

Be warned that youw ill need to re-add any app you uninstall and reinstall in denylist.

If you want to use lsposed, continue with below steps after skipping step 10.

_____________________________________________________________________________​

11. Install lsposed module 1.8.6 zygisk version

12. Install hide my appslist. Follow instructions in this link to learn how to correctly configure and hide magisk manager, lsposed and any other root apps you have.

You will need dataisolation enable magisk module if using android 10 and below for hidemyapplist to fully work.

13. Install Ruru and 'Play Integirty API Checker'.

Run Ruru and watch it pass all tests.(almost no banking app uses the level of detection used by ruru) Use play integrity api checker to check safetynet status - should pass basic integrity and cts profile.

Momo shows some messages like abnormal environement and TEE but that is ok.

Remember that you should enable denylist and Hide my applist for Ruru/Momo similar to how you enable for banking apps to hide.

Your root access is perfectly hidden now.

_____________________________________________________________________________

If you want to hide Developer Options​

_____________________________________________________________________________

You have a few options for this.

1. I personally turn usb debugging off in settings and use WADB app to enable wireless adb. I am using this on android 11 as other options dont fully hide or trigger xposed hook detection(which does not cause issues with the banking apps I have tested so far)This is not detected by any apps.

2. If on android 10 or lower, you can use hide user debug magisk module by huskydg which you can get from this telegram channel. I dont know if it can be linked here .

This effectively hides user debug without trigerring any root/xposed detection. Ruru may show 1 entry for usb debugging enabled but that is fine. If it doesnt work, it will show 2-3 detected entries for debugging mode.

I have uploaded the file here but dont know if it will last

3. If above options dont work,use devoptshide app, enable it in lsposed for apps you want to hide user debug from.This method will trigger xposed hook detection in Ruru but none of the banking apps i tested so far have an issue with that. Ruru may show 1 entry for usb debugging enabled but that is fine. If it doesnt work, it will show 2-3 detected entries for debugging mode.

4. I have not personally tested this but this module is an updated version of hide userdebug module by huskydg and it might help hide usb debugging on android 11 and up.You will have to try it yourself for now.I expect it to work.

GitHub - Magisk-Modules-Alt-Repo/ezme-nodebug: Change some props and "remove" LineageOS ones.

Change some props and "remove" LineageOS ones. Contribute to Magisk-Modules-Alt-Repo/ezme-nodebug development by creating an account on GitHub.

github.com

_____________________________________________________________________________

If an app detects root accidentally and refuses to run on your device again even if root is not detected again/ Spoof device ID for apps​

_____________________________________________________________________________

1. Now you need to use android faker lsposed module to randomize imei, max adress, android device id,hardware id.

Enable android faker in lsposed only for the app you want to change id for. Dont enable it for android system or android framework(Goal is to change id for a single app).Before doing these steps you need to clear data of play store, play services and google services framework, remove your google account from device settings and reboot. This will reset your gsf id.

This will give xposed hook detection in butbank apps dont seem to look for it.

2. If the above method does not work, use Xprivacylua. Enable for the app you want to change id, only use setting for device identifiers,use tracking, telephony data, analytics, get applications. Xprivacylua is not properly hidden even by Hide My Applist but apps dont look for it.So use this if above options does not work.

_____________________________________________________________________________

If you need to disable Widevine L1 DRM protection to use scrcpy screen mirroring etc

_____________________________________________________________________________​

Install the liboemcryptodisabler module in magisk.Do note that widevine will drop to L3 but uninstallation brings it back to L1.

NOTE: Drm content cannot be mirrored on scrcpy if you are using android 12 or 13. Use roms with android version upto 11 if you need to watch drm protected content through scrcpy.(at your own risk. I do not advise illegal activity.)

Spoiler content hidden.

Enjoy your properly hidden rooted device with all functionalities.

___________________________________________________________________________________________________________________________________

___________________________________________________________________________________________________________________________________

I have added a few useful posts by other members if you dont know how to do any of the above mentioned steps. Any others steps can be learned with guides from XDA -Use search

1. Simple guide to flashing on K20 Pro

His advice on not using orangefox for custom roms other than stock miui/ xiaomi.eu roms may be right, I have not tried it. Orangefox personally works best for me.

2. Guide to flashing custom roms, changing between miui and custom roms

3. Bootloader unlock, twrp, root instructions and rom links

4. Common issues with Redmi K20 Pro | fingerprint unlock | ghost touch | Dim display | sensor issues | bluetooth and calling