yashsingh1/xdaforums huggingface dataset:
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Kousei Arima:
i did, the first twrp i installed in violet was official ik its data encryption problem, n ik it sticks at twrp screen if u dont wipe userdata, but the problem after flashing Peters twrp was, i couldn't even boot into that twrp logo screen(even after fastboot erase userdata) n using the Peters twrp itself to wipe everything including internal storage n formatting data.. thats why i asked for help here.. maybe i am messing the sequence to do all this?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] navi_58861170:
Link doesnt work
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] sujju:
Was trying to backup data partition of dotOS through this twrp, but got error - "createtarfork() failed with ERROR 255". Can someone please help me get rid of this issue? TIA
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] fredptc:
I flash a custom rom for example pe, i reboot to system from recovery, but it keep going into recovery, not system.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] neoxcool:
Hi! just to inform you guys this recovery failed to install miui based rom (RevolutionOS) but another TWRP called "OrangeFox-R10-020-RC-violet" did it well and actually a lot smarter with many options ... Just simply functional without any fuss ...
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
Link is not working how to download now?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] DarthJabba9:
Check the size of your files. This can happen when there is a huge file (over 4GB in size).
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Oh ok , one should probably use ROM's with wrappedkey support along with this..

---------- Post added at 07:38 AM ---------- Previous post was at 07:35 AM ----------

Just checked and the link works fine..

(https://mega.nz/#!3QIRQYhK!Jq5QrGfJw5VCYZ8sq_BO1qNZecrFqlM9IB1IdSwogvI))
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
This is the error showing
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Ok I was able to download it successfully, I'll attach my own link below :

https://drive.google.com/file/d/1Ddk7jXCQAs1EoA5apSGYhDwv_bVce3Ys/view?usp=drivesdk

---------- Post added at 08:58 AM ---------- Previous post was at 08:56 AM ----------

As mentioned in the message try updating your browser
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
Thanks buddy?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] sujju:
Hey.. Thanks.. The data partition is around 4.1 GB in size..

But is there any workaround?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] fredptc:
After flash patch that FCrypt+disabler package, it works,why Peter said it doesn't need?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
This is because of the fat32 limitation..if you can convert it to another file system technically it should work...

---------- Post added at 12:44 PM ---------- Previous post was at 12:43 PM ----------

Why do u even need to patch that? It works without flashing it, Peter's TWRP decrypts your device( using your phone screen password) so you don't need to flash anything else...
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] DarthJabba9:
If the data partition itself is only 4.1GB, then clearly there isn't a single file that is too big - so, file size does not seem to be the problem. I think you'd better check the logs for clues.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
The problem is already reported, read this above.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Akash Raj0123:
can anyone could tell me that what if i flashed a new update of miui recovery rom .so can it could encrypt itself if i use this recovery or should i have to flash fcript disabler/diasble dm-verity force encrpt file .so that i could save it to reflashing the recovery again.

---------- Post added at 07:00 PM ---------- Previous post was at 06:58 PM ----------

May be you should format the internal storage once.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
To flash a MIUI Rom again, you would have to clean flash it..no need of fcrypt if flashing MIUI..
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Akash Raj0123:
you dont get it right man. i want to ask if i flash the new update from miui (recovery rom) then it will encrpt as previous or not. if it encrpt should i have to flash the fcrpt disabler.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Yes it will encrypt like before (personally done this), fcrypt disabler doesn't encrypt your device, it disables it..
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Akash Raj0123:
yes man now you get it right and i want to diasble encrption and want to keep the recovery after flashing the new update and can you give me the link of fcrpt disabler.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
MIUI has encryption by default... anyways here is the fcrypt link : https://androidfilehost.com/?fid=1395089523397961639
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
Should i have to flash that vb meta thermal config zip in this recovery just like as in official one?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Not needed at all, you also aren't required to format...
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
If i update miui in future is there any problem in this twrp?

I still not unlocked bootloader so when i unlock it will format my data so which one u recommend official or peter to me? Because formating first time dont panics me.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
I recommend Peter's since you can decrypt your device safely while using that..but if you are planning on installing Custom ROMS make sure they support Peter's type, these ROM's have a tag called wrapedkey to them, do check..
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
No i want to stick to xiaomi.eu beacuse its feature rich. So basically for xiaomi.eu i should install peter twrp? Right?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
No u don't necessarily have to but it's better ..
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
Thanku i will now install peter twrp and then xiaomi.eu rom and root it with magisk ?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Ah :)
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
Having locked bootloader you are not able to flash custom recovery or custom ROM
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
I know that bro ? what i asked and what u answer.... No proboem bro keep it up.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Jay_Mehta_:
I am on Official TWRP and have installed official RR Rom can I flash this TWRP image from the official TWRP?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Nope doesn't work that way! U gotta remove the official TWRP version first since it has huge conflicting differences..then proceed to install Peter's...
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Zjh0094:
Bug feedback : Twrp will restart when the backup is restored This will eventually lead to a direct backup error
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Tatoh:
Hey guys, i have an issue, i can´t boot into twrp, i just unlocked the bootloader, and flashed this version of twrp, but i can only get to fastboot screen. I just did what the guides usually says, flash it, reboot and power and volume +, but it only gets me to fastboot again. Any advice? Thanks in advance.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] antarix:
I don't know. I tried flashing it a few times and every time I got the same result.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] DarthJabba9:
Seems to me that you still have PBRP ...
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] antarix:
No I was using recovery by Atman from aospextended thread
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] DarthJabba9:
You were not using PBRP, but you get stuck at the PBRP logo?

Well, I have no answer.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] antarix:
yeah but now no problem. i think i successfully flashed peter's recovery
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Did u use "flashboot flash recovery recovery.img" or "flashboot boot recovery.img"?

Try flashing the 3.3.1-5 version..
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Tatoh:
I used the first command, the second won´t work, like the op says, I will try with the old version then.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] trutta:
Hello, is it possible the vision 3.3.1-5 install sich twrp, or only with flashboot? I am on 3.3.1-1
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
From fastboot mode perform

fastboot flash recovery twrp-by-peter-file.img

(check if there were no any errors) and right after this

fastboot reboot

and press and hold Volume Up button during reboot
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] RVSingh:
Bug?Maybe!

I restored my twrp backup of bootlegers rom and after restoring i can't unlock my phone by using same pin.Maybe this us a twrp bug.Luckily i found a solution for this but it will be helpfull if dev could fix this:cowboy:
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] sujju:
Hey.. Were you able to fix this? Any guidance would be highly appreciated.. Tks
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Did the old one work?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Tatoh:
Didn't try yet, I'm off town, when i get back i'll try.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
I unlocked bl and flashed Peter twrp using command fastboot flash recovery recovery. img it shows success. Now if I go to twrp from fastboot directly via vol. Up + power it will boot to twrp as normal but after first boot it automatically replaced by stock mi recovery 3.0? What should I do now?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] mizuhored:
Flash the miui 10.2.3 version via miflash then use eurom instead the latest for your device much better than global
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Tatoh:
Just tried, didn't work either, maybe i'm doing something wrong. The bootloader is unlocked, i checked that, and the flashing says OKAY. But can't boot into it , maybe i should flash the official one that can be forced to boot first.

EDIT: I did a little experimenting and I can't even get to the stock recovery, just fastboot. Should i reflash miui? Kinda annoying losing all my user data again.

Are you implying that flashing an old version of miui would make me able to boot into TWRP? Because otherwise this suggestion won't fix my issue.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Once you flash the official it's a frustrating process to remove it, it doesn't support wrappedkey encryption and isn't updated either. You can't flash Peter's TWRP from the official one..
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Tatoh:
Yes, i know that. That's why i started with this recovery, but i can't make it boot. Maybe I should root without twrp.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Were you running MIUI when flashing recovery?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Tatoh:
I'm on miui 10.3.6. Should I rollback or something?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
No no I was able to flash it from 10.3.7.0...why don't you try updating?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] i.m.debangshu:
Does this TWRP support miui OTA?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Yes, I wasn't able to flash the OTA update( the smaller file size ones) but was able to update by flashing the recovery image of the update..(this replaces TWRP, had to install again)..
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Tatoh:
Well, I'm trying to flash the fastboot rom now (10.3.7.0) and i get this error in the mi flash

[15:26:27]:1 a618590 0,9960933s [15:26:26 a618590]:error:Missmatching image and device

Kinda annoyed now. I download the file from the official link, so is the image for the device. (violet_in_global_images_V10.3.7.0.PFHINXM_20190524.0000.00_9.0_in_4eda76945a)
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Wow.. You sure you have the Indian Variant?

Dunno wtf is wrong with Mi and their outdated crapware...of late they are becoming quite a pain.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] sujju:
How to update this TWRP from 3.3.1-1 to the latest version from within recovery? Tried updating by simply flashing latest image using fastboot, but didn't work..
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] adriansticoid0312:
Install image option in TWRP.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] sujju:
Will this be installed in recovery partition?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] adriansticoid0312:
Yes. Do not select Boot or else you won't be able to boot.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] CHETAN9:
I tried to flash latest bulid but whenever I try to boot in recovery mode it gave the message thr the system has been destroyed what should I do now? Tried two times
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] mizuhored:
Flash via miflash it works, i already experience it on my rn7 pro try to download the lowest miui 10 for rn7 pro to avoid issues on installing twrp
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] TheX7:
I´m on Chinese rom. Using Peter TWRP.

I want to install miui.eu developers rom.

Can some on tell me what are the steps to install the miui eu developers rom please.

TYVM
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
First formate using twrp + wipe cache + delbvik art cache then push the latest .eu rom from your pc to rn7p and flash then reboot. If want to root then flash the latest magisk zip after first boot.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] TheX7:
Advanced wipe and choose the wipe cache and dalvik, right?

Can't do the format option, right?

Sorry but i don't really understand very well this instructions:

And i don't know if i must do a format or not from Chinese rom to miui.eu developers rom
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Yes you must completely format the partitions, wipe clean the system partition etc..then flash the EU ROM then flash the fcrypt disabler (not sure whether this is necessary)
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Markstar:
So, I still have a problem installing this after I installed the official TWRP (e.g. it still shows 3.1.1.0). Is there a way to cleanly remove the old TWRP and reinstall this one?

Thanks in advance!

Edit: Back when I posted about my problems installing this TWRP, I said I installed fcrypt disabler. However, now the description says I should not do that...is there a way to uninstall it? Or better yet, since there seems to be something wrong with my system, is there a way to go back to stock recovery and try to reinstall this (Peter's TWRP) recovery - like a fresh install?

Edit 2: So I bricked my phone and am now in panic mode (I think the fatal mistake was to install the vbmeta.img in fastboot mode). However, not that I'm reading a lot, I discover that some ROMs explicitly state that this TWRP and "Fcrypt Disable" HAVE to be installed. I find this very confusing and at the very least, it makes selecting the right ROM rather difficult (at least for me, since I don't know what the consequences of installing them are and, most importantly, how to revert them if necessary).
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] vivek638:
1st of all start it from the beginning

1.. flash any miui global rom through mi flasher( u will get it on mi site or just google it). Also let it be unlocked while flashing the rom as u will get both the option

2.. After flashing miui rom follow the same step for flashing recovery ( search other thread in guide section if necessary)

3... Download the rom such as pe or any other whatever you want on ur pc and push it in ur device..

4... Follow the steps to flash it..

5... Flash magisk if needed

6... Do note there are different twrp available but i will suggest you the peters recovery and the roms which are supported by that recovery to flash
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] mizuhored:
Whats your miui version now?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Now wipe your device partitions completely and flash MIUI using the MiFlash tool, this would install the stock recovery and then proceed to install Peter's TWRP..this process doesn't require the fcrypt or any other external files. Once this is done, clean wipe the partitions and flash the respective ROM, flash ROMS which have wrapedkey support which Peter's TWRP can exclusively handle.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Markstar:
Thank you guys, I got the phone working again! I had some trouble finding the right ROM with the needed BAT files at first, so I tried violet_in_global_images_V10.2.10.0.PFHINXM_20190424.0000.00_9.0_in_56ff3e7dd2.tgz. This worked, but then I couldn't upgrade to any recent ROM as the firmware was too old, which in turn bricked my phone again! :o

Then I flashed violet_images_V10.3.9.0.PFHCNXM_20190703.0000.00_9.0_cn_d2831bf879.tgz and from then on everything went smoothly!

Thanks again guys!!! :fingers-crossed:

P.S.: The TWRP flash screen still shows 3.3.1.0, but since everything worked I'm not too worried about it anymore. :eek:
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] hackermssharma:
There is instruction on .eu rom that u have to formate if u are coming from miui to .eu i formate when i install.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] JZ™:
Why does everyone prefer this TWRP over the official version? I donno anything about this wrapped key thing.

Does this have anything to do with system partition mounting?

Could someone explain this to me please....!
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Dev0638:
I think u should read the description on the 1st post
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
It depends which ROM you are running. If you need proper encryption (not a circumcised ROM without it, prompting you to install "the fix" disabling encryption, gently called Fcrypt Disabler), then it is the recovery. Though it is far to be perfect too, see the backup bug reported in this thread.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] JZ™:
Alright man

Guess I'll learn all these things soon after i start flashing a rom or two
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
I switched onto Official LineageOS and TWRP recommended there. Surprisingly, the problem remains.

I had finally checked what is in the directory TWRP stumbles on. The directory names in /data/user/, /data/misc_ce/, and /data/vendor_ce/ correspond to the user IDs I have in the system. I think majority of users have just one user with ID=0, so in all these directories you have just one folder named 0. But I have more than just default user, that is why I have another dirs as well, with their corresponding IDs as folder names.

So far I am not ready to tell if it is safe to remove those extra dirs for your extra users. But if having no extra users, simply delete everything except 0 dirs in /data/misc_ce/ and /data/vendor_ce/ and /data/user/. Backup should succeed then.

EDIT If say you have users 0 and 13, then (in my case) /data/vendor_ce/13 was empty and safe for deletion.

/data/misc_ce/13 was not empty, there were few encrypted files, but their deletion did not create problems.

/data/user/13 contains real data, and all files are encrypted with the password specific to user 13, that is why think before deleting it.

Here I see the shortcoming of TWRP in a case you use encryption and have more than one user. On boot it prompts for just one password of user with ID=0. All other users' data remains encrypted. So you can do nothing with it using this recovery. For now it is single user (ID=0) recovery :(
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] gursewak.10:
[MENTION=5351691]PeterCxy[/MENTION]

So far i have used this recovery, i will say its better than official one but problem i am facing is

It doesn't ask for password/pattern code every time.

Sometimes it skips this and show unknown many word length folders in sdcard partition and doesn't show original data in it.

It happens especially when rebooted to recovery or system partition formatted and rebooted to recovery.

Latest version of this also shows same problem.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
The official one was a hastily built version which doesn't support the wrappedkey encryption, therefore you had to format your device to even install it.

But Peter's TWRP provides wrappedkey support and you can decrypt it by entering your phone passcode, hence the need of formatting is skipped. Most of the Custom ROMS in this forum use wrappedkey support so it's highly recommend you flash Peter's..

---------- Post added at 02:40 PM ---------- Previous post was at 02:37 PM ----------

Has anyone tried this with the Official Lineage OS?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] JZ™:
I see, thank you for your time.

Is this encryption limited to certain models like ours? I think so cus if its present on most devices, TWRP would hav added wrapped key feature, right?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
It's actually because of MIUI, it has system wide encryption rather than other OEM's which only encrypt certain partitions, so to make the tiniest change you would have to decrypt.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] thebizon:
I'm flashing the recovery and the process succeeds. However when I press PWR+VOL_UP it doesn't show any of TWRP, instead shows fastboot logo with "Unlocked" label at bottom. Any clue how to fix that?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Enddo:
[MENTION=7817368]Doomsday101[/MENTION] do we know if these patches will be included in an updated version of the TWRP build?
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] yakovpol:
Try to flash TWRP by means of fastboot, then issue command

fastboot reboot

and immediately press and hold Volume Up
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] myzoneajay:
I unlocked my phone using official unlock tool. Rebooted. Shut down in the middle of the setup process.

Installed the recovery. But after restarting, it says Phone has been destroyed. Any solutions?

twrp-3.3.1-violet-6-peter.zip

I am in process of installing stock ROM via ADB. But what did I do wrong here?

More info: Phone shows unlocked.

Can anyone tell me what is the proper way to flash this TWRP, I am now unlocked and booted up with Stock ROM.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] Naveenthemi:
Try 3.3.1-5 and flash it using( fastboot flash recovery recovery.img), replace recovery.img with your file name.

Instead of using ADB to flash the stock ROM, use the MiFlash tool, download the required Fastboot ROM and use this tool to flash it, it also has options to lock the bootloader again or to format the device while flashing, he careful to select the right option before flashing tho.
[Xiaomi Redmi Note 7 Pro ROMs, Kernels, Recoveries,] thebizon:
Edit. problem solved