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.
The process of unlocking and flashing is easiest on Moto smartphones as all the steps are available on its official website.
- Download the ADB exe file and install it. You will find the ADB Folder in C-Drive>Program-files(x86)>Minimal ADB and Fastboot folder:
- Motorola’s Official Website: Unlock your Bootloader
- Download TWRP Recovery
- Download no-verity-opt-encrypt-5.1
- Download Magisk-v11.6:
(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)
- 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:
- 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.
- Open Motorola’s official Website, Sign in or Sign up.
- 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.
- Go to Motorola’s official website, hit NEXT at the bottom of the page.
- 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:
- Download the Custom Recovery image from the above mentioned link.
- Now, assuming that your boot loader is unlocked and you have downloaded the ADB folder, paste the recovery image to that folder.
- Hold Shift and right click in the ABD folder, Select “Open Command Window Here”, Command Prompt opens up.
- To check whether your device is connected or not type a command “Fastboot Devices” your device should show up.
- 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.
- If “OKAY” is displayed in your command prompt, recovery is flashed.
- 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:
- Hit CANCEL.
- Slide the Arrow, avoiding the warning.
- Go to WIPE, select FORMAT-DATA.
- Type yes, (make sure you take the backup before typing this)
- 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:
- Install > Select Storage(where you have kept those files) > select the file > Add more zips > select the second file
- 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.