Qualcomm EDL mode
Qualcomm EDL mode is a boot mode implemented in the boot rom of devices using Qualcomm SoCs, which includes features such as reading/writing partitions. It can be used for purposes such as unbricking hard-bricked devices, or flashing partitions on devices that lack fastboot mode or an equivalent.
Various clients for EDL exist, such as Qualcomm's own QFIL, qdl, or bkerler's 'edl'. Unless otherwise specified, the wiki will provide instructions using bkerler's client.
Bootloader unlocking
Some phones' bootloaders can be unlocked using EDL mode, by editing the devinfo partition.
First of all, devinfo must be dumped with edl r devinfo devinfo.bin.
Afterwards, the resulting devinfo.bin should be opened in a hex editor. The partition should have the magic ANDROID-BOOT! at the beginning, and optionally at other locations. Where it occurs, replace this:
41 4E 44 52 4F 49 44 2D 42 4F 4F 54 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
With this:
41 4E 44 52 4F 49 44 2D 42 4F 4F 54 21 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
Lastly, save the file, and flash it with edl w devinfo devinfo.bin.