first of all switch off your mobile and boot into fastboot mode or bootloader mode by pressing volume down and power buttons simultaneously for 11 secondsT
As you have connected your mobile with your pc go to location where you can installed minimal ADB and Fastboot
Then press shift+right click you will find open command window here from which command prompt will be opened
Now type the command
fastboot devices
if it displays somebulk message followed by fastboot then your device is connected to pc succesfully proceed further else some error may occcured try by using other usb cable
Then type another command
fastboot oem get_unlock_data
you will get a large code consisting of numbers and alphabets copy that code in a single line and save it in text editor
Now go to motorola site.Sign in using your google account or motorola id.Scroll down the page below and paste string in the field at step #step6.Then click on "can my device be unlocked?",after request unlock key and select i agree option
Then you will get mail of the unlock key which may look like this
unlock code:SUDNTGU4WNZFXAQTSAFT
In command prompt heading adb directory type command and press enter
TWRP recovery is one of the most used custom recovery app for android platform .Infact TWRP recovery represents the touch based software of the classic recovery
steps of installation:
You have to install the minimal ADB and fastboot in your pc
Then download the twrp recovery img and paste it in the folder of minimal adb and fastboot and rename the image name recovery.img(if required)
Then power off your mobile and go to fastboot mode and then connect it to pc
Go to that minimal ADB folder and press shift+right click you willl find open command window here option from which command prompt will be iopened
Type the command
fastboot flash recovery recovery.img
From fastboot mode press volume down button and highlight recovery and press power button to select
Inorder to go back to recovery select reboot system
congrats ,you have successfully installed TWRP recovery on your Motorola Motoe
The process of flashing supersu package is very simple and it should be done if and only if you have unlocked bootloader and installed any custom recovery.They will find in this blog only refer them and after doing so proceed as follows.
steps for flashing supersu:
Download latest supersu application for your mobile if your android version is kitkat then click here for supersu if it is lollipop then here
Just install it in your phone internal memory and enable usb debugging and switch off phone get into boot menu and connect to pc
Go to recovery option and you will find this if twrp is sucessfully installed in your mobile
click on install and search for your supersu which was downloaded and kept in internal memory
confirm flash and thats it your mobile is now rooted
reboot system to go into normal mode and check whether your device is rooted are not by installing various rootchecker apps available in playstore
you can find both twrp and supersu flashing in one video.see this the post