[Moto Z Play ROMs, Kernels, Recoveries, & Other Dev] tomparr:
Motorola Stock Kernel with f2fs patched and kcal added

Disclaimer: Your warranty is now void, use at your own risk. YOU are choosing to make these modifications and I am not responsible for any damages these changes might do to your device or sanity.

Why this kernel exists:

As many of you know, there is a bug with the f2fs filesystem in the stock kernel which makes it nearly impossible to use systemless modifications (SuperSU, Magisk) on the Moto Z Play. The flaw and its solution are described here.

I started this project for myself to be able to use systemless modifications again, but I hope some of you will find it useful as well. The kernel for Android 6.0 is based on Motorolas source code release (MPN24.104-44) from here and includes security fixes up to december 2016. The Android 7.0 kernel is based on release MMI-NPN25.137-15 with patch date 2017-01. It has been developed and tested with the European model and ROM, but should work on other variants as well as all retail models share the same boot image.

As of patch level 2017-03, Motorola included the f2fs fix in the official kernel. However, I will continue to work on this kernel for those of you who need the verifiedbootstate patch and kcal.

Warning

This kernel is not meant for 7.1.1 and will break your camera and probably more! Once Motorola release the source code you will find an update here.

Features:

f2fs patched to allow systemless modifications to work

kcal color control

Thats all for now, let me know if you need something else ...

Instructions:

If you previously rooted your phone with the chinese TWRP in system mode I would advise to un-root the phone from the SuperSU app and restore a factory image. However, deleting userdata is not necessary except for the SuperSU app. It might not recognize the new systemless mode otherwise.

Optional, unroot via SuperSU app

Reboot to boatloader / fastboot mode

Flash modified TWRP image Flash [MENTION=4480917]Alberto97[/MENTION] latest TWRP from here

Reboot directly into recovery

Optional, remove forced encryption (see below)

Check with TWRP file manager that /data/.supersu is not present, otherwise delete the file.

Flash kernel zip

Flash SuperSU

Reboot the device

Remove forced encryption (optional):

Download attached RemoveForceEnc.zip

Flash file from TWRP

Wipe userdata (in TWRP or use 'fastboot erase userdata' in fastboot mode)

Credits:

Thanks to [MENTION=4480917]Alberto97[/MENTION] for his work on addison.

Thanks to [MENTION=6298645]erfanoabdi[/MENTION] and [MENTION=970354]ryzion[/MENTION] for the RemoveForceEnc.zip found on the Moto Z forum (in this post).

[MENTION=1718085]fortunz[/MENTION] for testing kcal functionality

Download:

03/22/2017 - Android 7.0.0 Kernel v03: Mega

03/23/2017 - Android 6.0.1 Kernel v03: Mega

Archive:

Modified TWRP: androidfilehost No longer needed, flash latest TWRP from [MENTION=4480917]Alberto97[/MENTION]

02/18/2017 - Android 7.0.0 Kernel v02: androidfilehost, Mirror: Mega

02/02/2017 - Android 6.0.1 Kernel v02-test: androidfilehost

01/28/2017 - Android 6.0.1 Kernel v01: androidfilehost

Sources: Github

Changelog:

03/22/2017 | 6.0.1 / 7.0.0 | v3

Added kcal color control. Patch

02/18/2017 | 7.0.0 | v2

Remove verifiedbootstate flag to pass SafetyNet checks. Patch

02/17/2017 | 7.0.0 | v1

Initial release for 7.0

02/02/2017 | 6.0.1 | v2-test

Test build to pass safetynet checks. Removes verifiedbootstate flag. See this patch

01/28/2017 | 6.0.1 | v1

Initial release based in MPN24.104-44 and security bulletins up to december 2016