yashsingh1/xdaforums huggingface dataset:
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] narugan26:
how do you flash the misc using fastboot? and is this english language?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] kumoilain:
fastboot flash misc misc.bin

Chinese default, and you can change to English in setting via same step as other official TWRPs.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] melmarPH:
Please correct me if im wrong..

1. Unlock bootloader

2. Fastboot flash recovery twrp.img

3. Fastboot flash misc misc.bin

Is that correct?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
I didn't buy the optional 27W charger; stock 18W charger charges the phone at 9V 1.85A (~17W) as measured by a physical USB meter (I don't trust any software readings).

Looks good to me.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] ugene1980:
Nice to see you here [MENTION=4467696]AndyYan[/MENTION] ! Loved your consistent work on the mix2! You bought the k20pro as well?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
Yeah it's my new primary device. I don't plan to do any building/"development" here though, this device should be popular enough to attract more capable devs on its own - that is, after it's released internationally.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] jdros15:
May I ask what is the purpose of tha misc.bin?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Krullendhaar:
Hi Andy, quick question.

Do you think the non-pro version of the phone will receive the same level of custom ROM support as the pro version? If I am not mistaking, the only difference that affects developers is the SD730 instead of the SD855. The reason I am asking is because I dislike MIUI, but (currently) only the Xiaomi Mi 9T is available where I live. I do not mind buying the non-pro version, but I do want much custom ROM support. Do you suggest waiting for the Xiaomi Mi 9T Pro or importing the Redmi K20 Pro over buying the Xiaomi Mi 9T (w.r.t. custom ROM support)?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
Past "parallel" sub-flagships like Mi 8 SE / Mi 9 SE aren't even close to their flagship counterparts in terms of support, plus SD730 is a chip only used by 2 devices so far. Wouldn't count on it.

Still, given the two's similarity, it should be a cakewalk to get GSI running on it with the same bugs, and if something gets fixed on one, the other should benefit as well.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
idk either, but all releases for all devices from wzsx150 include this step, so I figure can't go wrong with just copying his steps.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] kumoilain:
Configures in misc partition decides the bootloader to boot from system or recovery.

In wzsx150's flash.bat (recovery-twrp一键刷入工具.bat) , he writes 'fastboot.exe reboot' command in the end. So if we don't change settings in misc partition, the bootloader will control your phone to boot to MIUI system and recover the TWRP to xiaomi official recovery.

Other way, we can use 'fastboot boot twrp.img' command in the end, instead of flashing that misc.bin. Maybe we can use 'fastboot reboot recovery' command (I have not tested).

In summary, that misc.bin prevent phone from booting into MIUI.

If there are any mistakes, please point out.

---------- Post added at 08:00 AM ---------- Previous post was at 07:59 AM ----------

AndyYan's GSI works well with few bugs.

The only 2 unsatisfactory things I have discovered are:

This GSI LineageOS don't support to unlock phone via fingerprint when screen is off, I have to press the power button first:eek:.

And this GSI only have PWM driver when screen is 31% brightness below, while the MIUI supports all brightness DC ( however, xiaomi claimed that K20Pro have HARDWARE DC screen driver:confused: ). I have tried 3rd party apk for simulate DC driver, it works, but completely ruines the optical fingerprint at low brightness due to the screen is so dim that can't lit up the finger for fingerprint camera.

Fortunately, Magisk, Edxposed, GravityBox[P] and other xposed modules work, so I will never return to MIUI.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
So that's why... Thanks for the explanation!

I always hold down the key combo right after flashing though, so it wouldn't boot into MIUI anyway, but good to know I don't need to do that anymore at least for this device.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] xuananh94:
Thank you for your clarification. So for now, there is no way to not flashing misc.bin? Because i do not want to touch this partition whatsoever.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] kumoilain:
You can use the first commad above after "fastboot flash recovery twrp.img". It should work.

I think it's ok to overwrite misc partition because configures in misc is always changed (eg. reboot to system from twrp/ reboot to twrp from system:confused:)
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] xuananh94:
So let me clear what I need to do, please tell me if i am wrong:

- extract the .7z file

- take the .img file (64mb) and flash it via adb normally.

- boot to recovery and install whatever i like
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Robbo.5000:
Read page 2
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] bssnik:
please reup, cant download..
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] whosiao:
I am having the same issue. I am having a mi 9t pro and i have just unlocked the bootloader. I flashed the img and misc.bin and now my phone can only go into fastboot mode. I have tried to hold power + vol up and releasing power when vibrate while continuing hold vol up and after 3mins my phone just go into fastboot mode. The same goes to just normal booting.

My phone, mi 9t pro is on global version, unlocked bootloader.

Any help will be great. Thanks!

P.S. could it be because i am on miui and i flashed the misc.bin? What should i do now
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Robbo.5000:
Download an official global fastboot ROM for your phone and flash it with the Mi Flash Tool. When doing this make sure you change the default flash option to 'clean all'.

This will get get you back to stock MIUI.

After that you can try again.

I recommend using the flash TWRP from here.

https://xdaforums.com/k20-pro/devel...icial-twrp-xiaomi-redmi-t3944363/post79823568

There is no need for the misc.bin
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] whosiao:
My phone can boot normally now and i have tried to flash twrp from the link you gave. It did successfully flashed without any error. But when i boot into recovery, it is the default miui recovery not twrp. I have tried using the button way and adb way. Both results the same, miui recovery.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Robbo.5000:
After installing TWRP and when still in fastboot mode, do the following

fastboot boot TWRP.img

where TWRP.img is the actual filename of the TWRP image file.

When you first boot into TWRP you will need to install either Magisk, or a dm-verity patch, to stop MIUI restoring stock recovery. Unless you choose to go with a custom ROM.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] nnnvn63:
Need help...

my camera is not working

i was on los17 and came back to miui 10.3 using fastboot, after that front camera calibration problem

please help me out..
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Robbo.5000:
Extract the persist.img file from the 10.3 fastboot ROM, then flash that to the persist partition with TWRP. Not all TWRP's can flash to the persist partition, so if yours doesn't have that option get mauronifrio's TWRP.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] john1958:
Try deleating cache in camera app, worked for me. Succes.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] droident:
I was just reading through this thread trying to familiarise myself with Raphael (ex-vince user) and saw a couple mentions of users holding the fastboot button combo after using MiFlash.

There's a much easier way of doing that :silly:

Go in to "flash all" using Notepad++; there will be two files for each flashing profile under any extracted fastboot ROM (a bat and sh as far as I remember). The last line in both files will send that reboot command that's having people hold buttons to circumvent it. Just delete that line in both files and the device won't reboot when a flash finishes. Remember to save both files after the edits and you're good to go.

You might also want to delete all the other flashing profiles. That way you can't flash all+lock by accident. MiFlash won't do anything if those options are selected by mistake and the scripts aren't there. It'll just throw an error and then you can pick the right flash profile and you're good to go.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Robbo.5000:
Thanks for the info, but that wasn't the reason for the 2 button combo. DM-verity causes stock recovery to be restored when the system boots, should it check and find that the recovery partition has been altered. This means that after installing TWRP, we need to do something to prevent TWRP being lost, invariably this requires booting into TWRP to then flash something (either a custom ROM, Magisk or a disable DM-verity script).

Trying to boot into recovery using a fastboot command failed. There was a bug in early versions of TWRP which caused the phone to bootloop if you tried the

fastboot boot TWRP.img

command. Also Xiaomi don't help matters as it is not possible to just turn off the phone from fastboot mode. Trying to do this just causes the phone to boot into system, which then causes stock recovery to be reinstalled. Therefore, at the time, the simplest option was to do the 2 button combo whilst still in fastboot mode.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] munchy_cool:
[MENTION=4467696]AndyYan[/MENTION]

Need some help, and this might be off topic.

I have a redmi k20 pro, running MIUI 11.0.1.0 based on Android 10

I want to decrypt my device.

Below are the steps I followed.

1. fastboot flash TWRP (https://xdaforums.com/k20-pro/development/recovery-unofficial-twrp-xiaomi-redmi-t3944363)

2. fastboot boot TWRP

3. Once in TWRP, I flashed attached zip file to disable encryption.

4. format data

5. reboot into TWRP

6. flash Magisk Zip, so TWRP can stick and not be over written by stock MIUI recovery

after setting up MIUI 11, when I go into settings -> passwords & security - privacy

my phone still shows as encrypted in encryption and credentials.

Do you know the proper way to decrypt raphael when its running MIUI 11?

I wanted to try your script attached in OP (DecScript-Universal-v2), but after downloading it and unzipping it I see nothing in updater-script file ..am i missing something here?

Thanks in advance.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] peeweew:
Hi,

I'm currently on Global ROM 11.0.1.0

My system can't seem to allow installation of Magisk. Every time I install Magisk, it leads to bootloop so I have to uninstall Magisk to fix the issue.

However, doing this overwrites TWRP with stock recovery.

Here's the procedure I did

1. fastboot flash recovery TWRP.img (wzsx150's 3.3.1-1001)

2. fastboot reboot

3. boot to TWRP

4. flash Magisk 20.1 zip

5. flash Universal Disable DM Verity zip (12/24)

6. reboot system

7. bootloop

Is there something I missed?

TIA!
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] supera3:
But when you flash recovery needs formar data!!!! , then flash stock rom , dfe and magisk
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] kumoilain:
yes. choose any way u like to reboot to recovery, just not reboot to miui, it will recover twrp to xiaomi recovery (if not install magisk).
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] djeloy:
Hello! [MENTION=4467696]AndyYan[/MENTION]

It would be possible for you to release the TWRP code on github.

Thanks!
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
This TWRP is not my work, mind you...
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] djeloy:
Ok Sorry MAN :fingers-crossed:
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] thannt.vnu:
After wipe Data, Cache, Dalvik, System. I was stuck at Fastboot, can't return TWRP. I try reflash TWRP but nothing change. Please help me!
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] kumoilain:
Please dont wipe system... though idk why this phone cant boot into twrp with system partition clear...:confused:

I have met the similar problem, so I flash the official system via fastboot, and then flash twrp again...:(
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
Theoretically any change to /system would trigger dm-verity and get you stuck in fastboot. I reckon you simply forgot to flash vbmeta as instructed.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] thannt.vnu:
Thank you both. Finally i flash rom via fastboot.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] jceey15:
I'm stuck at 50% in unlocking my bootloader. I already did the following

1. Applied for unlocking permissions

2. Enabled OEM and USB debugging

3. Download the MiUnlock tool

What am I missing here?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Robbo.5000:
Have you registered you phone for unlocking. Can't remember the exact details, but you need to go in to the Mi Unlock Status option in the Developer Options settings. There is something you need to do within that, it should be obvious when you look. Unfortunately once it's unlocked this screen changes so I can't see what it is, exactly, that you need to do. But it basically records against your Mi account a request to unlock the phone. (Obviously you need to have your phone logged in to your Mi account first, which is also the same account used to start the Mi unlock tool.)

Once you've done whatever is needed it starts the unlock wait period. However, if you repeat this process before the unlock wait period is finished, it resets the wait period, so leave this screen alone afterwards.

I will say that it was about 3 months ago and for a different Xiaomi phone that I had to do this, so apologies if this information is no longer relevant. (Still waiting for my K20 Pro to arrive)
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] jceey15:
You mean the "Mi Unlock Status" part where you Turn Off the Wifi and use the mobile data and then press "Add Device"? Yes I already did that, but I did not know you were supposed to wait for a few days. How long do you usually have to wait?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] demonntl:
7 days since you bind the account in both Syn account and Unlock OEM account. Do not sign out or change the account after that, if not the waiting time will be reset.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
Waiting time is dependent on account and probably other factors. What happened to me:

1) Bought a Mi 8 Lite in February, both my own accounts have 7 days wait, friend's account unlocked instantly

2) Bought a Mi 8 SE in April, my own acc unlocked instantly

3) Friend bought a Mix 2 in April, his acc has 7 days wait, my secondary acc unlocked instantly

4) Bought K20 Pro recently, both my own accounts have 7 days wait, friend's account unlocked instantly

Funny eh? Xiaomi does weird things.

I wish they could just do away with this waiting period altogether, it's meant to deter resellers but ultimately only hampers customers.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] xuananh94:
Mine is 7 days (my mi account is more than 3 years old), but some newly created other might get 15 or even 30 days.

Please bear in mind that you also need unlock permission from Xiaomi as well.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] jceey15:
Will we receive a notification that the account can already be unlocked? or do we just count manually and continually test if we can unlock it already?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
The unlock tool will spit out an error telling you precisely how many hours needed at the end which you can count.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] jceey15:
Mine just gave me an error "Couldn't verify device" at 50%

Was there something I missed?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Robbo.5000:
Was the phone booted in to fastboot mode?

Do you have adb/fastboot installed on the pc?

Sounds like the unlock tool didn't see that the phone was connected.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] jceey15:
1. Yes, I booted my phone to fastboot mode

2. I only installed the Mi Unlock tool in my PC. I did not install anything else? When you say install fastboot/adb in PC, are you referring to drivers related to that or there is an actual application for PC too?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Robbo.5000:
You can find minimal adb and fastboot here. https://xdaforums.com/showthread.php?t=2317790

If you're going to be unlocking the bootloader, then these will be useful tools in case you get in trouble.

I assume that when connecting the phone to the PC normally that your PC recognises the phone OK? If it does then you will have the correct usb drivers installed.

Are you using your mobile number as your account ID when logging in to the Unlock Tool? If not try logging in using your phone number of the SIM in the phone. When you performed the step to 'Add Device' in the 'Mi Unlock Status', it wants this done using mobile data in order to verify you mobile details. By using the mobile number to connect to the Unlock Tool you are ensuring that you are using the account the phone is linked to.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] FaserF:
As the CPU from k20/Mi9t is different than the pro one this recovery wont work on a normal non pro k20, right? :/
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
Was thinking of mirroring it for you guys, but hey, someone did it ahead of me: https://xdaforums.com/mi-9t/development/unofficial-twrp-xiaomi-k20-flashable-mi-t3942518
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Abaddon:
what GSis have you tried guys aside from LOS/PHH?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
Many GSIs are updated before manual front cam control / audio fix are merged, and the device specific overlay still hasn't been merged till now - this results in varying support across the PHH-based GSIs. I build the LOS GSI so it's under my control, and I've manually merged the above already.

A local fellow has also tested some those not based on PHH (e.g. OEM sGSIs), and those generally won't work, or have non-working FP. I couldn't care less about these closed-source stuff though.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] arnob_xperia:
Please make LOS or PIXEL ROM :( WAITING FOR IT

LIA (Love in Advance) :D
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] ermacwins:
[MENTION=4467696]AndyYan[/MENTION] will this OxygenOS gsi work on the K20 Pro? https://xdaforums.com/mi-8/development/sgsi-oxygen-os-v9-0-4-dipper-t3928323
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Abaddon:
alright, thanks for the clarification. will be using your builds then! :cowboy:
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
It's in a device subforum so I don't think so. The local guy I mentioned above tried Erfan's original, and it's one of the few sGSIs that would boot, but as said front cam and FP won't work.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] ermacwins:
Do you update your LOS builds?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
Monthly (right after security patches merged).
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] xuananh94:
I finally be able to unlock my bootloader and flashed xiaomi.eu rom using this twrp.

Everything works perfectly, however, the TWRP did ask me an unlock pattern to decrypt on the first time it booted up. I do not remember how i got rid of it but once you are inside, flashing is easy. Just wipe dalvik, cache, app and you are good to go.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] ciaox:
does this have to be done everytime to get into twrp? i tried to boot to twrp with volume up and power button but it boots to miui recovery even tho twrp and misc.bin is flash successfully..
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Whitechampaca:
I just tried Havoc 2.6, everything works fine, FP works fine but Front cam pops up on first boot and won't retract
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
MIUI has a script that restores stock recovery on boot. Remove that script, or just don't boot into MIUI if you're flashing something else.

All GSIs do that right now. As said, what we currently have is manual controls, and even that isn't necessarily included in all GSIs.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Schnedi:
Hi.

I installed Phh AOSP but couldn't fix the popup camera.

So I had to install Miui.eu :(
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] tenshikurabu:
We are both waiting for a good ROM come to k20p, I'm on EU ROM to.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Schnedi:
Well, actually my device is the Mi 9T.

Finally get the popup camera to retract.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] LegionCommander:
you did the manual method? I hope phh drops the newew ver soon and w the newer commits for popup camera is in and roms pop out for the k20 pro too, gosh I hate MIUI but I love the phone lol
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] tenshikurabu:
How can I flash LOS gsi as system img, I tried many times with different imgs, when I rebooted device, there was a notification said I didn't install any operation system. Should I choose a or a/b img for k20 pro? I just tried some only imgs before.

I really want to help test and build with you.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
All devices shipping with Pie, including ours, are system-as-root and should use "AB" regardless of whether the device actually has a system_b partition.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] ermacwins:
[MENTION=4467696]AndyYan[/MENTION] will your next build have the pop camera fixed or we still have to use that manual method?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
I'm not the one working on the actual fixes (outside my capabilities). If you've been watching PHH's repos you'll see there had been no public progress on anything (not limited to our device).
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] ermacwins:
Does the camera pop out everytime you reboot the phone?
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
Yes. I stopped caring after the initial setup phase.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Logi_Ca1:
Hi all,

Is anyone having issues receiving sms messages? At first I thought it might be an issue with the SMSC number, but then I tried sending SMS messages and apparently, I can send but can't receive messages.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] AndyYan:
I'm currently getting my hands dirty and trying to call xiaomi-motor (the control binary) from cameraserver. Given my skills, I can only approach this crudely, and I imagine there might be problems regarding different camera API levels and/or app states (pause/resume), but hey, you won't know unless you try eh? Experiment results will be posted here shortly.
[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] ermacwins:
If you need any testing, I can try and help.