Since their separation from Google, most people will agree that Motorola has somehow lost its way. Although he seems to have found his financial solution, the company's devices no longer excite amateurs. Whatever the case may be, the Moto G5sS, a budget-limited phone launched in 2020, finally has an official version of TWRP. So you can now install the official TWRP recovery on the Moto G5. Obviously, we can also root Moto G5.
Warning
If you root your Moto G5, it will void your warranty. In addition, flashing a custom recovery and using it to flash third-party mods can be risky. You could end up breaking your device. Even if you correctly follow all the steps mentioned below, there is always a chance that things will go south for you. Make sure you know what you are doing and do everything at your own risk. DroidViews or whoever can not be held responsible in such circumstances.
The rooting process does not require you to format your device or format it automatically. However, make sure you have backed up everything important, including files and folders stored on your device's internal storage. Creating a backup is never a bad idea. If you have not unlocked the boot loader yet, your device will be erased, including the internal memory, when you unlock it.
requirements
Before you can root Moto G5, make sure that you have completed the following steps.
- A Motorola Moto G5 with an unlocked boot loader.
- You will need a Windows, Mac or Linux computer with the tools of the Android SDK platform. We have a specific and detailed guide explaining how to do exactly that for the three platforms, linked below.
- Download Android SDK platform tools for Windows, Mac, and Linux
- Extract the downloaded zip file anywhere on your PC.
- The extracted platform-tools folder contains all the necessary tools to run ADB and Fastboot.
- Since you need to connect your phone to your PC with a USB cable, make sure the cable is not loose.
- Activate USB debugging and OEM open on your device, found in Developer options.
- Go to settings > About phone.
- Press on Construction number 7 times.
- You will see a message of toast saying, "You are a developer".
- Go back to Settings now, and you'll find a new option called "Developer Options", select it.
- Scroll through the list and discover OEM unlocking and USB debugging and enable it. OEM unlocking should already be enabled or dimmed if you have unlocked your boot loader.
- Make sure that there is at least 50% battery left on your Moto G5 to prevent any accidental stoppages.
- Windows users will also need to install Motorola USB drivers.
Download Moto G5S TWRP Image and Magisk
Install TWRP on Moto G5S
- Launch a command prompt or terminal in the platform-tools folder.
- On Windows, with the platform tools the folder is open, type cmd in the address bar and press Enter to launch a command prompt window in the folder.
- Linux and Mac users can simply right-click in the folder and select Open in the terminal launch a terminal and use adb.
- Once the command prompt or terminal is open, connect your Moto G7 Plus to your PC.
- On your phone, you will be asked to grant USB debug permission to the PC.
- If it does not show up yet, enter the following command in the command / terminal prompt to force it.
adb devices
- Once granted, the serial number of your device will be returned as shown below.
- Now, use the following command to start your phone in quick start mode.
adb reboot fastboot
- Once in quick start mode, install TWRP on your Moto G5 with this command.
fastboot flash recovery /path/to/twrp-3.3.1-0-montana.img
Replace /road of/ with the location path of the image file. This step can be avoided if you move the TWRP image to the ADB folder. This will shorten the order by:
fastboot flash recovery twrp-3.3.1-0-montana.img
- Finally, when the recovery has been flashed, reboot your device.
fastboot reboot
You can not just flash a custom recovery image such as TWRP on your Android device. There are many wonderful things you can do using the ADB and fastboot commands.
Root Moto G5s
After installing TWRP Recovery on your phone, let's see how to root Moto G5. Just follow the steps below.
- Connect your device back to the PC and use the ADB command given below to boot into the newly installed TWRP recovery.
adb reboot recovery
- Once TWRP recovery is complete, it is advisable to start with a full NANDroid backup of your device, in case you want to restore your device.
- To do this, go to safeguard and select all partitions. Swipe down to start the backup process.
- When you have a backup or have decided to skip it, select Install in the TWRP main menu.
- Locate and select the downloaded file. Magisk-v19.3.zip file and select it.
- Swipe down to flash the zip.
- When it's done, you'll see a Restart the system button at the bottom, tap it and your device will restart.
When your device turns on, you will have root access to your Moto G5. You can find Magisk Manager among all your other applications in the application drawer. You can use it to grant or deny root access to other applications, as well as to many other things using Magisk modules.