Install a Custom TWRP Recovery on Android Using Fastboot

12 min read A detailed, step‑by‑step tutorial for flashing a custom TWRP recovery on Android devices using Fastboot, covering preparation, flashing, verification, and troubleshooting. September 28, 2026 05:00 How to Install a Custom TWRP Recovery on Android Using Fastboot (Step‑by‑Step)

Why Replace the Stock Recovery?

Stock Android recoveries are limited to flashing official OTA updates and performing a factory reset. A custom recovery such as TWRP (Team Win Recovery Project) adds powerful features:

  • Full‑system backups (Nandroid) you can restore later.
  • Flashing unsigned ZIPs, custom ROMs, kernels, and patches.
  • File manager, terminal, and ADB sideload built into the recovery.

Because TWRP runs outside the Android OS, it can modify partitions that the stock recovery cannot. However, flashing a custom recovery also carries risk: an incorrect image or a power loss can brick the device. The tutorial below explains how to minimise those risks.

Before You Start

Gather the following items and perform the checks listed. Skipping any of these steps can lead to a failed flash or data loss.

1. Device Compatibility

  • Identify your exact device model (e.g., Pixel 4a (G025J) or Samsung Galaxy S10e (beyond1)). Check the official TWRP device list for a matching build.
  • If your device is not listed, look for community‑maintained builds, but understand they may be less stable.

2. Unlock the Bootloader

Fastboot can only flash images to a device with an unlocked bootloader. Unlocking wipes user data on most OEMs.

  • Enable Developer options: Settings > About phone > tap Build number seven times.
  • Enable OEM unlocking and USB debugging in Settings > System > Advanced > Developer options.
  • Connect the phone to a PC, open a command prompt and run:
    adb reboot bootloader
  • When the bootloader screen appears, unlock it with the OEM‑specific command. For most Pixel and Nexus devices:
    fastboot flashing unlock
    Confirm the on‑screen prompt.
  • After unlocking, the device will perform a factory reset. Back up photos, messages, and any important files before proceeding.

3. Install ADB & Fastboot on Your PC

Download the platform‑tools package from the Android developer site and extract it to a convenient folder. Add that folder to your system PATH or run commands from within the folder.

4. Charge the Phone

Ensure the battery is at least 70 % or keep the device plugged into power during the entire process.

5. Download the Correct TWRP Image

From the official TWRP page for your device, download the .img file (e.g., twrp-3.6.0_10-0-g950f.img). Save it to the same directory as your platform‑tools.

Flashing TWRP with Fastboot

Follow these steps exactly in the order presented. If a step fails, stop and consult the troubleshooting section.

Step 1 – Verify Fastboot Connection

With the phone in fastboot mode (you should see a screen with the Android robot and the word “FASTBOOT”), run:

fastboot devices

If your device’s serial number appears, the connection is good. If not, try a different USB cable, a USB‑2.0 port, and ensure drivers are installed (Google USB Driver for Windows, android-tools for Linux/macOS).

Step 2 – Flash the Recovery Image

Execute the following command, replacing twrp.img with the exact filename you downloaded:

fastboot flash recovery twrp.img

Fastboot will report progress and finish with “OKAY”. If you see “FAILED (remote: …)”, note the error message – it often indicates a mismatched image or a locked bootloader.

Step 3 – Boot Directly into TWRP

Immediately after flashing, boot into the newly installed recovery before the system overwrites it with the stock image:

fastboot boot twrp.img

If the device boots into Android instead, use the hardware button combination (usually Volume Up + Power) to manually enter recovery mode.

Step 4 – Verify TWRP Is Working

You should see the TWRP UI with a colorful background, navigation bar, and options such as “Install”, “Backup”, and “Wipe”. Take a screenshot (Power + Volume Down) to confirm.

Step 5 – (Optional) Permanently Lock the Bootloader

If you wish to re‑lock the bootloader after confirming TWRP works, reboot to fastboot again:

adb reboot bootloader

Then run:

fastboot flashing lock

Note: Some devices refuse to lock the bootloader while a custom recovery is present. In that case, you can either keep the bootloader unlocked or flash the stock recovery before locking.

Troubleshooting Common Issues

Do not power off the device while flashing. A power loss can corrupt the recovery partition, leaving the device unbootable.

Problem: Fastboot says “device not found”

  • Check USB cable and port; use a data‑capable cable.
  • On Windows, reinstall the Google USB driver via Device Manager.
  • On macOS/Linux, ensure you have the correct udev rules (sudo cp android.rules /etc/udev/rules.d/).

Problem: “FAILED (remote: …)” during flash

  • Confirm you downloaded the image for the exact model and Android version.
  • Make sure the bootloader is unlocked; some OEMs require an additional “fastboot oem unlock” step.
  • If the error mentions “partition is read‑only”, try the command fastboot flashing unlock_critical (use with caution).

Problem: Device boots into Android, not TWRP

  • Immediately after flashing, run fastboot boot twrp.img before the OS starts.
  • Some manufacturers (e.g., Samsung) replace the recovery image on each boot. In that case, you need to flash a patched recovery or use fastboot flash bootloader with a custom boot image that preserves TWRP.

Problem: TWRP boots but shows a black screen or “No such partition”

  • Make sure you are using the correct image for the device’s chipset (e.g., Snapdragon vs. Exynos).
  • Re‑download the image to rule out corruption.
  • If the problem persists, search the XDA‑Developers forum for your device – often there are device‑specific patches.

Post‑Installation Tips

  • Make a Nandroid backup immediately. In TWRP, go to Backup, select all partitions, and swipe to start. Store the backup on an external SD card or USB‑OTG.
  • Keep the TWRP zip file on your internal storage for easy re‑flashing if the recovery gets corrupted.
  • If you plan to flash custom ROMs, read the ROM’s installation guide – many require a specific wipe pattern (e.g., wipe system, data, cache).
  • Consider flashing Magisk (systemless root) via TWRP if you need root later. Magisk also provides a “boot image” patch that can help keep TWRP after OTA updates.

Safety Checklist Before Flashing

  1. Back up all personal data (photos, contacts, messages).
  2. Verify the device model and TWRP image match exactly.
  3. Ensure the bootloader is unlocked and you understand that unlocking wipes data.
  4. Charge the phone to ≥70 % or keep it plugged in.
  5. Download the latest platform‑tools and add them to your PATH.
  6. Keep a copy of the stock recovery image (some manufacturers provide it) in case you need to revert.

When to Re‑Flash Stock Recovery

If you encounter OTA update failures, or you intend to sell the device, restore the stock recovery and relock the bootloader. The steps are the reverse of the tutorial:

  1. Download the stock recovery .img from the OEM’s firmware package.
  2. Boot into fastboot mode.
  3. Run fastboot flash recovery stock_recovery.img.
  4. Re‑lock the bootloader with fastboot flashing lock (if supported).

After flashing stock recovery, perform a factory reset to ensure the device boots cleanly.

Wrapping Up

Flashing TWRP via Fastboot gives you a powerful recovery environment that unlocks the full potential of your Android device. By following the preparation checklist, using the exact commands, and verifying each step, you minimise the risk of bricking your phone. Once TWRP is installed, you can safely create full backups, experiment with custom ROMs, and keep a safety net for future updates.

Remember: the most reliable recovery is the one you keep backed up. Store the .img file and a recent Nandroid backup in a cloud folder or on a PC. If anything goes wrong, you’ll have a clear path to restore your device to a working state.

User Comments (0)

Add Comment
We'll never share your email with anyone else.