• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Howto][China] Flash TWRP, custom ROM and fix Google Pay

Search This thread

ionflux

Senior Member
Sep 27, 2011
78
23
I realize that there's no howto guide yet on this forum. To a new Xiaomi device user, this can be daunting.

This is my guide on how I flashed my China Redmi K20 Pro and fixed Google Pay.

I am NOT responsible for whatever happens to your device as a result of following the below instructions.

At all times remember to download only the ones applicable for the China version i.e. recovery, ROM.

EXTRA:: New phone out of the box and waiting for bootloader unlock?
Install Google Play. Some of the download links in the thread are outdated so it is best to go to apkmirror.com to search, download and install them.

1) In order to flash any custom ROM, the bootloader must be unlocked
Xiaomi locks this by default on all devices. You must unlock it before proceeding to next steps, or you will brick your device. If it's bricked, try this or read the last section of this post.
i. Check Mi lock status from Developer Options. To enable Developer Options, go to Settings -> My Device -> All Specs -> tap on MIUI version. The Developer Options will appear in Settings -> Additional Settings eventually after about 7 taps.
The unlock time can take anywhere from 2 days to 30 days. You can check the timer in step 1vi. You no longer need to apply to Xiaomi to unlock the bootloader.
ii. Download the miflash_unlock_en_3.3.827.31. Extract the zip and run miflash_unlock.exe
iii. On the computer, sign in to the same mi account that's being bound to your phone.
iv. Send the phone to fastboot mode (power down, then power button + volume down button at the same time until the android picture appears).
v. Connect the phone to the computer by USB.
vi. On the computer, attempt to proceed to unlock. It will show you the number of hours left that you need to wait before the phone can be unlocked. Try again after that.

2) Bootloader unlocked
When you try to unlock the phone now (step 1iii - vi), the phone's screen will suddenly change while your mi unlock tool is "verifying" the phone. The tool will say error unlocking. This is normal. On the phone's screen, after progressing about 10% it will appear to reset. Your phone is now unlocked. You can verify the lock status by repeating step 1.

3) Install TWRP custom recovery
You need an Intel (AMD Ryzen seems to be an issue) Windows PC and ADB/fastboot installed. If you don't already, download from here.

There are several recoveries out there, but this one works for me. Download your choice into your PC. When you are done:
i. Open PowerShell (in File Explorer, shift + left click on an empty space) in that folder you downloaded into. If it's a zip, extract to get the .img file.
ii. Send phone into fastboot mode (power down, then vol down button + power button together).
iii. Connect phone to computer.
iv. Type
Code:
fastboot devices
into the PowerShell window. On your computer, you will be able to see that the phone is now in fastboot mode.
v. Type
Code:
fastboot flash recovery TWRP-3.3.1-0529-REDMI_K20PRO-CN-wzsx150.img
vi. When done, send your phone into TWRP recovery (vol up button + power button together).
Note: You must complete step vi or you will lose TWRP recovery because official ROMs restore to official recovery. If you missed this step, you must repeat from steps 3ii to go into TWRP.

4) Send ROM to your phone. If you have the ROM downloaded into your phone already, you may skip this step
Choose a ROM from the ROM section. For me, I use xiaomi.eu 9.8.22. Direct download link for the lazy.
Continuing in the same PowerShell window, type:
Code:
adb devices
adb push "D:\xiaomi.eu_multi_HMK20ProMI9TPro_9.8.22_v10-10.zip" /sdcard/
Replace D:\...... with the full path to the downloaded ROM. The file transfer may take some time. Wait for the PowerShell window to finish the executing command. It took 320 seconds for me.

5) Flash the ROM
For a clean ROM install, be sure to wipe the data, Dalvik and cache partitions. It is called a dirty flash if you wipe only Dalvik and cache.
i. On your phone while still in TWRP, go to Wipe -> Advanced Wipe -> select Dalvik / ART Cache and Data partitions. DON'T choose the FORMAT DATA or wipe any other partition.
ii. Select Install, then choose the ROM and swipe to start the flash. Alternatively, you can also run the same by continuing in the PowerShell window:
Code:
adb shell twrp install /sdcard/xiaomi.eu_multi_MI9_9.8.22_v10-10.zip
iii. When done, select "Reboot System". The first startup will take some time (maybe 3 minutes). You may disconnect the cable from the computer now.

6) Congrats! You are now using a custom ROM!

7) Set up Google Pay
Last tested and still working on 29 August 2019.
There's still one last obstacle. It seems that even though we can pass SafetyNet, Google Pay still doesn't want to work.
a) Make sure Google Pay app has already been installed and run once.
b) Install Magisk Manager
i. Open the App and then download the Magisk zip file.
ii. Send the phone into recovery. Power down the phone, then power button + vol up button at the same time.
iii. Select the Install menu, then select the Magisk zip file and slide to confirm flash. When done, select "Reboot to system".
c) Open Magisk App, then under Downloads, find and install Busybox for Android NDK and SQLite3 for ARM aarch64. Reboot phone.
d) Download the GPay SQLite Fix (more reading here)
Which version to use? It depends on how you want the fix:
Fix stays even if Magisk is uninstalled - use v1.5
To uninstall later, use Termux, type in the following:
Code:
su
chattr -i /data/data/com.google.android.gms/databases/dg.db
Grant superuser to the App when prompted.
Fix is uninstalled together when Magisk is uninstalled - use v1.7
e) Open Magisk app, go to Modules, press on the + button to custom select a module. Select file manager, then browse to the downloaded zip file. When done flashing, reboot phone. You can begin to setup contactless payment next.
If you used v1.5, you may uninstall Magisk now.

TIP: You need to change the NFC method if you want to use Google Pay.
Under Settings, go to Wireless & Networks -> More -> Secure element position -> Use HCE Wallet.






Help! It keeps rebooting into TWRP and never into my ROM!
I hope you never end up needing this. But if it did happen:
a) Download and install MIUI ROM Flashing Tool from MIUI.com. Guide is also available in the page.
b) Download a fastboot ROM from here example: China V10.3.8.0PFKCNXM Fastboot.
c) Unzip into a directory with no space in between:
Code:
D:\Redmi K20 Pro\fastboot - NOT OK
D:\Redmi_K20_Pro\fastboot - OK
d) Send phone to fastboot mode (power down, then vol down button + power button together).
e) Connect phone to computer
f) Open the MIUI ROM Flashing Tool. Browse to the directory where you had extracted the file e.g. D:\Redmi_K20_Pro\fastboot\raphael_images_V10.3.8.0.PFKCNXM_20190601.0000.00_9.0_cn
The program always defaults to "clean all and lock". This option will install the official ROM and lock the bootloader.
Make sure to change to "clean all" to keep the bootloader unlocked.
tongyong-3-3.jpg

g) Press "refresh" to confirm your phone is listed and then press "flash" when you are ready.
The flashing process will take several minutes. Do not disconnect the cable.
The program will show "success" under result.
Your phone will automatically boot into the official ROM.
You may then repeat step 3 Install TWRP custom recovery.
 
Last edited:

karltabby

Member
May 15, 2015
49
2
im having issue with twrp, i flashed it successfully and boot to the system(rom) but when i try to boot to recovery the stock recovery overwrites twrp, flashed 4x same result, how to fix this?
 

Robbo.5000

Senior Member
Dec 8, 2016
1,072
712
Redmi K20 Pro
I realize that there's no howto guide yet on this forum. To a new xiaomi device user this can be daunting.

This is my guide on how I flashed my Redmi K20 Pro and fixed gpay.

I am NOT responsible for whatever happens to your device as a result of following the below instructions.

EXTRA:: New phone out of the box and waiting for bootloader unlock?
Install Google Play. Some of the download links in the thread are outdated so it is best to go to apkmirror.com to search, download and install them.

1) In order to flash any custom ROM, the bootloader must be unlocked. Xiaomi locks this by default on all devices. You must unlock it before proceeding to next steps, or you will brick your device.
i. Check Mi lock status from Developer Options
To enable Developer Options, go to Settings -> My Device -> All Specs -> tap on MIUI version. The Developer Options will appear in Settings -> Additional Settings eventually after about 7 taps.
If this is locked, you will need to apply to Xiaomi to unlock. This can take anywhere from 2d to 30d. I think it is a random countdown timer set by Xiaomi. Mine took 7 days.
ii. You will be able to download their unlock tool (miflash_unlock_en_3.3.827.31) after applying. Extract the zip and run this tool (miflash_unlock.exe).
iii. On the computer, sign in to the same mi account that's used on your phone.
iv. Send the phone to fastboot mode (power down. then power button + volume down button at the same time until android picture appears)
v. Connect the phone to the computer by USB
vi. On the computer, attempt to proceed to unlock. It will show you the number of hours left you need to wait before the phone can be unlocked. Try again after that

2) Bootloader unlocked
When you try to unlock the phone now (step 1iii - vi), the phone's screen will suddenly change when your mi software is "verifying" the phone. The software will say error unlocking. This is normal. On the phone's screen, after progressing about 10% it will appear to reset. Your phone is now unlocked. You can verify by trying step 1.

3) Install TWRP custom recovery
There is a thread here that links to the custom TWRP made for Redmi K20 Pro. The last time I tried the download link had expired, so I used the archived one linked by the thread poster.
After extracting the zip, you will find a few important files:

These are essentially all you need to flash the custom recovery.
i. Open PowerShell in that folder you unzipped into. (In File Explorer, shift + left click on an empty space)
ii. Send phone into fastboot mode (power down, then power button + vol down button together)
iii. Connect phone to computer
iv. Type into the PowerShell window. You will be able to see that the phone is now in fastboot on your computer.
v. Type
vi. Type
vii. Your phone should boot into TWRP now.

4) Send ROM to your phone. If you have the ROM downloaded into your phone already, you may skip this step.
I downloaded the stable ROM 10.3.12.0. Direct link for the lazy
Continuing in the same PowerShell window, type

Replace D:\...... with the full path to the downloaded ROM. The file transfer may take some time. It took 454 seconds for me.

5) Flash the ROM.
Before flashing the ROM, clean the data and Dalvik cache partitions.
i. On your phone while it's still in TWRP, go to Wipe -> Advanced Wipe -> select Dalvik Cache and Data partitions. DON'T wipe any other partitions.
ii. Go back to home screen. Now go to Install menu, then select the ROM.zip in your /sdcard/ directory. Slide to confirm flash. When done, select "Reboot to system". The first startup will take some time (maybe 3 minutes).

6) You are using xiaomi.eu ROM (yay!)
Congrats! You are now using xiaomi.eu ROM!

7) Set up Google Pay
There's still one last obstacle. It seems that even though we can pass SafetyNet, Google Pay still doesn't want to work.
As of this post, I have tried this fix and it works.
Make sure Google Pay app has already been installed and run once.
a) Install Magisk Manager
i. Open the App and then download the Magisk zip file.
ii. Send the phone into recovery. Power down the phone, then power button + vol up button at the same time.
iii. Select Install menu, then select the Magisk zip file and slide to confirm flash. When done, select "Reboot to system".
b) Open Magisk app, then under Downloads, find and install busybox. Reboot phone.
c) Download the gpay sqlite fix (more reading here)
d) Open Magisk app, go to Modules, press on the + button to custom select a module. Select file manager, then browse to the downloaded zip file. When done flashing, reboot phone.
OPTIONAL: If you don't want Magisk, you can uninstall it now. After the phone reboots, you can begin to setup contactless payment.
If you want to keep Magisk, then you should hide Magisk Manager and all other apps that check for rooting i.e. Google Pay and other banking apps.

TIP: You need to change the NFC method if you want to use Google Pay
Under Settings, go to Wireless & Networks -> More -> Secure element position -> Use HCE Wallet.
You no longer need to apply for unlock permissions. This has been the case for a few months. I've no idea why Xiaomi don't take down the unlock request page.

---------- Post added at 03:04 PM ---------- Previous post was at 03:02 PM ----------

im having issue with twrp, i flashed it successfully and boot to the system(rom) but when i try to boot to recovery the stock recovery overwrites twrp, flashed 4x same result, how to fix this?
MIUI will restore stock recovery on reboot. After flashing TWRP immediately boot into TWRP and install Magisk. This will prevent stock MIUI from restoring stock recovery.
 

ionflux

Senior Member
Sep 27, 2011
78
23
im having issue with twrp, i flashed it successfully and boot to the system(rom) but when i try to boot to recovery the stock recovery overwrites twrp, flashed 4x same result, how to fix this?

you cannot boot into system after flashing twrp. on the official ROM they will restore to the official recovery. you need to flash a custom ROM like xiaomi.eu while in TWRP, then boot into system.
 

karltabby

Member
May 15, 2015
49
2
you cannot boot into system after flashing twrp. on the official ROM they will restore to the official recovery. you need to flash a custom ROM like xiaomi.eu while in TWRP, then boot into system.

If i flash eu rom while on twrp after reboot twrp will stay as default recovery? Someone tol me to flash "descript" i have no idea what it is
 

Robbo.5000

Senior Member
Dec 8, 2016
1,072
712
Redmi K20 Pro
can you share the link to this? i wouldn't dare to try flashing a custom ROM without unlocking
You still need to unlock the bootloader and you will most likely need to wait to unlock it, probably 7 days. But you no longer need to apply for unlock permissions for your Mi account.
There are still a lot of Xiaomi bootloader unlock How-to articles being written that tell you to go to the Xiaomi bootloader unlock permission webpage and apply for unlock permissions for your Mi account. This is not necessary anymore.

---------- Post added at 06:06 PM ---------- Previous post was at 06:01 PM ----------

you cannot boot into system after flashing twrp. on the official ROM they will restore to the official recovery. you need to flash a custom ROM like xiaomi.eu while in TWRP, then boot into system.
If you want to keep an official ROM, then you need to install Magisk.
Though if you are not installing a custom ROM or you're not installing Magisk, then I'm not sure why you'd be installing TWRP.
 

karltabby

Member
May 15, 2015
49
2
I am having this slight issue of restarting my device of freezing at the redmi logo for awhile and the phone just shuts down, if i try to power the phone for a couple of times then it will bbot up, can you help me out how to solve this? Im still on stock rom/recovery

---------- Post added at 11:53 PM ---------- Previous post was at 11:28 PM ----------

am having this slight issue of restarting my device of freezing at the redmi logo for awhile and the phone just shuts down, if i try to power the phone for a couple of times then it will bbot up, can you help me out how to solve this? Im still on stock rom/recovery, this problem started after i flashe twrp a couple of times i am unlocked btw
 

ionflux

Senior Member
Sep 27, 2011
78
23
You still need to unlock the bootloader and you will most likely need to wait to unlock it, probably 7 days. But you no longer need to apply for unlock permissions for your Mi account.
There are still a lot of Xiaomi bootloader unlock How-to articles being written that tell you to go to the Xiaomi bootloader unlock permission webpage and apply for unlock permissions for your Mi account. This is not necessary anymore.

How do you find the official link to download the unlock tool or trigger the countdown if you don't do the apply?

If you want to keep an official ROM, then you need to install Magisk.
Though if you are not installing a custom ROM or you're not installing Magisk, then I'm not sure why you'd be installing TWRP.

I'm quite certain this thread is about how to flash a custom ROM and I was explaining why the user was having trouble entering TWRP and kept returning to the official recovery. Perhaps you want to clarify why you're talking about magisk on an official ROM?
 
Last edited:

ionflux

Senior Member
Sep 27, 2011
78
23
If i flash eu rom while on twrp after reboot twrp will stay as default recovery? Someone tol me to flash "descript" i have no idea what it is

Yes, that's how it worked for me. I am not aware of a "descript".


I am having this slight issue of restarting my device of freezing at the redmi logo for awhile and the phone just shuts down, if i try to power the phone for a couple of times then it will bbot up, can you help me out how to solve this? Im still on stock rom/recovery

---------- Post added at 11:53 PM ---------- Previous post was at 11:28 PM ----------

am having this slight issue of restarting my device of freezing at the redmi logo for awhile and the phone just shuts down, if i try to power the phone for a couple of times then it will bbot up, can you help me out how to solve this? Im still on stock rom/recovery, this problem started after i flashe twrp a couple of times i am unlocked btw

After you flash TWRP and the phone enters into TWRP, can you install a custom ROM?
 
Last edited:

karltabby

Member
May 15, 2015
49
2
I thinki can i just did not flash any custom rom atm, im scared that i might brick my device since im experiencing this freezing at the redmi logo
 

Robbo.5000

Senior Member
Dec 8, 2016
1,072
712
Redmi K20 Pro
How do you find the official link to download the unlock tool or trigger the countdown if you don't do the apply?



I'm quite certain this thread is about how to flash a custom ROM and I was explaining why the user was having trouble entering TWRP and kept returning to the official recovery. Perhaps you want to explain clearer why you're talking about magisk on an official ROM?
If you want to be safe and download the unlock tool from the Xiaomi site, then yes you are forced to fill the request for unlock permissions before you can access the download. But there are plenty of reliable sources where you can download the unlock tool.
When you create a Mi account it now has unlock permissions automatically.
The countdown will start when you 'Add Device' in the Mi Unlock Status screen within the Developer Options settings. In the last 3 months I've unlocked 2 Xiaomi phones and I've never applied for unlock permissions.


The user with the problem of losing TWRP did not mention whether they want to install a custom ROM or stay on stock. They may have been using your guide only for the TWRP installation. I was giving the information, should they wish to stay on stock.
 
  • Like
Reactions: ionflux

iXanza

Inactive Recognized Contributor
Apr 26, 2011
3,791
2,408
Subang Jaya
Hi @ionflux. I tried this and still got an error from gpay saying device has been rooted or altered in some way. I am on stable china rom with magisk and unlocked bootloader. When installing the sqlite fix I get a message in magisk saying sqlite3 binary is not found
 
Last edited:

Robbo.5000

Senior Member
Dec 8, 2016
1,072
712
Redmi K20 Pro
I thinki can i just did not flash any custom rom atm, im scared that i might brick my device since im experiencing this freezing at the redmi logo
If you get in to trouble with your phone, then you can restore your phone by installing an official fastboot ROM. If you have bricked your phone, but can boot to the fastboot screen and have a unlocked bootloader, then you can restore the phone this way.
Download the latest official fastboot ROM from here.
https://forum.xda-developers.com/k2...irmware-10-3-8-0-9-6-13-t3939647/post79726515
Then follow this guide to flash the ROM via fastboot.
http://en.miui.com/a-234.html
In step 5 you need to make sure the option at the bottom is 'Clean All', otherwise you will lock the bootloader again.
 
Last edited:
  • Like
Reactions: zain720 and ionflux

karltabby

Member
May 15, 2015
49
2
Is there a situation that flashing twrp acouple times will mess up the device? Ive just experience this freezing after i flash twrp like 7x,do you think i can just dive in and flash eu rom? My bl is unlocked so that makes my devices restorable?
 

Robbo.5000

Senior Member
Dec 8, 2016
1,072
712
Redmi K20 Pro
Is there a situation that flashing twrp acouple times will mess up the device? Ive just experience this freezing after i flash twrp like 7x,do you think i can just dive in and flash eu rom? My bl is unlocked so that makes my devices restorable?
Normally, installing TWRP shouldn't cause issues, it's irrelevant how many times you try and install TWRP. I would say go ahead and flash an eu ROM. If you still have freezing issues when booting, then restore the phone and see if that fixes it. If so then start again with the TWRP and eu ROM install.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    I realize that there's no howto guide yet on this forum. To a new Xiaomi device user, this can be daunting.

    This is my guide on how I flashed my China Redmi K20 Pro and fixed Google Pay.

    I am NOT responsible for whatever happens to your device as a result of following the below instructions.

    At all times remember to download only the ones applicable for the China version i.e. recovery, ROM.

    EXTRA:: New phone out of the box and waiting for bootloader unlock?
    Install Google Play. Some of the download links in the thread are outdated so it is best to go to apkmirror.com to search, download and install them.

    1) In order to flash any custom ROM, the bootloader must be unlocked
    Xiaomi locks this by default on all devices. You must unlock it before proceeding to next steps, or you will brick your device. If it's bricked, try this or read the last section of this post.
    i. Check Mi lock status from Developer Options. To enable Developer Options, go to Settings -> My Device -> All Specs -> tap on MIUI version. The Developer Options will appear in Settings -> Additional Settings eventually after about 7 taps.
    The unlock time can take anywhere from 2 days to 30 days. You can check the timer in step 1vi. You no longer need to apply to Xiaomi to unlock the bootloader.
    ii. Download the miflash_unlock_en_3.3.827.31. Extract the zip and run miflash_unlock.exe
    iii. On the computer, sign in to the same mi account that's being bound to your phone.
    iv. Send the phone to fastboot mode (power down, then power button + volume down button at the same time until the android picture appears).
    v. Connect the phone to the computer by USB.
    vi. On the computer, attempt to proceed to unlock. It will show you the number of hours left that you need to wait before the phone can be unlocked. Try again after that.

    2) Bootloader unlocked
    When you try to unlock the phone now (step 1iii - vi), the phone's screen will suddenly change while your mi unlock tool is "verifying" the phone. The tool will say error unlocking. This is normal. On the phone's screen, after progressing about 10% it will appear to reset. Your phone is now unlocked. You can verify the lock status by repeating step 1.

    3) Install TWRP custom recovery
    You need an Intel (AMD Ryzen seems to be an issue) Windows PC and ADB/fastboot installed. If you don't already, download from here.

    There are several recoveries out there, but this one works for me. Download your choice into your PC. When you are done:
    i. Open PowerShell (in File Explorer, shift + left click on an empty space) in that folder you downloaded into. If it's a zip, extract to get the .img file.
    ii. Send phone into fastboot mode (power down, then vol down button + power button together).
    iii. Connect phone to computer.
    iv. Type
    Code:
    fastboot devices
    into the PowerShell window. On your computer, you will be able to see that the phone is now in fastboot mode.
    v. Type
    Code:
    fastboot flash recovery TWRP-3.3.1-0529-REDMI_K20PRO-CN-wzsx150.img
    vi. When done, send your phone into TWRP recovery (vol up button + power button together).
    Note: You must complete step vi or you will lose TWRP recovery because official ROMs restore to official recovery. If you missed this step, you must repeat from steps 3ii to go into TWRP.

    4) Send ROM to your phone. If you have the ROM downloaded into your phone already, you may skip this step
    Choose a ROM from the ROM section. For me, I use xiaomi.eu 9.8.22. Direct download link for the lazy.
    Continuing in the same PowerShell window, type:
    Code:
    adb devices
    adb push "D:\xiaomi.eu_multi_HMK20ProMI9TPro_9.8.22_v10-10.zip" /sdcard/
    Replace D:\...... with the full path to the downloaded ROM. The file transfer may take some time. Wait for the PowerShell window to finish the executing command. It took 320 seconds for me.

    5) Flash the ROM
    For a clean ROM install, be sure to wipe the data, Dalvik and cache partitions. It is called a dirty flash if you wipe only Dalvik and cache.
    i. On your phone while still in TWRP, go to Wipe -> Advanced Wipe -> select Dalvik / ART Cache and Data partitions. DON'T choose the FORMAT DATA or wipe any other partition.
    ii. Select Install, then choose the ROM and swipe to start the flash. Alternatively, you can also run the same by continuing in the PowerShell window:
    Code:
    adb shell twrp install /sdcard/xiaomi.eu_multi_MI9_9.8.22_v10-10.zip
    iii. When done, select "Reboot System". The first startup will take some time (maybe 3 minutes). You may disconnect the cable from the computer now.

    6) Congrats! You are now using a custom ROM!

    7) Set up Google Pay
    Last tested and still working on 29 August 2019.
    There's still one last obstacle. It seems that even though we can pass SafetyNet, Google Pay still doesn't want to work.
    a) Make sure Google Pay app has already been installed and run once.
    b) Install Magisk Manager
    i. Open the App and then download the Magisk zip file.
    ii. Send the phone into recovery. Power down the phone, then power button + vol up button at the same time.
    iii. Select the Install menu, then select the Magisk zip file and slide to confirm flash. When done, select "Reboot to system".
    c) Open Magisk App, then under Downloads, find and install Busybox for Android NDK and SQLite3 for ARM aarch64. Reboot phone.
    d) Download the GPay SQLite Fix (more reading here)
    Which version to use? It depends on how you want the fix:
    Fix stays even if Magisk is uninstalled - use v1.5
    To uninstall later, use Termux, type in the following:
    Code:
    su
    chattr -i /data/data/com.google.android.gms/databases/dg.db
    Grant superuser to the App when prompted.
    Fix is uninstalled together when Magisk is uninstalled - use v1.7
    e) Open Magisk app, go to Modules, press on the + button to custom select a module. Select file manager, then browse to the downloaded zip file. When done flashing, reboot phone. You can begin to setup contactless payment next.
    If you used v1.5, you may uninstall Magisk now.

    TIP: You need to change the NFC method if you want to use Google Pay.
    Under Settings, go to Wireless & Networks -> More -> Secure element position -> Use HCE Wallet.






    Help! It keeps rebooting into TWRP and never into my ROM!
    I hope you never end up needing this. But if it did happen:
    a) Download and install MIUI ROM Flashing Tool from MIUI.com. Guide is also available in the page.
    b) Download a fastboot ROM from here example: China V10.3.8.0PFKCNXM Fastboot.
    c) Unzip into a directory with no space in between:
    Code:
    D:\Redmi K20 Pro\fastboot - NOT OK
    D:\Redmi_K20_Pro\fastboot - OK
    d) Send phone to fastboot mode (power down, then vol down button + power button together).
    e) Connect phone to computer
    f) Open the MIUI ROM Flashing Tool. Browse to the directory where you had extracted the file e.g. D:\Redmi_K20_Pro\fastboot\raphael_images_V10.3.8.0.PFKCNXM_20190601.0000.00_9.0_cn
    The program always defaults to "clean all and lock". This option will install the official ROM and lock the bootloader.
    Make sure to change to "clean all" to keep the bootloader unlocked.
    tongyong-3-3.jpg

    g) Press "refresh" to confirm your phone is listed and then press "flash" when you are ready.
    The flashing process will take several minutes. Do not disconnect the cable.
    The program will show "success" under result.
    Your phone will automatically boot into the official ROM.
    You may then repeat step 3 Install TWRP custom recovery.
    2
    I thinki can i just did not flash any custom rom atm, im scared that i might brick my device since im experiencing this freezing at the redmi logo
    If you get in to trouble with your phone, then you can restore your phone by installing an official fastboot ROM. If you have bricked your phone, but can boot to the fastboot screen and have a unlocked bootloader, then you can restore the phone this way.
    Download the latest official fastboot ROM from here.
    https://forum.xda-developers.com/k2...irmware-10-3-8-0-9-6-13-t3939647/post79726515
    Then follow this guide to flash the ROM via fastboot.
    http://en.miui.com/a-234.html
    In step 5 you need to make sure the option at the bottom is 'Clean All', otherwise you will lock the bootloader again.
    1
    How do you find the official link to download the unlock tool or trigger the countdown if you don't do the apply?



    I'm quite certain this thread is about how to flash a custom ROM and I was explaining why the user was having trouble entering TWRP and kept returning to the official recovery. Perhaps you want to explain clearer why you're talking about magisk on an official ROM?
    If you want to be safe and download the unlock tool from the Xiaomi site, then yes you are forced to fill the request for unlock permissions before you can access the download. But there are plenty of reliable sources where you can download the unlock tool.
    When you create a Mi account it now has unlock permissions automatically.
    The countdown will start when you 'Add Device' in the Mi Unlock Status screen within the Developer Options settings. In the last 3 months I've unlocked 2 Xiaomi phones and I've never applied for unlock permissions.


    The user with the problem of losing TWRP did not mention whether they want to install a custom ROM or stay on stock. They may have been using your guide only for the TWRP installation. I was giving the information, should they wish to stay on stock.
    1
    One more thing, i accidentally tap EDL option while navigating twrp and it reboot my device to the system, will this result into issues?
    1
    If I have an unlocked BL, flashed TWRP, and remain on Stock china ROM. Will I still get OTA? and will OTA revert my recovery to stock?

    Without root, yes, recovery roll backed to stock.