Open a PowerShell console on the same path as the TWRP file you have downloaded in Step 1
Type the command:
adb reboot bootloader
After Step 4 the device will go into fastboot mode. And once that is done, type the command:
fastboot flash recovery [twrp-filename]
Replace, twrp-filename with the name of the TWRP file you have downloaded, say: twrp-3.3.1-1-olive.img
Restart the phone after the TWRP file flashes by typing the following command while pressing the Volume Up button
As expected, these steps will not work if you have not unlocked the phone’s bootloader.
With the TWRP installed the phone is ready for flashing the OrangeFox Recovery, as follows:
Install OrangeFox Recovery on Xiaomi Redmi 8
Download OrangeFox Recovery:
Extract the zip file to find the file named recovery.img
Reboot the phone into fastboot mode
Go to the folder where you have installed adb, open a PowerShell console and type:
fastboot flash recovery recovery.img
reboot to recovery
With that done, you get a fresh OrangeFox Recovery installation on the Redmi 8.
As with other flash operations, remember to make backups before you start. And the process should be carried out on a phone with at least 80% of battery charge. Other conditions include enabling USB Debugging mode and having an unlocked bootloader.