Failed -remote 39-flashing Lock Flag Is Locked. Please Unlock It First 39-- May 2026

"FAILED (remote: '39: flashing lock flag is locked. please unlock it first!')"

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

Error Message:

  • Use Xiaomi’s Mi Unlock Tool – encountered 168-hour wait. "FAILED (remote: '39: flashing lock flag is locked

    Method B – Using mtkclient (Open-source tool)

    "FAILED (remote: 'Flashing Lock Flag is locked. Please unlock it first!')"

    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

    1. Data Warning

      : 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