How to root Moto G5 and install custom recovery (TWRP)


Motorola’s Moto G5, a mid range flagship from moto, is a budget smartphone available at a price range of Rs.11091/-. It comes with 5-inch display that makes it light and easy to grip along with a detachable battery and no hybrid slot, internal storage of 16GB and 3GB of RAM.

A decent camera performance with 13MP rear camera and 5MP front facing camera. It is packed with 1.4 ghz octa-core qualcomm snapdragon 430 chipset along with stock android based on Nougat.

The process of unlocking and flashing is easiest on Moto smartphones as all the steps are available on its official website.


(NOTE: Do not update this application after booting up your device. This application is not available on play store, so download it from here instead) 

New Magisk Download

  • Make sure that you Backup all your important files.

How to Unlock Bootloader

In Order to Root your Moto G5 you need to unlock the bootloader and then install a Custom Recovery.

Steps to Unlock the Boot-loader:

  1. Switch off your Moto G5, Press Volume Down and Power button to boot into Fastboot mode, now connect your device to your laptop or PC.
  2. Open Motorola’s official Website, Sign in or Sign up.
  3. Download the ADB exe file and open the ADB folder, now holding the shift key right click anywhere in the ADB folder, Command Prompt will open up.
  4. Go to Motorola’s official website, hit NEXT at the bottom of the page.
  5. Under NEXT GET YOUR DEVICE ID you will find a command as :

fastboot oem get_unlock_data

6. Paste this in your command prompt and hit enter, a lot of numbers will be displayed on CMD now you have to copy all of them and paste them on the website under this:

Check if your device can be unlocked by pasting this string in the field below, and clicking “Can my device be unlocked?

(NOTE: remove boot-loader, Brackets and extra spaces)

7. Click on “Can my device be unlocked. If your device is unlockable, a “REQUEST UNLOCK KEY” button will appear at the bottom of that page.

8. The same key will be sent to you on your email address. (You may receive the key at the same time or may take some time).

9. After you receive the key, go to the website. You will find UNLOCK YOUR DEVICE under which all the commands to be used are mentioned.

10. Open the command prompt and write “fastboot devices”to check whether your device is connected or not, then type “Fastboot OEM unlock KEY (KEY: the one you would have received), Hit enter.

(NOTE: A warning would be displayed and you have to re-run the command to ensure the unlocking process, and to do so press the up arrow key and hit enter) 

  • If you can see “Bootloader is Unlocked” on your command prompt then you are successful.

How to install custom recovery or TWRP ?

Steps To install Custom Recovery:

  1. Download the Custom Recovery image from the above mentioned link.
  2. Now, assuming that your boot loader is unlocked and you have downloaded the ADB folder, paste the recovery image to that folder.
  3. Hold Shift and right click in the ABD folder, Select “Open Command Window Here”, Command Prompt opens up.
  4. To check whether your device is connected or not type a command “Fastboot Devices” your device should show up.
  5. Now type “Fastboot Flash Recovery Recovery-name .img” Copy the name of the recovery image that you pasted in the ADB folder with .img extension, and hit enter.
  6. If “OKAY” is displayed in your command prompt, recovery is flashed.
  7. Now, on your Moto G5 hit volume down button until you find “Recovery Mode”

Once found, hit the power button, now your device boots up into “TEAMWIN Recovery”.

  • There is a chance that password is asked when you boot up into the recovery, that is because your device is encrypted and to decrypt it follow these steps:
  1. Hit CANCEL.
  2. Slide the Arrow, avoiding the warning.
  3. Go to WIPE, select FORMAT-DATA.
  4. Type yes, (make sure you take the backup before typing this)
  5. Now go back and select REBOOT then RECOVERY.
  •  Now Custom Recovery is successfully Installed.

How to Root Moto G5 ?

  • Download the two files mentioned above i.e. (no-verity-opt-encrypt-5.1) & (Magisk-v11.6), Now paste them in your SD-Card or Internal Storage.

(NOTE: make sure you do not extract these files.)

  • Go to Recovery and follow these steps:
  1. Install > Select Storage(where you have kept those files) > select the file > Add more zips > select the second file
  2. Hit Install.
  • Now boot your Moto G5 and set it up accordingly.
  • Install “Root checker” application from Play Store, and provide the SU(Super User) permissions, Now you can see that your device is Rooted Successfully.

Follow the steps and let us know whether you were able to root your device successfully or not.

Queries are welcome, you can ask your questions via the comment form below.


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.