[Moto G4 Plus Guides, News, & Discussion] echo92:
Whilst rooting may have the potential to brick your device, the majority of cases I've noted involve using really old rooting guides (i.e. from 2016-early 2017), when those rooting steps were applicable to Marshmallow, but no longer are workable for Nougat. As the initial post of this rooting thread shows, you need to flash a custom kernel to replace your stock kernel before you root. Provided you do that, rooting should be straightforward. For reference, I'm rooted on my XT1642 (retgb) running NPJS25.93-14-18 with ElementalX and magisk.

You don't need to provide your IMEI - that's of little use to us. Your software version would be useful though. I'm honestly not aware of any call recording apps that work on unrooted devices - which apps have you tried?

If you're still intent on rooting, then the first post on this thread would be a useful starting point. To expand on some of the steps:

1)Unlocking bootloader. Be warned this will erase your data as a security measure, including your internal storage. Back up as necessary.

1a)Setting up for unlocking your bootloader - allowing OEM unlocking. On your device, go to Settings>About Phone. Scroll to the bottom, and tap the build number 7 times. You should see a message mentioning you're now a developer. Head back to Settings and near the bottom you should see a new option - Developer Options. Tap Developer Options and find OEM unlocking. Toggle that on.

1b)Download and install the minimal ADB tools https://xdaforums.com/showthread.php?t=2317790 and the Motorola drivers: https://support.motorola.com/us/en/drivers I would also suggest disabling driver signature enforcement if running Windows 10 or 8.1 https://www.howtogeek.com/167723/ho...8.1-so-that-you-can-install-unsigned-drivers/

1c)Connect your device to your computer via the original USB cable - your computer should recognise and load the drivers, so your device is recognised. Follow the Motorola unlocking page guide as mentioned in the first post https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a You do not have to install the Android SDK as the minimal ADB tools in 1b) should suffice. Also, where the Motorola guide states 'On your desktop, open a command prompt or terminal, and go to the directory where you installed the Android SDK tools (or make sure fastboot is in your $PATH)' you can simply open your minimal ADB terminal to achieve the same purpose (the minimal ADB should be present in your Start menu).

1d)Once you have the unlock key, the email should contain the instructions to use the unlock key. Be aware that the unlock command (with your key) will ask you to repeat the unlock command (with your key) to confirm that you want to unlock your bootloader. Your device should then reboot with a bootloader unlocked warning. That screen is normal and there are logo images to cover that warning screen up (e.g. https://xdaforums.com/moto-g4-plus/themes/customized-logo-t3451349 )

2)Boot/flash TWRP. Once your device has been set up, you'll want to download TWRP to your computer. There are several versions of TWRP for athene (the codename for the G4/Plus device). The one I'm currently using is shreps' unofficial TWRP v3.1.1, which seems to work well with the stock firmware: https://xdaforums.com/moto-g4-plus/development/recovery-twrp-3-0-2-r3-moto-g4-g4-plus-t3494337 Copy this TWRP image to your ADB folder as you installed in 1b).

2a)Reboot your device to the bootloader (power off your device, then hold the power and volume down key together, then release once booted to the bootloader) and attach your device to your computer.

2b)Open the ADB terminal as before. Verify that the TWRP image is present in your minimal ADB folder. To boot the recovery (if you want to keep your stock recovery) type

fastboot boot <name of TWRP image>

where the <name of TWRP image> is the full file name of the TWRP image including extension. Easiest way to enter the name is to type the first few letters of the TWRP file name (e.g. twr if the file name is in lower case ) then press Tab on your keyboard to auto-complete the full file name. Press Enter to boot to TWRP - this should download TWRP to your device and boot to the custom recovery.

2c)If you want to flash the TWRP to your recovery partition, overwriting your stock recovery, then type in the ADB terminal:

fastboot flash recovery <name of TWRP image>

. Press Enter. You may see a message warning this image is not signed or corrupt - TWRP is not cryptographically signed by Motorola so that's a normal message. You will then want to boot to recovery to fix TWRP to your recovery partition. On your device, tap the volume keys until you see 'Recovery' as a boot option. Press the power key on your device to confirm.

3)Once in TWRP, you could leave your system as read-only, then make a TWRP backup which would be OTA compatible. However, you'd have to 'swipe to allow modifications' for further progress (however subsequent backups may not be OTA compatible).

To back up, tap the Backup option, then leave the partitions selected as they are and swipe to back up. Once completed, deselect all the partitions except the boot partition and label this as your stock clean kernel. Back up your kernel.

4)On your computer, download ElementalX v2.0.1 for stock 7.0 https://xdaforums.com/moto-g4-plus/development/kernel-elementalx-g4-0-01-t3424836 and magisk 16.7 https://xdaforums.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589 Copy these files across to your device which should still be attached to your computer via USB. Once you've copied these files, you can detach your device from your computer.

4a)On your device (which should still be in TWRP), head back to the main menu of TWRP. Tap Install and navigate to where you copied ElementalX to. Select the zip and swipe to install. Follow the installer - up to you if you want to use Sweep2Sleep. I deselect the 'use Fingerprint Sensor as sleep (?)' option too. This should flash ElementalX 2.0.1 to your device.

5)After installation, you should see an option to wipe cache/Dalvik appear at the bottom of the screen. Tap that.

6)Here's where this diverges from the original guide - since the original guide was written, the main developer behind SuperSU has retired, whereas magisk is still under active development. SuperSU is still available if you prefer.

To flash magisk, head back to the Install menu. Select the magisk zip that you transferred to your computer in step 4) and swipe to install.

7)Reboot your device and you should be rooted on stock firmware with a custom kernel, and it should be a stable root.

If you have instability issues, then you could revert back to the backup you made in 3) or flash the stock ROM. If you have NPJS25.93-14-18, then a copy of the stock ROM is here: https://xdaforums.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 For a clean, OTA friendly device, provided you had NPJS25.93-14-18 already, you could use the following fastboot commands which may allow you to keep your data and should not lock your bootloader:

fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
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 modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot reboot