“Team Win Recovery Project (TWRP) is a FOSS, custom recovery image for Android-based devices. TWRP provides a touchscreen-enabled interface which allows users to backup the current system, ‘root’ the device, and to install third-party firmware such as custom ROMs.” (Paraphrased from Wikipedia, November 4, 2016.)
The following guide is adapted from the TWRP instructions for a “fastboot” install from MacOS. Additional instructions were adapted from the XDA Developer forums. This guide has been tested with, and is specific to, the HTC One M8 handset with Android version 6.0. Your results may vary.
- Root access is not required.
- Developer permissions enabled.
- USB debugging enabled.
- Unlocked bootloader.
- Platform-tools from the Android SDK. (On MacOS these are located at ~/Library/Android/sdk/platform-tools.)
- TWRP recovery image.
- Be sure to validate your download using the provided PGP signature.
- Copy the TWRP recovery image to the platform-tools folder.
- Connect the device to the desktop with a USB cable.
- Use the following command in MacOS Terminal to relaunch the device in bootloader “fastboot usb” mode.
adb reboot bootloader
- Use the following commands in MacOS Terminal to install the TWRP recovery image to the device and to reboot the device. Use the actual image filename instead of “twrp.img.”
fastboot flash recovery twrp.img
4. Launching TWRP Recovery
TWRP Recovery may be launched either from the desktop over USB or on the device itself from its bootloader screen.
- Connect the device to the computer with a USB cable.
- Use the following command in MacOS Terminal to relaunch the device in TWRP Recovery mode.
adb fastboot recovery
- Power off your device. Press and hold the Volume Down button and then simultaneously press and hold the Power button for several seconds. This will launch the device into bootloader mode. The HBOOT label should be indicated with a blue highlight.
- The Volume buttons are used to make selections in the bootloader screen. Highlight RECOVERY and then press the Power button. TWRP will now launch.
5. Upgrading TWRP Recovery
TWRP can be used to upgrade TWRP to a newer version.The following was tested for an upgrade from TWRP version 3.0.2-0 to 3.2.1-0.
- Download the newest TWRP installer for the HTC One M8.
- Be sure to validate the installer using the PGP signature given on the download page.
- Copy the image file to any media that would be accessible from TWRP, such as the internal storage, the micro SD card, or from USB storage connected via USB-OTG cable.
- Reboot the device into TWRP Recovery as described in section 4 “Launching TWRP Recovery”, above.
- Click Install.
- Click Select Storage.
- Select the media where you saved the TWRP installer image. Click OK.
- Click Install Image.
- Navigate to the folder where the installer image is stored and select the image.
- Select the Recovery partition to which the image should be installed (flashed).
- Swipe the slider control at the bottom of the screen to confirm your selection.
- Allow installation to complete.
- Click Reboot, then click System.