Smart Systems for Home

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

Install TWRP Custom Recovery on Pixel & Pixel XL

· 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

Installing TWRP (Team Win Recovery Project) on your Google Pixel or Pixel XL lets you flash custom ROMs, kernels, and mods, create full system backups (Nandroid), and wipe data more thoroughly than stock recovery. This guide walks you through unlocking the bootloader, flashing TWRP, and verifying the installation. You must unlock the bootloader first, which wipes all data on the phone. Back up anything important before starting.

What You'll Need

  • A Google Pixel or Pixel XL (any carrier, but the bootloader must be unlockable – most are).
  • A USB cable and a computer (Windows, macOS, or Linux).
  • Android SDK Platform Tools installed on your computer – includes adb and fastboot. Download from the official Android developer site.
  • The TWRP image file (.img) for your exact device: sailfish for Pixel, marlin for Pixel XL. Get it from the official TWRP website (twrp.me).
  • USB debugging enabled on your phone: go to Settings > About phone, tap “Build number” 7 times, then go to Settings > System > Developer options and enable USB debugging.
  • Optional: A custom kernel or ROM zip to flash after TWRP is installed, but not required for the install itself.

Step-by-Step

  1. Back up your phone. Unlocking the bootloader erases all data. Copy photos, contacts, and any files you need to your computer or cloud storage.
  2. Enable OEM unlocking. On your phone, go to Settings > System > Developer options and toggle on OEM unlocking. If this toggle is greyed out, you may need to insert a SIM card and connect to the internet for a few minutes, then restart. If it remains greyed out, your device may be carrier-locked – contact your carrier.
  3. Connect your phone to the computer via USB. On the phone, when prompted, allow USB debugging (check “Always allow from this computer”).
  4. Open a command prompt/terminal on your computer in the folder where you extracted Platform Tools. Test the connection by typing: adb devices. You should see your device listed as “device”. If it shows “unauthorized”, check the phone screen and accept the RSA key prompt.
  5. Reboot to bootloader by typing: adb reboot bootloader. The phone will restart into fastboot mode (a screen with an Android robot and “START” text).
  6. Verify fastboot sees your device. Type: fastboot devices. You should see your device serial number. If not, install the proper USB drivers (Windows) or check your cable/port.
  7. Unlock the bootloader. Type: fastboot flashing unlock. On the phone, use the volume keys to highlight “Unlock the bootloader” and press the power button to confirm. This wipes your data and reboots. Wait for the phone to fully boot – it may take a few minutes.
  8. Re-enable USB debugging. After the phone reboots, go back to Settings > System > Developer options and re-enable USB debugging (and OEM unlocking is now permanently enabled). Connect the phone again and verify with adb devices.
  9. Reboot to bootloader again. Type: adb reboot bootloader.
  10. Flash TWRP. In the bootloader, type: fastboot flash recovery twrp-3.x.x-x-sailfish.img (replace the filename with the one you downloaded, and use marlin for Pixel XL). This writes TWRP to the recovery partition.
  11. Boot into TWRP immediately. Do not let the phone boot normally, as Android may overwrite the custom recovery. Use the volume keys to select “Recovery mode” and press power. The phone should boot into TWRP (a blue/black interface with a “Install” button).
  12. Optional but recommended: Disable stock recovery overwrite. In TWRP, go to Advanced > Terminal and type: echo "twrp" > /sdcard/.twrp – this is a common method to prevent Android from replacing TWRP on reboot. Alternatively, you can flash a custom kernel that disables the overwrite. Without this, TWRP may be lost after a normal reboot.
  13. Reboot to system. In TWRP, tap “Reboot” and then “System”. The phone will boot normally. To verify TWRP is still there, reboot to bootloader and select recovery – it should open TWRP.

Common Mistakes

  • Using the wrong TWRP image. Flashing a Pixel XL image on a Pixel (or vice versa) will fail or brick. Double-check your model: sailfish = Pixel, marlin = Pixel XL.
  • Not enabling OEM unlocking. If you skip this, the fastboot flashing unlock command will fail with an error. You must enable it before connecting.
  • Letting the phone boot normally before booting into TWRP. Android can overwrite TWRP on first boot. Always boot into recovery right after flashing.
  • Using an outdated fastboot version. Older versions may not support the flashing command. Update Platform Tools to the latest version.
  • Not backing up data. Unlocking wipes everything. If you forgot, you cannot recover it after the unlock.

Tips

  • Keep your battery above 50% before starting to avoid interruptions.
  • Use the original USB cable or a high-quality one – data transfer issues are common with cheap cables.
  • After flashing TWRP, make a full Nandroid backup from TWRP’s “Backup” menu before flashing any ROMs.
  • If you plan to root, flash Magisk (from the official Magisk GitHub) via TWRP after installation – do not use SuperSU, as it is outdated for Pixel devices.
  • If TWRP gets overwritten after a reboot, simply reflash it using the same steps. Some users find that flashing TWRP again after every OTA update is necessary.

Troubleshooting

  • “fastboot: command not found” – Platform Tools are not in your PATH. Navigate to the Platform Tools folder in your terminal, or add it to PATH.
  • “FAILED (remote: unknown command)” – Your fastboot version is too old. Update Platform Tools.
  • Device not detected in fastboot – Install the Google USB driver (Windows) or try a different USB port. On macOS/Linux, ensure you have the correct permissions (run as root or add udev rules).
  • OEM unlocking toggle is greyed out – This is common on carrier-locked devices. Insert a SIM card, connect to Wi-Fi, and wait a few minutes. If it stays greyed out, your carrier may have locked the bootloader – you cannot unlock it without their approval.
  • Phone boots to stock recovery instead of TWRP – Android overwrote TWRP. Reflash TWRP and immediately boot into recovery. To prevent this, flash a custom kernel that disables the overwrite, or use the terminal command in TWRP as described above.
  • Phone stuck in bootloop after flashing TWRP – This is rare but can happen if the TWRP image is corrupt. Re-download the image from the official site and reflash. If still stuck, boot into fastboot and flash the stock boot image from the factory image to restore.
  • “adb devices” shows “offline” – Revoke USB debugging authorizations on the phone (Settings > Developer options > Revoke USB debugging authorizations), reconnect, and accept the prompt again.

Frequently Asked Questions

Will installing TWRP void my warranty?

Yes, unlocking the bootloader and installing custom recovery typically voids the manufacturer warranty. Google may still repair hardware issues, but software support is not guaranteed.

Can I uninstall TWRP later?

Yes. To return to stock, lock the bootloader with fastboot flashing lock after flashing the stock factory image. This will erase your data again.

Is it safe to install TWRP on my Pixel?

If you follow the steps correctly, it is generally safe. The main risks are using the wrong image or interrupting the flash. Always download from official sources.

Will OTA updates work with TWRP?

OTA updates will likely fail or overwrite TWRP. You can manually install OTA updates via TWRP, but it's easier to flash custom ROMs that are updated regularly.

Do I need to unlock the bootloader again after a factory reset?

No, unlocking is permanent until you lock it manually. Factory reset does not relock the bootloader.

What if I don't want to root – do I still need TWRP?

No. If you only want to use stock Android, you don't need TWRP. It's only necessary for flashing custom software or making full backups.