[Moto G4 Plus Guides, News, & Discussion] echo92:
I've uploaded the stock kernels from both the NPJ25.93-14 and NPJS25.93-14.4 stock ROM fastboot builds here https://drive.google.com/drive/folders/0B-GUyOfb8OgzR1VrQ1NHWDVmWE0 The file is called 'Moto G4 Nougat boot.zip' - about 21 MB.

It's a compressed zip file, expand using your favourite zip utility. You will find 2 folders, each with the corresponding kernel from each build. Checksums and size info for each of the boot.img files contained in each folder is as follows (and crosschecked with the xml file in the fastboot ROM so verifying the signatures)

NPJ25.93-14 (Dec 2016) md5 checksum: 3882eab298704edde9218ba2ff1cd4cf Size: 16 MB

NPJS25.93-14.4 (March 2017) md5 checksum:87df4cd0ca673353b86493adec8e1ff4 Size: 16 MB.

Copy the desired boot.img (containing the stock kernel) to a folder of your choosing on your device or your adb terminal folder on your computer. Ensure you've copied the correct one for your device's firmware! Usual disclaimer applies - back up as necessary, and these files are from the fastboot ROM files here on XDA (and I've successfully flashed the Dec 2016 one several times), so they should work, but I cannot guarantee that. With flashing anything, be prepared to wipe your Dalvik/cache/data or perform a full stock flash.

Oh, and ensure you've unrooted before you flash a stock kernel - I think you may risk a bootloop if you don't remove root (and may require a flash of the stock ROM to repair). Also, don't flash these kernels on custom ROMs...

If you've downloaded the file to your device (e.g. Download folder):

Reboot your device to TWRP.

Backup your existing kernel (as listed below)

Choose 'Install' from the main menu

Select 'Install image...' on the next menu.

Navigate to the folder where your boot.img is (e.g. Downloads) and tap on the boot.img

Specify your image as boot.

Wait for flash.

Wipe cache/Dalvik and reboot.

Any issues, reboot to TWRP and re-flash your backup or ElementalX.

If you're choosing to do this through the adb terminal:

Copy the desired boot.img to your adb folder

Connect your device to your computer. Check that USB debugging is on (should be if you've flashed TWRP and ElementalX)

Reboot your device to the bootloader menu.

Within the adb client, check your device is communicating with your computer with 'fastboot devices' (without quotes) - should report back your serial number of your device.

If it's communicating, type 'fastboot flash boot boot.img' to flash the boot image to your device.

Reboot.

You do not need root to flash a kernel, nor do you need root to back up your stock kernel.

In TWRP:

At the main menu, select Backup

In the next screen, select just the 'Boot' partition (containing your kernel).

Rename this backup to what you desire.

Backup.

You now have a backup of your kernel, which is flashable in TWRP. Bear in mind, depending on what's been flashed before the backup, may have root or other software in the kernel/ramdisk partition. If you're switching custom kernels (e.g. from ElementalX to another custom kernel), it's likely better to flash a fresh copy of the stock kernel before switching. You can then take a backup of this stock kernel (provided it boots properly) to use as a stock backup.