(EDITED)
How to flash full rom with Mi flash tool ? if so it will delete orange fox recovery or not ? thank you
If you want to do a full flash to the out-of-box configuration;
Go here and download the fastboot files:
https://mirom.ezbox.idv.tw/en/phone/vince/
Look for the red text; ignore OTA and recovery variant downloads - you only want the fastboot files. Either global, China or as applicable for your device. You can safely flash China to global and vice versa if you so wish. Stable or developer.
If you're returning to custom ROMs instead of MIUI after this or just want OrangeFox then download minimal ADB and fastboot. Install it;
https://forum.xda-developers.com/showthread.php?t=2317790
Use 7zip, WinRAR or whatever you prefer to unpack the fastboot archive. Keep the directory path short if you can. C:/Xiaomi/ for example.
Open the flash_all.bat and flash_all.sh in Notepad++, delete the last line of code in both files to prevent the device rebooting to MIUI once the flash is done done. Save. If you're locking the device (not recommended as it takes up to 15 days to get a re-unlock authorized); then make these changes to flash_all_lock.bat/flash_all_lock.sh instead.
Do NOT flash any script with 'factory' in the title. It will screw up your device.
In MiFlash browse for the directory you unzipped the files to, select it and in the bottom right hand corner choose "flash_all" from the drop-down; depending on the MiFlash build you may see radio-buttons - select "clean all" in this case.
Put your device into fastboot (power + volume down). Connect it via USB. Press refresh on MiFlash then press flash. The flashing process takes a few minutes.
Once it's done do not disconnect the device if you're not returning to MIUI but rather custom ROMs and/or want to install orange fox alongside MIUI; instead - download and unzip orangefox recovery and copy recovery.img to C:/.
In a new command-line window type;
fastboot boot C:/recovery.img
The fastboot logo should change to Mi, you'll then be booted into OrangeFox. Copy the OrangeFox recovery zip over in its entirety to the phone; browse for it in OrangeFox and install it. The recovery will reboot once installation is done.
Link below for FAQ which details how to format and switch to custom ROMs or alternatively, follow the steps on using MIUI with OrangeFox before booting in to MIUI (if you don't, stock recovery will overwrite it and you'll need to run fastboot boot C:/recovery.img again).
https://forum.xda-developers.com/re...ngefox-recovery-project-t3807479/post76885728