List

Wednesday, September 11, 2024

How to install TWRP custom recovery in a Android device


The recovery is a runtime environment separated from Android that can perform various system-related tasks. It contains tools to help repair installations as well as official updates. There are two kinds of recovery, one is stock recovery, the other is custom recovery.  

The stock recovery on Android device can delete all user and cache content ( for factory reset purposes ), allow external tools to run functions on Android device and perform system updates. The stock recovery is a limited system

custom recovery is a replacement for the stock recovery image that comes pre-installed on Android devices. It allows users to perform advanced recovery and maintenance tasks, such as installing custom ROMs, creating backups, and wiping device data.

The most popular custom recovery -- Team Win Recovery Project ( TWRP ), is a touch-based recovery. TWRP offers ROM installation and backup features that the stock recovery doesn't have.


Requirements:

  1. Unlocked Bootloader: Most Android devices need an unlocked bootloader to flash a custom recovery like TWRP.

    • Unlocking the bootloader usually involves enabling Developer Options on your device and using an OEM Unlock command.
    • Be aware that unlocking the bootloader will likely wipe all data on your device, and some manufacturers may void the warranty.
  2. ADB and Fastboot: You need to install Android Debug Bridge (ADB) and Fastboot on your computer.

  3. TWRP Image for your Device: You need to download the specific TWRP recovery image for your device model from the official TWRP website.

  4. USB Cable: For connecting your phone to your computer.


Steps to Install TWRP:

Step 1: Enable Developer Options and USB Debugging

  1. Go to Settings > About phone and tap Build number 7 times to enable Developer Options.
  2. Go back to Settings > Developer Options and enable USB Debugging and OEM Unlocking.

Step 2: Unlock the Bootloader (if needed)

  • To unlock your bootloader, you need to boot into fastboot mode. The method varies, but usually:
    1. Power off the device.
    2. Press and hold the Power + Volume Down buttons until the fastboot menu appears.
  • Use the following command in a terminal/command prompt to unlock your bootloader (this will wipe your data):

            fastboot oem unlock

or

          fastboot flashing unlock

Then follow the on -screen prompts to unlock the bootloader


Step 3: Boot into Fastboot Mode

  1. Connect your device to your computer via USB.
  2. Open a terminal (Linux/Mac) or command prompt (Windows) on your computer.
  3. Boot into fastboot mode with the following command:

    adb reboot bootloader

  1. your device should now be in fastboot mode.

Step 4: Flash TWRP Recovery

  1. Navigate to the folder where your TWRP recovery image is located.
  2. Run the following command to flash TWRP:

          fastboot flash recovery twrp.img

Replace twrp.img with the name of your TWRP image file (e.g., twrp-3.5.2-0-devicecodename.img).

Step 5: Boot into TWRP Recovery

  1. Once the flashing process is complete, reboot into TWRP:
    • Use the command:

                 fastboot reboot



As the device reboots, immediately press the Volume Up + Power buttons to boot into TWRP instead of the stock OS.

Step 6: (Optional) Root Your Device

  • If you want to root your device, you can flash Magisk or another root tool through TWRP.

  • Download the Magisk ZIP file and flash it via TWRP by going to Install in the recovery menu.


🔒  If your device reboots into the stock recovery instead of TWRP after flashing, it may have a recovery partition overwrite protection. In that case, boot directly into TWRP after flashing using the hardware button combination or the fastboot boot command, then flash the TWRP Installer ZIP file from within TWRP itself.








Disclaimer:

The information provided in this guide is for educational purposes only. Installing a custom recovery on your device may void its warranty, and any modifications made to your device are done at your own risk. We are not responsible for any damage, data loss, or malfunction that may occur as a result of following this guide. It is recommended that you back up your data before proceeding and ensure you fully understand the steps involved. If you are unfamiliar with these processes, seek expert advice or further research before attempting. Proceed with caution.


                                                                                             Authored by Kenfrey























No comments:

Post a Comment

Featured post

UNDERSTANDING ANDROID PARTITIONS

  UNDERST 1.     BOOT PARTITION: The boot partition contains the kernel which it at the core of operating system. The kernel acts as the b...

Popular