In this Android Root 101 tutorial, we are going to learn how to install TWRP recovery & root your Android using Fastboot. This tutorial is a “universal method”, meaning you are going to be able to use on any Android device except the following:
- Samsung Android devices use ODIN so you will want to follow How to Install TWRP & Root w/ Magisk using ODIN on Samsung Android instead.
Most Android devices use fastboot for installing TWRP recovery so if you don’t have a Samsung, you should be good to go.
For Motorola device, you may have to use Motorola’s Bootloader Unlock Website here.
This tutorial assumes that you’ve UNLOCKED the BOOTLOADER already, if you have not yet unlocked your bootloader, please follow How to Unlock Bootloader on Android to unlock your bootloader then come back to this tutorial. But do follow Step 1 to see if there is a TWRP recovery for your Android first so you don’t have to unlock the bootloader if you there is no TWRP recovery for your Android.
Step 1. Before beginning this tutorial, you will need to first find out if your Android has an official TWRP recovery.
First, find the exact model of your Android in Settings->About Phone or Settings->Software Information.
Goto TWRP.me then search for your model of Android.
If you don’t see your Android device at TWRP.me, you are not out of luck. You can try Googling for unofficial versions of TWRP. Remember, not all phones have official versions of TWRP so if you don’t see it, try Googling around for TWRP recovery of your device.
There are TWO basic different methods for flashing TWRP.
The first one is simply flashing the TWRP image file and if you see only files ending in “.img”, that means you only have to flash TWRP recovery image file to the recovery partition. Download the latest TWRP image file. We will call this “type 1” for the sakes of this tutorial.
The second type which is for mostly on newer Android devices like Pixel 2 or OnePlus 6, you will find TWRP image files(files ending in .img) and TWRP installer zip files(files ending in zip). If you see this second type for your Android, download both TWRP image and installer zip files. We will call this “type 2” for the sakes of this tutorial.
Step 2. Next we will power off our Android device and manually boot your android into fastboot mode.
[The Universal Method] For most devices, you can boot into fastboot mode by simply holding down Volume Down and Power buttons for about 3-5 seconds.
For HTC devices, you can also use Volume Down and Power buttons together. Now, for HTC make sure your phone says “Download mode”. If not, use the Volume keys to find “Boot to Download” and hit the Power button to enter Download mode, which is the correct fastboot mode for HTC devices.(HTC fastboot mode is NOT for fastboot)
For OnePlus devices like OnePlus 6, you can simply hold down Volume Up and the Power buttons together.
You can also use ADB tools to reboot using command line, if you cannot figure out how to reboot into fastboot mode, use Steps 1 thru 7 from our Bootloader Unlock Guide.
Step 3. You will also need to download fastboot.zip, Magisk tools, Windows ADB Drivers, and No Verity Opt Encrypt Zip. Unzip fastboot.zip into a folder called “fastboot” inside your Downloads directory. If you have followed our bootloader unlock guide you shouldn’t need to re-install Windows ADB drivers but if you have not done that yet, install Windows ADB drivers. No drivers required for Mac or Linux.
For Windows, you can verify you have correct drivers installed by going to Device Manager. You should see “Android ADB Interface” or something similar. If you don’t see it yet, try unplugging and re-plugging your USB port and also try a different USB port if that doesn’t work.
Copy the TWRP image you downloaded in Step 1 to the fastboot folder.
Step 4. Next, we will flash TWRP recovery using fastboot. There are TWO methods depending on which type of TWRP you need to install(refer back to Step 1 for your type).
First open a command prompt by typing “cmd” in search bar for Windows. For Mac or Linux, open a terminal (if you don’t know how, please Google it).
For type “1” TWRP recovery, type the follow to flash TWRP recovery to recovery partition.
fastboot flash recovery PutImageFileNameHere.img
./fastboot-mac flash recovery PutImageFileNameHere.img
sudo ./fastboot-linux flash recovery PutImageFileNameHere.img
*Note – REMEMBER to replace “PutImageFileNameHere.img” with your TWRP image filename.
Once flashed successfully, you can simply boot into recovery by using the Volume keys then hitting the Power button on most Android smartphones. On certain phones, you may have to reboot into recovery manually. But that should boot you into TWRP recovery and also your TWRP has been installed permanently.
For “type 2” TWRP recovery, you will need to actually boot TWRP recovery temporarily then flash TWRP installer zip file to permanently install TWRP recovery.
fastboot boot PutImageFileNameHere.img
./fastboot-mac boot PutImageFileNameHere.img
sudo ./fastboot-linux boot PutImageFileNameHere.img
*Note – REMEMBER to replace “PutImageFileNameHere.img” with your TWRP image filename.
Notice here instead of “flash recovery” like “type 1”, “type 2” uses just “boot”, which allows you to boot any image file without flashing(so you can boot TWRP recovery temporarily in memory). Note, you can also use the same method on “type 1” devices which will boot you TWRP without installing it permanently. If you have trouble booting into TWRP after flashing(with “type 1” devices), you can try this command and boot into TWRP.
You should have booted into TWRP.
For “type 2” devices, use the Install menu and install your TWRP Installer zip file.
After flashing, reboot into TWRP recovery and if it boots back into TWRP, you have permanent TWRP recovery installed on your “type 2” device.
Step 5. Now, if you booted into TWRP but see a “Unmodified System Partition” warning message like below, you will need to wipe data and decrypt your phone unless you see another option to enter your passkey(such as OnePlus devices which don’t need to be decrypted). If you don’t see the warning message below, skip to Step 7.
Choose “Keep Read Only”. If you unlocked your device, you probably already wiped data. If you haven’t wiped data after unlocking bootloader or booted your phone and signed in, wipe data now and reboot to TWRP recovery.
Step 7. At this point, if you want to install a custom ROM, you can stop following the rest of the tutorial and continue the tutorial, How to Install Custom ROM w/ TWRP!
Copy over all of the Magisk root files and No Verity Opt Encrypt ZIP files
If your device is encrypted, install the No Verify Opt Encrypt zip file here, otherwise skip to the next step.
When done installing reboot TWRP recovery using the Reboot Menu from home screen. Once rebooted, your phone should no longer show the warning message and go straight into TWRP home menu. If so, congrats, you have successfully disabled encryption on your Android.
Step 8. For most Android devices, you can simply install TWRP recovery, then simply install Magisk ZIP file to get full root.
Tap on “Install’.
Tap on the Magisk ZIP file and swipe to right to install.
When done, reboot!
Once rebooted, you should find Magisk Manager app i your app drawer. If you don’t see it for some reason, go ahead and copy over the Magisk APK file then use a File Manager app to install the app.
Run the Magisk Manager app and if you see”Install version” you have fully-rooted your Android. Also you can try a SafetyNet check and if your Android passes, you will be able to fully hide root and run apps that check for root such as banking apps, Nintendo game apps like Pokemon Go, Google Pay, and much much more.
You can also open up any root app such as the free Titanium Backup app on the Play Store and you should see “Superuser Request” window pop-up. If you see that, congratulations! You have successfully rooted your Android and also installed TWRP recovery permanently.
Q: Do I need to install TWRP permanently?
A: Nope, you can simply just root only by booting using the command, “fastboot boot twrp.img” and root your phone using Magisk, install custom ROM, or anything else you can do in TWRP. Installing TWRP permanently just allows you to reboot TWRP and use it without a computer later down the road. But I do recommend installing TWRP permanently that way you can easily download and install new files without a computer.
Join the HighOnAndroid VIP Fans List for free help from Max and discounts on Android accessories.