Home > TWRP

How to Boot into Recovery (TWRP/Stock) from Fastboot Mode

In this tutorial, we will show you the steps to boot into the TWRP or stock recovery from Fastboot mode. We will be sharing two different methods. Although the first method has never failed, just to be on a safer side, we have shared another method as well. So first up, let’s check out what exactly is a Fastboot or Bootloader Mode. A bootloader is a software program that tells the operating system what all apps and resources does it need to start at device boot up. Along the same lines, it also allows your device to boot to Fastboot Mode or the Bootloader Mode. Yes, both these modes are one and the same thing.

Users generally boot their device to Fastboot Mode to carry out a plethora of tasks. These might include unlocking the device bootloader, booting your device to TWRP, permanently flashing the TWRP ZIP file, among others. Likewise, the need to boot your device to recovery is no hidden secret. If you are a general user, then you might be contained with the stock recovery. This in turn allows you to flash an update package via the Sideload feature, or format your device. The tech enthusiasts take this a step further and replace the stock recovery with a custom one, usually TWRP. The reason for the same is aplenty.

A Custom Recovery like TWRP allows you to carry out a plethora of tasks. For example, you could flash ZIP and IMG files, flash Custom ROMs,  Magisk ModulesSubstratum Themes, Xposed Frameworks, wipe various device partitions, and carry out other advanced functionalities. But the major issue for some arises when they wish to boot their device to TWRP or stock recovery right from the Fastboot Mode. In this regard, this guide should come in handy. Here are all the required instructions that will come help you achieve the aforementioned task, These steps are valid for all Android devices and all types of recoveries. Follow along.



How to Boot into Recovery (TWRP/Stock) from Fastboot Mode

To boot into any mode, be it TWRP, Stock Recovery, Fastboot, Bootloader, etc, there are always two different approaches. You could either rely on device-specific hardware key combinations or the universal ADB and Fastboot Commands. If you are going to take my opinion, I always prefer the Commands method. The reason stands simple- it is a universal method valid for all Android devices. So I don’t have to remember the concerned key combinations for individual devices.

Furthermore, it is near about impossible to mention the shortcut keys for all Android devices in one single post. As a result, in this guide to boot any device to TWRP or stock recovery from Fastboot mode, we will be discussing the universal method aka the ADB and Fastboot Commands Method. There are a couple of prerequisites that your device needs to qualify. So before you proceed with the instructions, make sure your device qualifies these requirements, as given below.

Prerequisites


STEP 1: Boot your device to Fastboot

If your device is already in Fastboot Mode, then you may skip this step. For users who are currently booted to the OS and are looking to enable to Fastboot, follow the below steps. Make sure you have enabled Debugging.

  1. Connect your device to PC via USB cable.
  2. Then head over to the platform-tools folder (where ADB and Fastboot have been installed).
  3. Inside the same folder, type in CMD in the address bar and hit Enter. This will launch the Command Prompt.
    command-prompt-adb
  4. Now execute the below command in the CMD window to boot your device to Fastboot/Bootloader mode:
    adb reboot bootloader
  5. Your device will now be booted to Fastboot, its time to boot it to recovery mode (TWRP/stock). Follow along.

STEP 2A: Boot to Recovery from Fastboot via Commands

With the device in fastboot mode, connected to  PC and Command Window opened inside the platform-tools folder, here is what should be your next course of action.

  • Execute the following command inside the CMD window to boot your device to Recovery Mode:
    fastboot reboot recovery

STEP 2B: Boot to TWRP in A/B Partition Devices

If the above method didn’t manage to give out desirable results, then here is another pretty nifty trick that you could try out.

  1. First and foremost, download the TWRP recovery for your device. Rename the recovery file to just twrp, hence the complete name will be twrp.img. Now transfer this file to the platform-tools folder. On the other hand, if it has a ZIP file as well, then transfer the ZIP file to your device.
  2. Now some devices come with A/B partition, that doesn’t have a recovery partition. In those cases, you will first have to boot (temporary install) your device to recovery from the boot partition and then permanently install the ZIP file or IMG file. The command for booting the device to TWRP recovery from fastboot will be:
    fastboot boot twrp.img

    twrp

  3. The above command will just boot your device to TWRP. To permanently install it, head over to the Install section of TWRP and then flash the TWRP ZIP file.
  4. On the other hand, if your device is non-A/B, then it will still be having the recovery partition. Hence you could directly flash the file, without booting it.
    fastboot flash recovery twrp.img

STEP 2C: Flash TWRP to Boot Partition

There is yet another method to boot your device to TWRP REcovery and is applicable for A/B dual partition devices such as Mi A3. For these devices, you will have to first flash the TWRP file to the boot partition (and not just boot it). Then directly boot to TWRP from Fastboot and finally flash the TWRP ZIP file for permanent installation. Here are the required instructions for the same (make sure to Rename the recovery IMG file to twrp hence the complete name becomes twrp.img

  1. Place this twrp.img inside the platform-tools folder and launch the CMD window inside this folder
  2. Now use the below command to flash the TWRP IMG file to the boot partition:
    fastboot flash boot twrp.img
  3. Then directly boot your device to TWRP Recovery, either via Hardware keys or the below command
    fastboot reboot recovery
  4. If you need to decrypt the data partition, then go to Wipe and select Format Data, otherwise no need to wipe the data.
  5. Now transfer the TWRP ZIP file to your device by any of your preferred methods.
  6. Then go to Install, select the TWRP ZIP file and perform a right swipe to flash it.
  7. You may now reboot to the OS via Reboot > System.

That’s it. Your device will be now be booted to the recovery. On that note, we conclude the guide on how to boot into the TWRP or stock recovery from Fastboot mode. If you have any queries with regards to any Fastboot or ADB commands, or any other boot commands in general, do let us know in the comments section below.



 

Share:
  • The article is very detailed, I find this to be the most complete article.
    Great
    Thanks the author

  • after i do this im stuck now on orange state : before when im getting orange state im just doing fastboot flash recovery recovery.img
    but now its not working
    how do i fix this ?

    • never mind its look like i forgot to put this
      fastboot flash boot boot.img
      now it works again thanks god

  • Pavel Sarker

    Can you port twrp for Huawei mediapad t1-701u

  • Hello sir , my problem is this , I have a Xiaomi mi a1 and I got helped by someone last year to install Evolution X for the first time . Now one year later I did OTA update and the phone got ruined by it . I can’t get the help from that person to reinstall the ROM via PC with TWRP so I have to do it myself . I tried to boot into recovery TWRP and there s a tiny robot laying on his back with an exclamation point above him . So from what I know that means the custom recovery got replaced by stock one . OK , so I installed ADB drivers downloaded a new TWRP recovery and when I try to flash it I get this error saying that partition table doesn’t exist so by reading this thread here https://forum.xda-developers.com/t/partition-table-doesnt-exist.3731912/ I found out I need to choose a partition A or B and … I ‘m lost …. can you help ?

  • hello AM using oneplus 7 pro after
    C:\Users\cybog\Downloads\Compressed\platform-tools_r31.0.2-windows\platform-tools>fastboot boot C:\Users\cybog\Downloads\twrp-3.5.2_9-0-guacamole.img
    Sending ‘boot.img’ (33236 KB) OKAY [ 0.766s]
    Booting OKAY [ 0.130s]
    Finished. Total time: 0.913s
    after this it shows fastboot mode it doesn’t give options of twrp .
    Disclaimer :- i have rooted this same mobile for 4-5 times but this time it doesn’t give any options.

  • János Attila

    Hi Sadique,

    I tried it, both versions, but the results are (similar to Sohaib):

    D:\platform-tools>fastboot boot twrp.img
    Sending ‘boot.img’ (39896 KB) OKAY [ 1.019s]
    Booting FAILED (remote: ‘unknown command’)
    fastboot: error: Command failed

    and

    D:\platform-tools>fastboot flash recovery twrp.img
    Sending ‘recovery’ (39896 KB) OKAY [ 1.019s]
    Writing ‘recovery’ FAILED (remote: ‘(recovery_b) No such partition’)
    fastboot: error: Command failed

    The handset is a Xiaomi Mi A3 (Android One) with new official update to Android 11, bootloader unlocked.

    • Sadique Hassan

      Hi Janos, in Mi A3 you will have to flash the TWRP IMG to the boot partition via fastboot flash boot twrp.img and then flash the TWRP ZIP (after decrypting the data partition) from TWRP. Owing to your query. I have also written a separate guide for your device, do have a look: How to Install TWRP Recovery on Xiaomi Mi A3

  • Sohaib ur Rasool

    hey i tried to run the the card (fastboot boot recovery.img). twrp name is recovery. but i always get this error ”
    C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot recovery.img
    downloading ‘boot.img’…
    OKAY [ 1.491s]
    booting…
    FAILED (remote: Failed to load/authenticate boot image: 00000050)
    finished. total time: 1.522s”.

    What should i do.

    • Sadique Hassan

      Hi Sohaib, could you let me know your device name so that I may understand this query better.

  • Does this method require an unlocked bootloader?

    • Sadique Hassan

      Hi O M, booting to Stock Recovery doesn’t require an unlocked bootloader. However, booting to a custom recovery like TWRP does require an unlocked bootloader.