QFIL flashes stock firmware on Qualcomm phones through EDL (9008) mode. Many newer Xiaomi, Oppo, Vivo and Realme phones only allow EDL flashing with an authorized account, so QFIL won't work on them.
1. Install the Qualcomm HS-USB QDLoader 9008 driver and QPST (which includes QFIL).
2. Get the correct stock firmware for EDL. It includes a programmer file (prog_firehose or prog_emmc) plus rawprogram and patch XML files.
3. Put the phone in EDL mode. Common ways: hold both volume keys and connect the cable, or "adb reboot edl" on supported phones. Device Manager should show "Qualcomm HS-USB QDLoader 9008".
4. In QFIL choose Flat Build, browse to the programmer file, then Load XML and select the rawprogram and patch files.
5. Click Download and wait for "Download Succeed".
Back up first. Flashing all partitions can erase user data and, on some phones, the IMEI.