Motorola’s Moto G lineup is arguably the best budget smartphone series. Starting with the legendry Moto G, motorola has come all the way to Moto G5 Plus, the perfect budget smartphone. But what’s the use of a android phone with no superuser access? In this tutorial, we’ll show you how to root moto g5 plus, unlock bootloader and install twrp recovery.

  • What are the benefits of unlocking the Bootloader?
  • It helps to change the Boot Options and Flash different Recoveries.
  • Why do we need Recoveries like TWRP?
  • They help us to gain root access on our phone, install custom ROM’s and Xposed Framework.
  • Why do we need root access ?
  • The root access overy your phone gives you the full authority over your phone and it helps to remove bloatware applications and helps in full device customisation.

This detailed noob guide consists of three sections:

1.How to unlock Moto G5 Plus’ bootloader.
2.How to flash TWRP recovery on Moto G5 Plus
3.How to root Moto G5/G5 Plus by flashing Magisk.

Prerequisites

Before we go into the process, lets make some necessary settings on your Moto G5 Plus.

  1. Scroll down in Settings and go to About Phone.
  2. Scroll down and tap build number 7-10 times until you see a popup stating ‘You are now a developer’.
  3. Press back and now a new section called ‘Developer Options’ will appear in settings. Tap on it and turn on the toggle at the top.
  4. Now scroll down and turn on OEM unlocking and USB Debugging.
  5. Now make a backup of all your data as unlocking the bootloader will wipe all the data present in the internal memory.
  6. Make sure you have 70-80% battery to prevent unexpected failures.
  7. Download and install the Motorola driver  from the link given below.
  8. Unzip the ADB fast boot tool.zip (link provided below).
Motorola Driver ADB Fastboot Tool

Unlocking The Bootloader

  1. Connect the Moto G5 Plus to PC and open the unzipped ADB Fast boot tool folder.
  2. Open the Cmd in the folder by “Hold Shift+ Right click in empty space in the folder”.
  3. Now type the command(without the double quotes) in the Cmd window and hit enter.
    “adb reboot bootloader”
    This command will turn the phone into fastboot mode.
  4. Now type the following command (without the double quotes) in the Cmd window and hit enter.
    “fastboot oem get_unlock_data”
    This command will fetch the unlock data.
  5. Now copy the unlock_data from the Cmd window .
  6. Now format the unlock_data from here.
  7. Paste the copied unlock_data to unlock data scrub box and click Format my data.
  8. Now copy the formatted string and go to Motorola unlock page from here.
  9. Click on next and then Sign In to your Motorola ID.Scroll Down and insert the copied string in the box as shown below and click on Can my device be unlocked?
  10. Click on I Agree Button a get Unlock Code will appear, click on it. The unlock code will be shown on the screen or will be sent on the registered e-mail ID.
  11. Now copy the unlock_code and type the following command (without the double quotes) in the Cmd window.
    “fastboot oem unlock *****”
  12. Replace the ***** with the copied unlock_code.
  13. A warning screen will appear, just type the same command and hit enter.
  14. Press the volume up key in your phone to confirm the unlock. This will erase all the data in the Moto G5 Plus.

Done, Finally Unlocked!!

Flashing The TWRP Recovery

  1. Download the TWRP recovery img file from the link given Below.
    TWRP Recovery Image File
  2. Rename TWRP recovery image file “twrp-3.1.0-0-****.img” to “recovery.img” and copy it to ADB fast boot tool folder.
  3. Open Cmd window by pressing “Shift+Right Click in empty space”.
  4. Now type this command (without double quotes) in the Cmd window and hit enter.
    “adb reboot bootloader”
    This command will reboot the Moto into fastboot mode.
  5. Now type this command(without double quotes) in the Cmd window and hit enter.
    “fastboot flash recovery recovery.img”
    This command will install TWRP recovery on the Moto G5 Plus.
  6. Now type this command(without double quotes) in the Cmd window and hit enter.
    “fastboot reboot”
    This command will reboot the device.

Succesfully flashed TWRP Recovery!!

Rooting The Moto G5 Plus

  1. Download the “no-verity-opt-encrypt-5.1.zip” and “Magisk-v11.6.zip” (links given below) and copy them to the phone memory.
    No-Verift-Opt-encrypt-5.1.zip
    MagisK-v-11.6.zip
  2. Turn off the Moto G5 Plus and turn on recovery mode by pressing Volume Up+power.
  3. In Bootloader screen select recovery.Don’t allow “Swipe to Allow Modifications” cancel it in TWRP recovery.
  4. Go to WIPE, then do Factory Reset by selecting “Swipe to Factory Reset“.
  5. Go Back to TWRP Main Menu and then go to reboot then go to recovery to reboot into recovery mode.(Do not install TWRP app)
  6. Now allow modifications by selecting “Swipe to allow modifications”.
  7. Go to Install and then search for “no-verity-opt-encrypt-5.1.zip”.
  8. Swipe to install it.
  9. Now go back to TWRP Main Menu then go to Reboot into Normal Mode.(Do not Install TWRP app)
  10. Wait for Moto G5 Plus to boot into normal mode.
  11. Turn off the Moto G5 Plus and turn it on into recovery mode by  pressing “Volume Up+Power Button”.In Bootloader screen select Recovery.
  12. Now allow modifications by “Swipe to Allow Modifications”.
  13. Now go to Install  and search for “Magisk-v11.6.zip”. Swipe to install it.
  14. Now go back to TWRP Main Menu and then go to Reboot into Normal Mode.(Do not install TWRP app)

Wait for the Moto G5 Plus to boot and then open Magisk app and update it.

Now you have successfully rooted the Moto G5 Plus.