Do you guys want to root your phone? Yes, then you are in the right place. Today in this article I will show you how you can Root any Android phone in 2021 and also we are going to look at how to root any Oneplus Google or Chinese or any other a generic Android phone you might have.
I will show you two methods to root your phone in this guide the first method is by boot image patching which is a bit complicated process but safer and the other method is by using TWRP which is easier but less safe.
Please do note that throughout this guide I will make use of terms fastboot and bootloader and you should keep in mind that they are basically the same thing and I may use anyone of the term to describe the same thing.
I have also used terms like terminal and minimal ADB and fastboot terminal is basically for a Mac and minimal ADB and fastboot is for Windows. So, if ever I say that open terminal that means you should open terminal if you are using a Mac and if you are using a Windows then you should open minimal ADB and fastboot and vice versa.
- 1 Is Your Phone Bootloader Unlockable?
- 2 Steps To Root Any Android Phone 2021
- 3 Steps- 1: Boot your phone into Bootloader Mode
- 4 Steps- 2: Connecting Phone to PC Using ADB and Fastboot commands
- 5 Steps- 3: Unlocking Bootloader of your phone
- 6 Steps- 4: Rooting your phone
Is Your Phone Bootloader Unlockable?
Now you must check whether your phone is bootloader unlockable or not so make sure that you have read this article on how to check if your phone is bootloader unlockable or not also make sure that you have installed the USB drivers and also have set up ADB and fastboot on your Windows or Mac.
Once you know that your phone is spooler unlockable then you should continue with this tutorial or else you can ask for help in the comment section down below.
Please note that unlocking bootloader may void your warranty and will wipe all the data on your phone. so, make sure that you have made a backup before proceeding.
Now let’s see how to unlock the bootloader on your phone.
Steps To Root Any Android Phone 2021
Below I have shown you step by step procedure to root any Android phone that supports Bootloader unlocking.
Steps- 1: Boot your phone into Bootloader Mode
- The first thing you do is you need to open your phone and then Go to Settings.
- Then go to About Phone and then look for Build Number and tap seven times on Build Number to Enable the Developer Options.
- Now go back to Settings and then go to Developer Options and Enable OEM Unlocking to enter the password if it asks you for a password.
- Scroll down and you will also see an option called USB debugging tap on it to enable it.
- Now once you have done that you need to boot your phone into bootloader mode so follow the below steps.
- First Power Off your phone.
1st Method: Boot your phone into Bootloader Mode
- Now here comes the tricky our different phones will have different but in combination to boot into bootloader mode. So, you need to find the right combination for your phone for most phones out there the button combination is Volume Up + Power Button.
- While for some other phones it is Volume Down + Power Button or if you don’t want to use any button combination you can just use ADB command to boot your phone directly to boot the Bootloader mode.
2nd Method: Boot your phone into Bootloader Mode
- Connect your phone to the PC.
- Then you need to open the terminal and type the below command.
adb reboot bootloader
- Hit enter and this will ask you for permission in your phone then just allow the permission.
- Now it should boot your phone into bootloader mode.
However, if you are using the button combination then you need to do is you need to press the Power button + Volume Up button or Power button + Volume Down button whichever works for your phone.
Now for some phone, this button combination will not directly take them to the bootloader mode instead it will take them to the boot menu. So, if you end up in the boot menu then you should look for the option called boot into bootloader.
Then you should use your volume keys to browse through the option and then select the option which says reboot into bootloader and selected with the power button and it should boot your phone into bootloader mode.
If you have any problem then please ask me in the comment section down below.
Steps- 2: Connecting Phone to PC Using ADB and Fastboot commands
- Now once your phone is in the fastboot mode Connect your phone to your PC.
- Make sure that you have already installed all the USB drivers. so, you don’t have any problem connecting your phone. But if you’re using a Mac you don’t need to install any drivers.
- Once your phone is connected to your PC. You need to open the terminal on Mac or open minimal ADB and fastboot on Windows and type
- Hit enter this should return a list of devices that are connected to your computer.
- And you will see your devices to there with an ID this means that your phone is properly connected to your PC in fastboot mode and if it doesn’t show your device and it means that your phone is not connected and it could be that your phone is not in fastboot mode or you’d have an installed USB driver.
- If you’re using Windows now once your phone is properly connected you can also type.
fastboot flashing get_unlock_ability
- This is to check if your phone is unlockable or not. if it will be returned a code of 1 if it’s not then it will return a code of
0. Now, this command may or may not work for your phone you don’t need to worry about that you can also type.
fastboot oem device-info
- This command is to check all the information about your phone and as you can see in this example it says device unlock false which means it’s not unlocked it also says that device critical unlock which means that there’s another layer of lock on this phone.
- This means that we need to unlock both of these layers on this phone.
- Now this command may also not work for your phone it depends on what type of when you’re using.
Steps- 3: Unlocking Bootloader of your phone
- Now there are three commands to unlock the bootloader on your phone. For different phones, different commands will work but the most common command is.
fastboot oem unlock
- Hit enter, now this will unlock the bootloader on your phone if it doesn’t and if it fails that means that you need to use another command then you should type.
fastboot flashing unlock
- And Hit enter, now depending on what phone you’re using now if you may directly start unlocking your phone or it may show you a bootloader unlock the screen.
- If you see a bootloader unlock screen then you should use your volume keys to highlight and choose unlock the bootloader or choose something like yes allowed bootloader or yes or no or whatever the options your phone is showing you.
- And when you choose the option just press the volume key or power button to confirm your choice and it should start unlocking your bootloader.
- Now as we have seen an example your device might also have an extra layer of law which is critical law.
- So for that, you need to boot your phone into bootloader mode again and type.
fastboot flashing unlock_critical
- And follow the same unlock process as before.
Steps- 4: Rooting your phone
Now once your phone bootloader is unlocked. let’s talk about the root methods now there are two ways to root your phone one is using TWRP and the other is without using TWRP.
The TWRP method is easier but not all the phones have TWRP available for them. And if you can’t find TWRP for your phone then you can still root your phone as long as you have an unlocked bootloader.
Now before we talk about the two methods in detail we should first find a TWRP for your phone and then you can decide which method you should use.
- So first you to go to the TWRP website and search for your phone using the phone name or phone’s code name.
- Once you see your device in the list click on it and download it.
- If you don’t find you TWRP Recovery for your device then you can simply go to xda-developers
- Go to your phone section and look for TWRP or search for TWRP and download it from there.
- Now if you don’t find a TWRP there as well then you can go to this website and look for TWRP for your phone there.
- And even if you don’t find a TWRP for your phone you will still be able to Root your phone using other methods.
Now let’s talk about the two methods, the first method is using TWRP you can use this method if you manage to find a TWRP for your phone or if you want to install a custom recovery along with rooting your phone.
The other method is boot image patching you should use this method if you didn’t find a TWRP or you just want to root your phone without TWRP.
Method-1: Rooting Android Using Boot Image Patching
- For this method, you need two files one is your current boot image file and the other is Magisk App.
- To get the boot image file for your phone, first of all, we need to check which ROM version your phone is running.
- For that just go to settings go to About and check the Build Number of your phone.
- Now you will have to download the firmware file for your phone of the same Build Number that you are running on your phone.
- So I will suggest you update your phone to the latest build version and download the latest firmware build.
Sometimes it’s hard to find older builds. You can find the ROM file from your phone manufacturer’s website like for OnePlus we can find it from the OnePlus website for Google you can find it from google website and etc.
But if you are using some Chinese phone or some other phone then you may find it hard to find the firmware for your phone. So you can just go to this website and look for your phone and download the file.
- Now once you have downloaded the firmware file you need to extract the boot image file from the firmware file.
- And then copy the boot image file to your phone.
- I will recommend you to copy to the download folder.
- Now go ahead and download Magisk Manager Apk and install it on your phone.
- Then open Magisk Manager App and tap on install then install.
- Now Select and patch a file and select your stock boot image file.
- Magisk Manager will install Magisk to your boot image and store it in the download folder as magisk_patched.img.
- Now all you have to do is copy this file from your phone to your PC.
- And boot your phone into fastboot mode again and connect your phone to your PC.
- Now open the terminal on Mac or open minimal ADB and fastboot on Windows and type.
- And Hit enter, to check if your phone is properly connected.
- Now you have to type.
fastboot flash boot /path of the image file/
- If you cannot type the path just drag and drop the file to the terminal and it should enter the path of the file automatically.
- Hit enter, and it should start flashing the file.
- Now once that’s done you need to type.
- Hit enter, and that’s it now it will reboot your phone. And your phone should be rooted.
- Once your phone boots up open Magisk Manager App and you should check and verify if it’s rooted.
Method-2: Rooting Android Using TWRP Recovery
Now before we begin I just want to make clear that in this method I will only show you the way to Root your phone using TWRP and I may not show how to install TWRP as it’s not the purpose of this tutorial and the process can get a bit complicated considering a different type of phones out there.
So I had covered the complete process of installing TWRP in this article. In this guide, we will only focus on the reading process rather than installing the process of the TWRP and will only cover as much as needed.
The first thing you need to do is you need to make sure that you have already downloaded the TWRP image file for your phone on your computer. You also need to download Magisk Zip file. You can either download this on your phone or on your PC.
- First, you need to boot your phone into fastboot mode as we did before.
- Connect your phone to your computer using USB cable and open terminal and type.
- And Hit enter, to check if your phone is properly connected.
- Now type.
fastboot boot /path of the image file/
- Again you can also drag and drop and it will automatically enter the path of the image file.
- Hit enter, and it should boot your phone into TWRP recovery mode.
Now if it doesn’t boot your phone into recovery or it gives you an error while running this command it means that this method will not work for your phone and you should follow the previous method.
- Now, do note that since we use the boot command to boot into the recovery it only temporarily boot us to TWRP recovery and it didn’t install it so once you boot into recovery mode you will see a screen like this.
- It says unmodified system partition where you need to select keep read-only.
- Now there are three ways to flash Mgisk Zip file one is via PC using ADB sideload other is flashing images from the internal storage of your phone and the other is using OTG.
- To install Magisk from PC
- First, go to TWRP >> Go to advance and go to ADB Sideload.
- And swipe to start to sideload. Make sure your phone is connected to your PC.
- Now open terminal and type.
adb sideload /path of the zip file/
- Hit enter, and it should start flashing the Magisk Zip file to your phone. If your file is internal storage.
- Go to install and browse for matches the file select the file and swipe to flash it.
- Once it’s done flashing your phone is rooted and now you can reboot your phone.
You can also confirm root by checking the Magisk Manager app on your phone and if the app is not there then you can easily install it from here.
Wrapping Up –
So, that’s it guys I hope you found this guide useful and you are able to root your phone. If you encounter any problem do not hesitate to ask anything in the comment section down below. And I will try my best to help you out.
See you in the next guide