In this guide, we will show you the steps to fix the FAILED (remote: Partition flashing is not allowed) error. ADB and Fastboot Commands are among the most important tools that a tech enthusiast could have. Without it, some tasks like booting to Fastboot or Recovery would require unnecessary extra efforts. On the other hand, tasks like bootloader unlocking, flashing, or booting to TWRP, wouldn’t be possible in the first place. All in all, these commands occupy the top spot in the priority queue.
However, they aren’t free from their fair share of issues. Recently I compiled a comprehensive guide on over 15+ ADB and Fastboot Commands errors/issues and their fixes. And here I am documenting a new issue. As far as this error is concerned, this happens when you are trying to flash or boot a file to its respective partition. More often than not, it related to the TWRP custom recovery and would spell something like this:
C:\platform-tools>fastboot flash recovery twrp.img target reported max download size of 536870912 bytes sending 'recovery' (17234 KB)... OKAY [ 0.563s] writing 'recovery'... FAILED (remote: Partition flashing is not allowed) finished. total time: 0.584s
So what is the root cause of this issue and more importantly, how could you fix it? Well, this guide is going to answer all these queries. So without further ado, let’s get started.
Reason for the Partition flashing is not allowed Error
This issue pops up when the device’s bootloader is locked and you are trying to flash or boot an IMG file to that partition. The Bootloader will first check the status. Upon verifying that the result is False, it will straightaway refuse this flashing process. As a result, it will then show the aforementioned error message. So this is why you get the FAILED (remote: Partition flashing is not allowed) error, let’s now turn our attention towards its fix.
So as you might have got a hint from the above passage, the fix requires you to unlock the device’s bootloader. But wait! if you are planning to flash any stock firmware file (such as stock boot.img), then there’s a handy way out that doesn’t require you to unlock the bootloader. The thing is most smartphones come with two different firmware packages- a Fastboot ROM and a Recovery ROM.
As is evident from their names, the Fastboot ROM could be flashed via Fastboot Commands whereas a recovery ROM could easily be flashed via Stock Recovery. Furthermore, since Fastboot Commands deals with critical partitions, it requires an unlocked bootloader. On the other hand, there is no such requirement for Recovery ROM. However, as opposed to Fastboot ROM, you cannot flash a single partition file.
In other words, if you only wish to flash the stock boot.img via Recovery, that is not possible. Rather you would need to flash the entire Recovery ROM. But this is all about a stock recovery. What about a custom recovery like TWRP, OrangeFox, etc. Well, in such cases, you will definitely need to have the bootloader unlocked. So keeping this TWRP custom recovery in focus, here’s how you could fix the FAILED (remote: Partition flashing is not allowed) error.
How to Fix FAILED (remote: Partition flashing is not allowed)
We are listing the instructions under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned below. 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.
Install Android SDK
To begin with, 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.
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 process, which will, in turn, help you to fix the FAILED (remote: Partition flashing is not allowed) error.
So head over to Settings > About Phone > Tap on Build Number (MIUI Number in Xiaomi) 7 times > Go back to Settings > System > Developer Options > Enable USB Debugging and OEM Unlocking.
Boot Device to Fastboot Mode
- Connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
- Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
- Type in the following command in the CMD window to boot your device to Fastboot Mode
adb reboot bootloader
Unlock the Bootloader and Fix the FAILED (remote: Partition flashing is not allowed) Error
You will now have to unlock the device’s bootloader to fix the FAILED (remote: Partition flashing is not allowed) error. Do keep in mind that this process will wipe off all the data from your device. Likewise, it might also make the device’s warranty null and void.
So if that’s all well and good, then you may refer to our comprehensive guide on How to Unlock the Bootloader of Any Android Device. If you own a Pixel, OnePlus, or any other such device which doesn’t require any tool to carry out the unlocking process, then you may directly use the below shorter instructions as well:
- Execute the below command in the CMD window that you have opened inside the platform-tool folder:
fastboot flashing unlock
- You will now get a prompt on your device. Use the Volume Keys to select Unlock the Bootloader option and press the Power key to confirm it.
- That’s it. The process is now complete. You may now reboot the device to the OS via the following command
NOTE: If the fastboot flashing unlock command didn’t work out, you may also try the fastboot oem unlock command.
Flash/Boot the TWRP File
Now that the bootloader is unlocked, you may easily flash the required TWRP file or boot the device to TWRP for one-time usage. For that, you may refer to our comprehensive guide on How to Install TWRP Recovery on Android. In short, if your device has a recovery partition, then you may directly flash via the following command:
fastboot flash recovery twrp.img
However, if your device is an A/B partition, and doesn’t have a recovery partition, then you will have to take the help of the boot partition. So use the below command to boot to TWRP via its IMG file and then permanently flash its ZIP file:
fastboot boot twrp.img
All this has already been explained in depth in the TWRP installation linked guide, so it’s highly recommended you go through it once. So with this, we conclude this guide on how to fix the FAILED (remote: Partition flashing is not allowed) error. 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.
- How to Fix FAILED (remote: Command not allowed)
- Fix FAILED (remote: ‘Slot Change is not allowed in Lock State’)
- Fix Failed (remote: ‘flashing is not allowed for critical partitions)
- How to Fix FAILED (remote: unknown command) Error
- How to fix FAILED (status read failed (Too many links))