[Moto G6 Guides, News, & Discussion] ThisIsRussia:
#Prerequisites:

Stock Rom: https://mirrors.lolinet.com/firmware/moto/ali/official/RETAIL/

TWRP: https://dl.twrp.me/ali/twrp-3.3.0-0-ali.img

Dejello TWRP: https://drive.google.com/open?id=1QWYIcti-wJPPMAc8Ol5pnoO3b8CqtKFn (Unofficial) //Only for custom roms, when you need to install GApps.

Magisk: https://github.com/topjohnwu/Magisk/releases/download/v19.0/Magisk-v19.0.zip

Magisk Manager: https://github.com/topjohnwu/Magisk/releases/download/manager-v7.1.1/MagiskManager-v7.1.1.apk

DM Verity Disabler: https://zackptg5.com/downloads/Disable_Dm-Verity_ForceEncrypt_04.03.19.zip

Unlocked Bootloader: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a

Minimal ADB/Fastboot (Windows only): https://androidfilehost.com/?fid=962187416754459552

Moto USB Drivers (drivers only, no manager): https://motorolausbdriver.com/wp-content/uploads/Motorola_Mobile_Drivers_v6.4.0.zip

Windows hint:

For all what you want to do with your Motorola phone, you need the above provided Minimal ADB/Fastboot environment.

Download and extract it,

Move the files you want to flash into the folder

Open CMD (Windows Key and R - then type cmd) and navigate into the extracted folder.

//It's easier when you type cd into the cmd and drag the folder from your adb/fastboot environment into the cmd window and hit enter.

And that's it. The patched boot image is no longer needed.

Rooting the Moto G6

1. Boot into fastboot mode (Vol - and Power simultaneously) and connect it to your computer

2. Open Terminal (Linux)/CMD (Windows) and go into the folder where your recovery image lies.

3. Type "fastboot flash recovery recovery.img" and use the volume keys on your phone to select "recovery mode", when finished.

4. If it asks for a password hit cancel, go to wipe, data wipe and confirm it with yes. Then reboot again into recovery.

5. Repeat the wiping and reboot another time into recovery.

6. Connect your phone to your Computer while in recovery and copy magisk and dm-verity disabler to your phone.

7. Go to Install and flash dm-verity disabler first, then magisk.

Thats it. You're rooted.

Update/Go back to Stock.

//Download the stock rom you want to use and extract it to your Desktop.

//Latest ROM (Android 9) is ALI_RETAIL_9.0_PPS29.55-24_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

1. Go into recovery mode (twrp), choose wipe - wipe data and confirm with yes.

2. Back to the wipe main screen, advanced wipe and hit everything.

3. Wipe it two times.

4. Boot into download mode and connect your phone to your computer.

5. Open Terminal or CMD in the folder of your stock firmware and hit the following commands (hint: it's easier to use a bash/batch file):

fastboot erase userdata
fastboot erase cache
fastboot erase modemst1
fastboot erase modemst2
fastboot erase carrier
fastboot erase DDR
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash oem oem.img
fastboot flash logo logo.bin
fastboot flash dsp adspso.bin
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash vendor vendor.img_sparsechunk.0
fastboot flash vendor vendor.img_sparsechunk.1
fastboot erase carrier
fastboot erase userdata
fastboot erase DDR
fastboot erase cache
fastboot reboot

Wait until it finished, disconnect your phone, wait and set it up.

That's it.

Simple and easy.