The error message is a common security safeguard encountered when trying to flash custom firmware, recoveries, or system images onto an Android device via Fastboot. It essentially means the device's bootloader is currently locked, preventing any unauthorized modifications to the system partitions. Why This Happens
Use Xiaomi’s Mi Unlock Tool – encountered 168-hour wait. "FAILED (remote: '39: flashing lock flag is locked
The error occurs when you attempt to flash firmware or system partitions using Fastboot while the device's bootloader is still in a "Locked" state. To resolve this, you must explicitly unlock the bootloader through a multi-step process involving device settings and terminal commands. 1. Enable OEM Unlocking ADB & Fastboot : Download Platform Tools from Google
: Be aware that unlocking the bootloader will erase all user data on the device as a security measure. Flash with Fastboot - Android Open Source Project Use Xiaomi’s Mi Unlock Tool – encountered 168-hour wait