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

Enabling the "OEM Unlocking" setting inside the Android UI but neglecting to run the corresponding hardware unlock command via terminal.

Device manufacturers lock the bootloader and set the flashing flag as a critical security measure. It prevents unauthorized access to the system partition and ensures that the device runs only verified and official software. This helps protect user data from being compromised and prevents the installation of malware or system modifications that could lead to instability. A locked bootloader is also a prerequisite for using many security features, such as Verified Boot, which checks the integrity of the operating system each time the device powers on [14†L12-L14].

Enable OEM unlocking in Developer Options (already done).

On Android devices:

This error occurs when you attempt to flash a custom partition (like a recovery image) onto an Android device using the Fastboot command, but the process is blocked by a security feature within the device's bootloader [3†L16-L17][6†L10-L12]. The "Flashing Lock Flag" acts as a gatekeeper. It's a fundamental security mechanism designed to prevent unauthorized modifications to the device's software, ensuring system integrity and security.

While not the primary cause of the lock flag error, it's worth noting the "remote 39" part of the error message. A in Windows Device Manager indicates a corrupt or missing device driver . An improper or outdated USB driver can break the communication link between your computer and the device. This can cause the flashing tool to misread the device's state, potentially interpreting communication failures as a "locked" condition, or it can simply prevent the correct unlock sequence from being sent. For example, an incorrect driver might be used for a TC364DP debugging probe, leading to connectivity and flashing problems.

Lock and unlock the bootloader | Android Open Source Project Enabling the "OEM Unlocking" setting inside the Android

: Open your device's primary Settings app, choose About Phone , and locate the Build Number . Tap this entry rapidly 7 times until an on-screen notification confirms that Developer Options are unlocked.

While less common for the average user, this error is also well-documented in the professional world of firmware and embedded systems engineering. In this context, the error appears when using specialized tools like flashrom or Zephyr to program SPI NOR flash chips on development boards, such as those from NXP.

Before the device allows any direct partition alterations via Fastboot commands, you must systematically release the hardware's internal lock flags. Root Causes of the Flashing Lock Flag Error This helps protect user data from being compromised

May require specific scripts or third-party unlockers to bypass the lock flag.

If you’ve followed all steps and still see the error, consult your device’s XDA Developers forum or official documentation. Some devices have unique unlock protocols beyond the scope of this article.