Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Install TWRP on HTC One M9

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can install TWRP (Team Win Recovery Project) on the HTC One M9, and it replaces the stock recovery with a custom one that lets you flash ROMs, make full backups, and wipe data more thoroughly. Before you start, you must unlock the bootloader and have a Windows PC (or a Mac/Linux with fastboot set up). This guide covers the standard method using fastboot, which works on all M9 variants (Hima_UL, Hima_UHL, etc.).

What You'll Need

  • HTC One M9 with an unlocked bootloader (required; see HTC's official unlock guide on their developer site).
  • A Windows PC (the steps below use Windows commands; for Mac/Linux, replace fastboot.exe with fastboot).
  • USB cable (preferably the original HTC cable).
  • HTC USB drivers installed on your PC (download from HTC's support site).
  • Minimal ADB and Fastboot tool (or full Android SDK platform-tools).
  • TWRP image file for the HTC One M9 (download the latest .img from the official TWRP website – choose the variant for your exact model, e.g., twrp-3.x.x-x-hima.img).
  • Backup your data: unlocking the bootloader and flashing recovery will wipe your phone, so back up photos, contacts, and anything else before starting.

Step-by-Step

  1. Enable Developer Options and USB Debugging – On your phone, go to Settings > About and tap Build number seven times until you see “You are now a developer.” Then go to Settings > Developer options and turn on USB debugging.
  2. Set up ADB and Fastboot on your PC – Download and extract Minimal ADB and Fastboot (or the official platform-tools) to a folder like C:\adb. Open a command prompt in that folder (Shift+Right-click > “Open command window here” on Windows).
  3. Connect your phone to the PC – Plug in your phone via USB. When prompted on the phone, allow USB debugging (check “Always allow from this computer”).
  4. Verify the connection – In the command prompt, type adb devices and press Enter. You should see your device listed as “device” (not “unauthorized”). If it says “unauthorized,” check the phone and accept the prompt.
  5. Reboot into bootloader – Type adb reboot bootloader and press Enter. The phone will restart into the bootloader (a white screen with text).
  6. Verify fastboot connection – In the bootloader, type fastboot devices. Your device should appear. If it doesn’t, check your USB drivers and try a different port.
  7. Place the TWRP image in the same folder – Copy the downloaded .img file into the same folder as fastboot (e.g., C:\adb). Rename it to something short like twrp.img for easier typing.
  8. Flash TWRP – Type the following command and press Enter:
    fastboot flash recovery twrp.img
    Wait for the process to complete. You’ll see a “OKAY” message when done.
  9. Reboot into recovery – Do not let the phone boot normally yet. Use the volume keys to highlight RECOVERY on the bootloader screen, then press the power button to select it. The phone should boot into TWRP.
  10. First boot into TWRP – When TWRP loads, it may ask if you want to keep system read-only. Swipe to allow modifications. You’ll now see the TWRP home screen.
  11. Optional: Reboot to system – Once TWRP is confirmed working, you can reboot to system by selecting Reboot > System. The phone will boot normally, and TWRP will remain installed.

Common Mistakes

  • Not unlocking the bootloader first – Flashing TWRP will fail with a “remote: not allowed” error if the bootloader is locked. Unlock it via HTC’s official method before proceeding.
  • Using the wrong TWRP image – The M9 has several variants (Hima_UL, Hima_UHL, etc.). Using the wrong image can cause a bootloop or touchscreen issues. Always download the correct one from the official TWRP site for your exact model.
  • Skipping the “fastboot devices” check – If fastboot doesn’t see your phone, the flash will fail. Always verify the connection first.
  • Letting the phone boot normally after flashing – If you boot to system before entering recovery, the stock recovery may overwrite TWRP. Always boot straight into recovery after flashing.
  • Using a USB hub – USB hubs can cause connection drops. Plug directly into a USB port on your PC.

Tips

  • Make a nandroid backup in TWRP right after installation, before you flash anything else. This gives you a full system restore point.
  • Keep the TWRP image file on your PC in case you need to reflash it later.
  • If you plan to root, install Magisk or SuperSU right after TWRP, before rebooting to system, to avoid bootloops.
  • Always use the latest TWRP version for your device, as older versions may have bugs with newer Android versions.
  • If you ever need to uninstall TWRP, you can flash the stock recovery back using the same fastboot method with the stock recovery image from HTC.

Troubleshooting

“fastboot devices” shows nothing or “unauthorized” – Reinstall HTC USB drivers, try a different USB port, and ensure USB debugging is enabled. On the phone, when prompted, allow the computer’s RSA key.

“remote: not allowed” error during flash – This means the bootloader is locked. Unlock it first via HTC’s official unlock tool. Note that unlocking wipes your data.

TWRP boots but the touchscreen doesn’t work – This usually means you flashed the wrong image variant. Download the correct one for your exact model and reflash.

Phone boots into a bootloop after flashing TWRP – If you didn’t boot into recovery first, the stock recovery might have been overwritten incorrectly. Reboot into bootloader (hold power + volume down) and select RECOVERY. If that fails, reflash TWRP and immediately boot into recovery.

Fastboot says “waiting for device” – Check that you’re in the bootloader (not the OS). If you’re in the bootloader and it still says waiting, reinstall drivers or try a different cable.

After flashing, the phone boots to a black screen – Press and hold power for 10 seconds to force restart, then try booting into recovery again. If it still fails, reflash the stock recovery and start over.

Frequently Asked Questions

Do I need to unlock the bootloader first?

Yes, absolutely. TWRP cannot be flashed on a locked bootloader. Unlocking the bootloader via HTC’s official method is a prerequisite, and it wipes your phone’s data.

Will installing TWRP void my warranty?

Yes, unlocking the bootloader and flashing custom recovery generally voids the warranty. You can restore stock recovery and relock the bootloader later, but the unlock flag may remain.

Can I install TWRP without a PC?

No, the standard method requires a PC with fastboot. There is no reliable on-device method for the M9.

Will TWRP let me install any custom ROM?

Yes, TWRP allows you to flash custom ROMs, kernels, and mods. However, make sure the ROM is compatible with the HTC One M9 and your specific variant.

Does TWRP work on Android 6, 7, or 8?

TWRP is version-independent; it works regardless of the Android version installed. Just make sure you have the latest TWRP build for the M9.

Can I uninstall TWRP later?

Yes, you can flash the stock recovery image using the same fastboot method. You can also relock the bootloader if you wish, but that may wipe data again.