[Moto G6 Plus Guides, News, & Discussion] Xplorer4x4:
THIS GUIDE IS FOR THE MOTO G6 PLUS ONLY

3: Root (aka Magisk)

What is Root? The easiest way to explain it is that root gives you elevated permissions allowing you to modify system files that are not possible to be modified with out elevated permissions. This process requires you to use a PC and assumes you are running the stock firmware.

READ FIRST

Before we proceed you need to download some files on your PC.

*ADB and Fastboot Installer for Windows - (Download) - When prompted to install a driver type the number 0 and hit enter. This will install the latest version of adb and fastboot where it is system-wide. This eliminates the need for adb.exe or fastboot.exe to be in the same folder as the files you will be working with. NOTE: Windows will flag this as a virus! The installer is open source and made by a Moderator here on XDA. It is a False Positive. You can view a VirusTotal report (https://www.virustotal.com/en/file/25dc5dca2494d1b1d93832b37ba9852b4f076bba86cf5029b4c944a28a1a01a1/analysis/]HERE[/url]). 26 out of 67 virus scanners report it as a virus. If your Anti-Virus is one of the ones that flag it as a virus, I would suggest you explore other Anti-Virus software, but that’s not what this guide is about.

* TWRP - (Download) - This is a modified Recovery Software allowing you to flash files that will allow you to fipe your device and install custom roms and other various things. Thanks to XDA Member [MENTION=1532389]khod[/MENTION]e_Erfan who has ported it to our device.

*Magisk - (Download) - Download the Stable version here. While not required, I do suggest you download the Latest Uninstaller and Latest Magisk Manager as well.

With ADB, Fastboot, and TWRP and Magisk on your pc get ready to root your device!

On your Phone

3A: Enable developer settings by going to Settings->System->About->Tap "Build Number" 5-7 times. You will see notification at the bottom of the screen stating that Developer Options have been Enabled.

3B: Tap the back button to go back to the System screen.

3C: Now tap on Developer Options.

3D: Find the setting that says "Android Debugging" and tap on it to enable adb to work on your device. You should get a prompt on your phone about a host key. Accept it.

On your PC:

3E: Place the file Magisk-v*.zip (*=version number, so for example version 17.1 would be Magisk-v17.1.zip) on your SD Card.

3F: Use Windows Explorer to navigate to the place you downloaded the file twrp-3.2.1-37-evert.img

3G: Hold the Shift Key on your Keyboard. While holding Shift, Right Click in the window(not on the file). Depending on your windows version you should see either "Open PowerShell Window here" or "Open Command Window here." Select which ever one applies.

3H: Now type, or copy and paste, the following commands one at a time and press enter to execute it:

adb reboot bootloader

fastboot boot twrp-3.2.3-42-evert.img

3I: In TWRP, first tap Backup -> Select Storage -> Micro SD Card - > OK

3J: You will see a section that says "Select Partitions to Backup." Make sure to select all of these boxes.

3K: At the bottom of the screen Swipe the Blue Button where it says Swipe to Backup.

3L: When this is done, tap the Home button.

3M: Tap "Install."

3N: Now tap on "Select Storage"

3O: Tap Micro SD Card

3P: Tap OK

3Q: Navigate to the location of the Magisk.zip file you placed on you sd card earlier and tap on it.

3R: At the bottom of the screen use the "Swipe to confirm Flash" function to flash Magisk.

3S: When it's done tap the button that says Reboot System at the bottom right corner of the screen.

If your device reboots to android, then you have done everything right! If not here are some possible fixes. Make sure the phone is in the bootloader and connected to the PC.

Troubleshooting:

If you are stuck in a bootloop something went wrong but we can fix it pretty easy. Magisk modifies your boot partition when it is flashed. Flashing the boot.img file from the stock firmware should fix this:

boot.img: (Download)

MD5: bd305bc3bc8c591ee7ebba8f5026bb06

Use the command:

fastboot flash boot boot.img

If you you have an error such as "Can't Load Android System" or "Startup Failed" your partition table is probably corrupt. You can try fixing it by flashing gpt.bin from the stock firmware.

gpt.bin: (Download)

MD5: 631af2ecab87fe627ab00e61b07ac964

fastboot flash gpt.bin