Failed -remote 39-flashing Lock Flag Is Locked. Please Unlock It First 39-- |top| Jun 2026
Failed -remote 39-flashing Lock Flag Is Locked. Please Unlock It First 39-- |top| Jun 2026
: Check the current lock status by running: fastboot getvar all or fastboot flashing get_unlock_ability
How to Fix the "failed -remote: '39-flashing lock flag is locked. please unlock it first 39-'" Android Error
This comprehensive troubleshooting guide explains why this happens and outlines exactly how to bypass the restriction to flash your device. Understanding the Error
Start with these fundamental steps to ensure you haven't missed anything obvious. : Check the current lock status by running:
There are anecdotal reports of computers running a Linux operating system in a virtual machine (VM) successfully performing the unlock when a live Linux environment failed [5†L34-L36]. If possible, try the unlock process from a different computer or operating system entirely to rule out environment-specific issues.
Open a terminal (Command Prompt/PowerShell) on your PC in your Platform Tools folder adb reboot bootloader
: Navigate back to Settings > System > Developer Options . Toggle the switch for USB Debugging to enable terminal command transmission. Locate OEM Unlocking and toggle it to the active state. There are anecdotal reports of computers running a
Lock and unlock the bootloader | Android Open Source Project
Look through the text output for lines such as Device unlocked: true or unlocked: yes . Once you see that validation, you can safely re-run your original flashing command, and the remote: '39-flashing lock flag is locked' error will be entirely gone.
The solution is to unlock the bootloader. The method varies depending on your manufacturer. Method 1: Standard Android/Pixel/Nexus (Using Fastboot) Toggle the switch for USB Debugging to enable
Note: For brands like Motorola, you may also need to request an unlock key from their official site Android Open Source Project Step 2: Enter Fastboot Mode Turn off your device. Volume Down + Power
The error occurs when you attempt to flash firmware or partitions to an Android device while its bootloader is still in a "locked" state. Simply enabling "OEM Unlocking" in your phone's settings is not enough; you must also execute the specific unlock command through Fastboot. Step 1: Preparation (In Android)
Ensure your ST-Link is correctly connected to your target microcontroller (SWDIO, SWCLK, GND, VCC). Open STM32CubeProgrammer: Launch the application.
Connect your device to your PC using a reliable USB data cable.
