TWRP Installation & Uninstallation Guide - falendra-sahu/rooting GitHub Wiki
🔧 TWRP Installation & Uninstallation Guide
TWRP (Team Win Recovery Project) is a custom recovery that allows flashing ZIPs, taking backups, restoring, wiping partitions, and much more. Below is a complete step-by-step guide for both installing and removing (uninstalling) TWRP.
✅ Prerequisites
- Bootloader must be unlocked
- ADB & Fastboot drivers installed
- TWRP image file (e.g.,
twrp.img
) - USB Debugging enabled (for ADB method)
- Optional:
magisk_patched.img
if you're using Magisk
📥 Installation Methods
🔹 1. Temporary Boot (Without Installing)
This method boots TWRP once without permanently installing it. Helpful for testing or one-time usage.
fastboot boot twrp.img
📝 After booting into TWRP, you can flash Magisk, custom ROMs, or backup data.
🔹 2. Permanent Installation (Flash TWRP)
This will replace the current recovery partition with TWRP permanently.
fastboot flash recovery twrp.img
📌 On some devices (especially A/B devices), you must reboot to recovery directly after flashing to prevent being overwritten:
fastboot flash recovery twrp.img
fastboot reboot recovery
📌 On A/B partition devices:
fastboot flash boot twrp.img
fastboot reboot recovery
🔹 3. Flash via Existing TWRP (If Already Installed)
- Transfer
twrp.img
to device. - Boot into current TWRP.
- Go to Advanced > Install Recovery Ramdisk or Install Image.
- Select
twrp.img
and chooseRecovery
partition. - Swipe to flash.
❌ Uninstallation (Revert TWRP to Stock Recovery)
To remove TWRP, flash the stock recovery or full stock firmware.
🔹 1. Flash Stock Recovery
fastboot flash recovery recovery.img
🔸 Make sure recovery.img
is from your stock ROM.
🔹 2. Flash Full Stock ROM (Optional)
Use fastboot flash tool or MiFlash/SP Flash Tool depending on device brand to restore full stock environment.
📌 Tips
- Use
adb devices
to confirm ADB connection. - Use
fastboot devices
to confirm fastboot connection. - Use
fastboot getvar current-slot
for A/B devices.
🧩 Example Commands Recap
Purpose | Command |
---|---|
Boot TWRP temporarily | fastboot boot twrp.img |
Flash TWRP (normal) | fastboot flash recovery twrp.img |
Flash TWRP (A/B) | fastboot flash boot twrp.img |
Remove TWRP | fastboot flash recovery recovery.img |