Relocking on a modified system typically causes boot failure (verified boot mismatch).

Snapdragon devices have an EDL mode (9008) accessible via shorting test points or using special USB commands. EDL allows low-level flashing bypassing ABL.

Once the process is complete:

adb reboot bootloader fastboot devices fastboot flashing unlock # Confirm on device screen (volume keys + power) fastboot reboot

Unlocking involves modifying a persistent flag (usually in aboot or hyp partition) and changing a secure hardware token.