Custom recoveries like TWRP allow you to install custom ROMs, flash .zip or .img files, mount partitions, encrypt or decrypt storage, create a Nandroid backup, etc. on Android devices. Many users encounter errors while trying to flash or boot TWRP using Fastboot commands. The error we are talking about fixing is: “Cannot load twrp.img. No such file or directory“. Let us see how why this error pops up and steps to rectify it. Before proceeding with the steps, it is recommended that you take a full backup of your Android device beforehand.
Fix “Cannot load twrp.img” Error
Before discussing the steps to fix the “Cannot load twrp.img” error, let us first understand why this error occurs.
For installing a custom recovery like TWRP, first, we boot our Android device to fastboot mode. Then we take the help of any of the two Fastboot commands:
fastboot flash recovery <recovery-name>.img fastboot boot <recovery-name>.img
There exist two different commands because of the difference in partitions. Older devices have a separate recovery partition and hence you could directly flash it using the fastboot flash recovery command. However, since the inception of A/B partition devices, there have been no separate recovery partitions. Everything is managed by the boot partition now. Hence we now boot the recovery into the boot partition rather than flashing it to the non-existing recovery partition.
3 Solutions to Fix TWRP Error
Below, we have provided four different fixes for the TWRP error. You don’t have to try all the four fixes. Any one of them should do the job for you.
1. Rename the TWRP.img before Flashing
It goes without saying that for executing any fastboot command, you should have Android SDK Platform-tools installed on your desktop. Moreover, most of the guides on the internet refer to the command for flashing TWRP Recovery as follows:
fastboot flash recovery twrp.img
fastboot boot twrp.img
In the above commands, the name of the recovery is TWRP.
None of the recoveries presented online is named ‘twrp’. As a result, users directly execute the above commands without renaming the recovery. If that is the case, make sure to rename the recovery to ‘twrp’ before proceeding further. This should fix the “Cannot load twrp.img. No such file or directory” error. If that is not the case, head over to our next solution.
In another scenario, some tutorials tell the users to rename the recovery to ‘twrp.img’. But this is where the problem occurs. The ‘.img’ is not part of the recovery name but is rather the file extension. Without realizing it, users end up renaming the recovery to ‘twrp.img’ and the complete name goes as ‘twrp.img.img’. So if you are going to rename the recovery, make sure to rename it to twrp. However, if you still can’t fix the error, refer to the third and final solution below.
2. Move the ‘twrp.img’ to the Platform-Tools Folder
3. Make sure to place the TWRP Recovery where the Android SDK and Platform Tools are installed. To be precise, it should be inside the platform tools folder. Most of the time, users fail to move the recovery file inside the said folder and execute the command for flashing recovery. In that case, the said error pops up. So moving the recovery inside the platform-tools folder should fix the error.
3. Add TWRP File Path in Command Window
However, if you don’t want to move the recovery to the platform tools folder, there is another workaround. Just enter the fastboot flash recovery or fastboot boot recovery command and leave a space after the command. Now drag and drop the TWRP file next to that code.
For example, suppose the downloaded recovery is ‘TWRP-3.3.1_Motorola_One_Action.img’ and is placed inside the Downloads folder. Then on dragging it next to the fastboot command, the code should look like fastboot flash recovery
C:\Downloads\TWRP-3.3.1_Motorola_One_Action.img
This should fix the “Cannot load twrp.img. No such file or directory TWRP” error.
So these were the various steps of fixing the TWRP error.
Read Next: How to Install Latest TWRP Recovery on Android