Followings are the steps to root an android device using ADB or Fastboot : –
1.Install right USB drivers for your device on the PC/laptop.
2.Make sure you have the stock recovery in your device.
3.Bootloader should be unlocked.
4.Make sure you have ADB drivers installed and working properly,it’s very important to have this.
1.Download the right android root package and TWRP.img file on your PC/laptop.
2.Download ADB and Fastboot on your PC.
First of all, you will have to install Custom Recovery on your Phone.
Step by step guide to Flash Custom Recovery on android device using ADB or Fastboot : –
1.Setup ADB and Fastboot on your PC.
2.Move the TWRP.img file you have downloaded to the “ADB and Fastboot” folder .
3.Enable USB Debbuging on your phone.
Goto your phone setting >> About phone >> Build number and click on Build number atleast seven times to enable developer options in your phone.
Now go to Setting >> developer option and enable USB Debbuging (also enable OEM Unlock if available).
4.Connect your phone to PC.
5.Now open the folder where you have downloaded the “ADB and Fastboot” file and open a command window by having “Shift+Right click“on any empty white space inside the folder and select “Open command window here” from the context menu.
6.Now type ” adb reboot bootloader” and hit enter to enter into the recovery mode of the phone.
Check your phone’s screen if it asks for “Allow USB Debbuging”,accept it by selecting
7. Once in recovery mode, use volume buttons to navigate up and down between options and power button to select an option.
8.Select the option “Apply Update from ADB Sideload”.
9.Now type “fastboot flash recovery TWRP.img” and hit enter.
This will install the Custom Recovery on your android smartphone..
10.Now enter into the Custom Recovery i.e TWRP recovery mode and flash the root package zip/img file.
That’s all.Hope this guide serves you well.