Home > Tips and Tricks

Flashing is not allowed in Lock State: How to Fix

In this guide, we will show you a potential workaround to fix the “Flashing is not allowed in Lock State” error on your Android device. Stepping into the custom development opens the floodgates to a plethora of tweaks. From gaining administrative access to flashing custom binaries, there are a lot of things to look forward to. However, carrying them out isn’t a piece of cakewalk.

Flashing is not allowed in Lock State

You’ll come across numerous different types of errors and issues which might conflict or straightaway prevent you from flashing the files. One such instance is when the users are greeted with the “Flashing is not allowed in Lock State” error when they try to flash a file in the Fastboot Mode. If you are also currently facing this problem, then this guide will help you rectify it. Follow along for the fix.

Fix Flashing is not allowed in Lock State

Flashing is not allowed in Lock State

Before starting, please take a backup of all the data on your device, just to be on the safer side. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.

STEP 1: Install Android SDK

First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform tools folder, which will be used throughout this guide.

install adb platform tools windows

STEP 2: Enable USB Debugging and OEM Unlocking

Next up, you will have to enable USB Debugging and OEM Unlocking on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode. On the other hand, OEM Unlocking is required to carry out the bootloader unlocking.

Flashing is not allowed in Lock State

So head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging and OEM Unlocking.

STEP 3: Boot to Fastboot Mode

  1. Connect your device to the PC via a USB cable. Make sure USB Debugging is enabled.
  2. Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
  3. After that, type in the following command in the CMD window to boot your device to Fastboot Mode
    adb reboot bootloader

    Flashing is not allowed in Lock State

  4. To verify the Fastboot connection, type in the below command and you should get back the device ID.
    fastboot devices

    LineageOS Android 13 OnePlus 7T Pro

  5. If you don’t get any serial ID, then please install Fastboot Drivers from here.

STEP 4: Unlock Bootloader

Next up, you will also have to unlock the device’s bootloader [well, it was evident from the error message itself]. Do keep in mind that doing so will wipe off all the data from your device and could nullify its warranty as well. So if that’s all well and good, then please refer to our detailed guide on How to Unlock Bootloader of Any Android Device.

STEP 5; Flash in FastbootD Mode

This is where comes the most challenging part. Even ti the tech enthusiast, the error message “Flashing is not allowed in Lock State” would signify that the device’s bootloader is locked. So they just need to unlock the bootloader and they could then easily flash the file without any hiccups. Well, it turns out that is only the job half done. The next part of that fix involves you flashing the file in FastbootD Mode instead of the regular Bootloader/Fastboot Mode.

Flashing is not allowed in Lock State

To boot your device to this mode, you could refer to our detailed guide. In short, if you are currently in the OS [ADB Mode] then use the adb reboot fastboot command to boot to FastbootD Mode or if you are in Bootloader/Fastboot Mode, then use the fastboot reboot fastboot command to boot your device to FastbootD Mode. Once you are in FastbootD, you could then flash the files without any issues.

That’s it. These were the steps to fix the “Flashing is not allowed in Lock State” error on your Android device. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.


Share:
  • I was able to unlock sucessfully. please navigate to directory of .inf file and run the commands.