How to Install TWRP Recovery & Root w/ Magisk using Fastboot! [Universal Method]


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:

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 is part of the Android Root 101 series, if you want to learn about Android root and custom ROMs check out the whole Android Root 101 Series 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 then search for your model of Android.

If you don’t see your Android device at, 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, Magisk tools, Windows ADB Drivers, and No Verity Opt Encrypt Zip.   Unzip 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.

For Windows:
cd Downloads
cd fastboot
fastboot flash recovery PutImageFileNameHere.img

For Mac:
cd Downloads
cd fastboot
chmod 755
./fastboot-mac flash recovery PutImageFileNameHere.img

For Linux:
cd Downloads
cd fastboot
chmod 755
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.

For Windows:
cd Downloads
cd fastboot
fastboot boot PutImageFileNameHere.img

For Mac:
cd Downloads
cd fastboot
chmod 755
./fastboot-mac boot PutImageFileNameHere.img

For Linux:
cd Downloads
cd fastboot
chmod 755
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.

This tutorial is part of the Android Root 101 series, if you want to learn about Android root and custom ROMs check out the whole Android Root 101 Series here.

11 Responses

  1. Angelo says:

    i have been trying various methods from your site to root two old phones, both motorola models, a G6 play, and a moto g 2nd gen, i am focusing on the moto g6 play currently before attempting the moto G 2nd gen, i am currently using a pixel 3A, however i am not willing to risk bricking the pixel if i cannot root the previous two phones first, i have been following your guide step by step, however no luck, i have downloaded the correct sofware and am running a linux machine, the moto g6 play is set with developer options ready, i can unlock the bootloader but that is where i am stuck, i cannot find the correct options from the bootloader to succcesfully transfer twrp to begin the process, any help would be greatly apprreciated

  2. David says:

    hi bro thank you so much for helping us. I have a important problem. I do everything correctly but when device must to load twarp and begins the step 3 and install root, it shows this massage:

    USB Transferring…
    USB Transmission OK Time: 482ms Vel:29445KB/S

    and then i must to do /fastboot reboot/ or /fastboot reboot-bootloader/ and i have not another choice….

  3. David says:

    could you answer me please Max?

  4. David says:

    Neffos X1 Lite ROOTED
    thank you very very much!

  5. JoeShen says:

    FAILED (remote: ‘(00180001)’)
    FAILED (remote: ‘(00180002)’)
    My phone is Motorola MT870, I can’t flash recovery.img!

  6. Shaireyar says:

    Plz sir i havr followed u since ur channel on YouTube began… But i had no luch on rooting ot installing twrp on my vivo Y53 1606… If u could kindly help me on this.. Would be greathfull to you

  7. Cullen says:

    I need help. Im in over my head. I have a pixel and I
    “fastboot flash recovery twrp-” instead of “fastboot boot twrp-”
    I understand that I need to download the latest factory image for your device and reflash the boot image.
    I have downloaded the latest factory image (Pixel 3 XL) but am unsure of the file within the factory image that i need to use. Please help

  8. Kyle says:

    Am I in the right spot for Rooting an ACER Iconia tab A200?

  9. Muhamed says:

    hello .. I’ve been stuck there too and its pretty simple don’t worry
    just typt .fastboot flash recovery filename.img.img
    trust me it will work douple the img and it will work for you
    then fastboot boot filename.img.img and it shout take you straight to twrp .. there are some phones that this won’t work for it and the sol for that is to do it manually by powering up phone with volume up and should take you to twrp
    notice … don’t let your phone boot up or it will go back to nomal system recovery

Leave a Reply

Your email address will not be published. Required fields are marked *

Join the HighOnAndroid VIP Fans List for free help from Max and discounts on Android accessories.

Max Lee

Max Lee is the founder of Max makes Android tutorials and review videos for people who want to get high on Android over at his YouTube channel and Korean YouTube channel.