In this guide, I will show you how to unlock the bootloader, install TWRP recovery, and subsequently root the Moto G7 Power using Magisk. These instructions will work on any Moto G7 Power running Android 10 and Android 9 Pie.
While a decent performer at its price, the Motorola Moto G7 Power isn’t best known for its software. The manufacturer is long known for irregular and delayed support when it comes to software updates. Also, the stock firmware that comes pre-installed on the said phone isn’t a stronghold when it comes to customization. It is all but basically stock AOSP software with Motorola’s proprietary apps sitting atop.
And that’s where things like custom ROMs and rooting could help. If you’re not a fan of the stock software, you have a variety of custom ROMs to try that offer a lot of features, customization options, and also help you get the latest Android security patches well before Motorola rolls them out.
On the other hand, if you do wish to stick with the stock software, you could root your Moto G7 Power and have the benefits of applying modifications to the software systemless-ly with Magisk. Magisk can further help you hide root from certain applications that might stop working if root access is detected, along with other features.
But to flash ROMs or Magisk to gain root access, you must install a custom recovery such as TWRP on your Moto G7 Power. The good news is, TWRP v3.4 is officially available for the Moto G7 Power, courtesy of developer Andrew Hexen. It supports both Android 10 and Android 9 Pie. If you’re into development, you can view the code at the official Github repo.
Before everything, you must first unlock your Motorola device’s bootloader, which is quite easy. The instructions below will take you through the complete process in a comprehensive manner.
- Note: If you happen to own the regular Moto G7 or Moto G7 Plus, then refer to this tutorial instead.
Table of Contents
Make sure that you fulfill all the requirements stated below before you start following the instructions.
1. Take a Backup First!
All the data stored on your phone will be erased while performing the instructions. So, make sure that you take a complete backup of all your important files and data before you begin. You could also refer to our guide for this purpose.
Installing TWRP and rooting will not wipe any data, however, we still strongly recommend taking a backup in case anything goes wrong.
2. Install Android SDK platform-tools
Download the latest version of the Android platform-tools for your computer:
Once downloaded, extract the contents of the ZIP package to get the “platform-tools” folder. This folder should contain the binary files of the required tools, such as ADB and Fastboot.
For easier access and for our demonstration as well, we suggest you move the “platform-tools” folder to the root of the C:\ drive if you’re using a Windows computer. If you’re using a macOS/Linux PC, move the “platform-tools” inside the “Documents” directory (Refer to the figure below).
3. Launch command-line inside the ‘platform-tools’ folder
Once you have the Platform-tools installed, you will need to launch the command-line window inside the ‘platform-tools’ folder. To do this:
- On Windows: Go to C:\platform-tools. Hold the SHIFT key on the keyboard and right-click on any empty space inside the folder. Then select the “Open PowerShell window here” option.
- On Linux/Mac: Launch the Terminal and use the cd command to change its directory to the “platform-tools” folder. For example: If you moved the folder inside the “Documents” directory, then the command should be:
Tip: If you’re experienced enough, you could also add these tools to your computer’s PATH.
4. Install USB Drivers on the computer
If you’re going to operate on a Windows computer, make sure that you download and install the latest Motorola USB drivers as well. Mac/Linux users should not need any additional drivers at all.
5. Charge your phone
Charge your Moto G7 Power to a sufficient battery level so that it doesn’t suddenly power off on you while performing the instructions. At least 50-60% of the battery level is recommended.
Below, you will find the links to download all the files you’ll require while following the instructions.
- TWRP for Moto G7 Power (codename: ocean)
- Latest Magisk installer ZIP package (Magisk-v21.2.zip): Github repository
- Forced-encryption Disabler: Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip
Important Note: The bootloader on the regular Moto G7 (river) only comes installed to the active slot. So, DO NOT SWITCH SLOTS until you flash the “copy-partitions-AB.zip” file. This file will automatically install a copy of the bootloader from the active slot (say “a”) to the inactive slot (say “b”).
The instructions for the same have been combined with the rooting instructions (Step #3) of this tutorial.
While we will try our best to keep the download links up-to-date with the latest TWRP builds, we suggest that you always make sure that you check for the latest version on the official TWRP releases page.
To help you get a better understanding of the whole process, we have split the instructions into three major steps.
Step 1: Unlock Moto G7 Power Bootloader
Like most other Android devices, the bootloader on your Moto G7 Power is locked and will prevent flashing the device partitions. So, the first step is to unlock the bootloader on your Moto G7 Power using the official method provided by Motorola itself. To do this, follow the instructions as follows:
- Power off your phone first. Then hold the Volume Down and Power keys together to enter Bootloader Mode.
- Once in Bootloader Mode, connect your Moto G7 Power to the computer using the USB cable.
- Enter the following command in the command-line to retrieve your phone’s unique unlock data:
fastboot oem get_unlock_data
- The command should return a string in a similar format as shown below:
- On Windows:
(bootloader) 0A40040192024205#4C4D3556313230 (bootloader) 30373731363031303332323239#BD00 (bootloader) 8A672BA4746C2CE02328A2AC0C39F95 (bootloader) 1A3E5#1F53280002000000000000000 (bootloader) 0000000
- On macOS/Linux:
INFO0A40040192024205#4C4D3556313230 INFO30373731363031303332323239#BD00 INFO8A672BA4746C2CE02328A2AC0C39F95 INFO1A3E5#1F53280002000000000000000 INFO0000000
- On Windows:
- Copy the 5 lines of the string shown in the output to a text editor on your computer. Then remove all line breaks and whitespaces to convert it into a one-line string, like so:
- Now that you have the required unlock data, visit the official Motorola bootloader unlocking portal in your PC’s browser. It’s worth going through the information published on the page. Once you have gone through it, scroll down to the very bottom and click “NEXT”.
- The portal will now prompt you to login with your Motorola account. Once you have logged in, it should show you the next step as “GET YOUR DEVICE ID & UNLOCK CODE”.
- Scroll through the page and find pointer #6 where it asks you to enter the device unlock key. Copy your phone’s unlock key (retrieved in pointer #5 above), paste it in the input field, and click the blue-colored “Can my device be unlocked?” button.
- After the key is validated, scroll down further through the page and select “I Agree” to agree to Motorola’s terms. Finally, click the blue “REQUEST UNLOCK KEY”.
- You should now receive your phone’s unique bootloader unlock key in your registered email address.
- Now, enter the following command to finally unlock the bootloader of your Moto G7 Power:
fastboot oem unlock <bootloader-unlock-key>
- You will have to replace “<bootloader-unlock-key>” with the unique 20-character unlock key you received in your email.
That’s it! Your phone’s bootloader should now be fully unlocked. You should now boot the phone and set it up.
Step 2: Install TWRP Recovery
With the bootloader now unlocked, the second step is to install TWRP recovery on your Moto G7 Power.
Since the phone supports the new A/B partition scheme, installing TWRP on it is a two-step process. You will first need to temporarily boot the recovery image using Fastboot and then install the recovery image using the “Install recovery ramdisk” option.
- First, download the TWRP recovery image for your Moto G7 Power.
- Copy the recovery image and installer ZIP files inside the ‘platform-tools’ folder on your computer.
- Power off your phone and boot it into Bootloader Mode by holding the Volume Down and Power keys together.
- Connect the phone to the PC using the USB cable while it is in Bootloader Mode.
- Use the following command to format the /data partition. This is mandatory otherwise TWRP will not be able to decrypt the internal storage.
- Now, enter the command below to temporarily boot the TWRP recovery image on the Moto G7 Power:
fastboot boot twrp-3.5.0_9-0-ocean.img
- Your phone should now reboot and enter the TWRP recovery mode.
- Transfer the TWRP installer zip to your phone using the following ADB push command:
adb push twrp-installer-3.5.0_9-0-ocean.zip /sdcard
- Once the file has been copied, disconnect the phone and go back to the TWRP main screen.
- Press the “Install” button and select the TWRP installer ZIP file (twrp-installer-3.5.0_9-0-ocean.zip)
- Finally, swipe the button to flash the installer and permanently install TWRP recovery on your Moto G7 Power.
Step 3: Root Moto G7 Power using Magisk
With TWRP installed, the third and last step is to flash the Magisk installer zip and finally root your Moto G7 Power. Additionally, you will also need to flash the forced-encryption disabler zip package to make sure that
/data partition stays unencrypted.
- First, download the latest Magisk installer and Forced-encryption Disabler ZIP files on your computer.
- Copy both the downloaded files inside the ‘platform-tools’ folder.
- Then connect your phone to the computer using the USB cable.
- Use the following commands to transfer both the files to your phone’s internal storage:
adb push Magisk-v21.2.zip /sdcard adb push Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip /sdcard
- Once the files have been transferred, disconnect the phone from the PC.
- Go to the TWRP main screen and press the “Install” button.
- Navigate to the storage and select the “Magisk-v21.2.zip” file.
- Tap on the “Add more Zips” button and select the “Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip” file to add it to the flashing queue.
- Finally, swipe the button on the bottom of the screen to flash the ZIP files and root your Moto G7 Power.
Once the flashing process finishes, hit the “Reboot System” button.
Your Moto G7 Power should now be rooted using Magisk. To verify, you can launch the Magisk Manager app on your phone and check the installation status. You can also use the app to manage superuser permissions for apps that require root and install Magisk Modules for additional features. With root access, you can further install mods like the EdXposed Framework, Dolby Atmos, and ViPER4Android.
Magisk also gives you the ability to hide root on a per-app basis. This should help you run banking & security apps, along with games like Pokemon Go on your rooted phone. You could also verify the SafetyNet status to see if it passes the CTS Profile and BasicIntegrity checks. It’s worth noting that Google has rolled out hardware-based SafetyNet attestation, so passing SafetyNet could be extremely tricky now.
There you go! By now, you have learned how to unlock the bootloader, install TWRP custom recovery, and simultaneously root the Moto G7 Power using Magisk. If you face any issues while performing the instructions or have any questions regarding the topic, let us know.