[Moto G Android Development] Do N0T Disturb:
Thank you for pointing me on the right direction, I've made some progress but I'm stuck again.

I've tried 2 paths, both with TWRP 3.0.2.

With Identity Crisis 6 (Single-SIM) v1.5c 'Pure':

Installed the ROM

Installed the Magisk v9 zip (can't install v10.2, as it fails. logs from recovery attached)

Installed the phh-superuser-topjohnwu-r2.zip

I have root access, Magisk Manager wants to update to the latest version. I can activate Magisk Hide, but I can't pass the SafeNet verification (I guess I should be using the 10.2 version to get it to work).

With Identity Crisis 6 Magisk v10.2 / Magisk Manager v3.1 / SuperSU v2.79 SR3 included:

Installed the ROM

Removed root with SuperSu app

Run osm0sis unsu from recovery

Installed the phh-superuser-topjohnwu-r2.zip

When I reboot, Magisk 10.2 is installed, phh superuser is not working (Magisk says no root detected). In fact, Android is not rooted. I can't activate Magisk Hide or any other option, so I can't pass the SafeNet verification.

If I'm guessing right, with Magisk 10.2 + phh-superuser-topjohnwu-r2 I could achieve my goal, but I can't find the way to install both together. Could it be some incompatibility with the boot.img that this ROM uses?

This is from Magisk 10.2 install log:

MtpStorage id: 65537 path: /data/media/0
I:Set page: 'install'
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
I:Set page: 'flash_confirm'
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
I:Set page: 'flash_zip'
I:operation_start: 'Flashing'
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
Installing zip file '/sdcard/Magisk-v10.2.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
Archive: /sdcard/Magisk-v10.2.zip
inflating: META-INF/MANIFEST.MF
inflating: META-INF/CERT.SF
inflating: META-INF/CERT.RSA
inflating: META-INF/com/google/android/update-binary
inflating: META-INF/com/google/android/updater-script
inflating: arm/bootimgtools
inflating: arm/busybox
inflating: arm/magiskhide
inflating: arm/resetprop
inflating: arm/sepolicy-inject
inflating: arm/su
inflating: arm64/bootimgtools
inflating: arm64/busybox
inflating: arm64/magiskhide
inflating: arm64/resetprop
inflating: arm64/sepolicy-inject
inflating: arm64/su
inflating: chromeos/futility
inflating: chromeos/kernel.keyblock
inflating: chromeos/kernel_data_key.vbprivk
inflating: common/custom_ramdisk_patch.sh
inflating: common/file_contexts_image
inflating: common/init.magisk.rc
inflating: common/magic_mask.sh
inflating: common/magisk.apk
inflating: common/magiskhide/add
inflating: common/magiskhide/list
inflating: common/magiskhide/rm
inflating: common/phh/module.prop
inflating: common/phh/service.sh
inflating: x64/bootimgtools
inflating: x64/busybox
inflating: x64/magiskhide
inflating: x64/resetprop
inflating: x64/sepolicy-inject
inflating: x64/su
inflating: x86/bootimgtools
inflating: x86/busybox
inflating: x86/magiskhide
inflating: x86/resetprop
inflating: x86/sepolicy-inject
inflating: x86/su
*****************************
Magisk v10.2 Boot Image Patcher
*****************************
- Mounting /system(ro), /cache, /data
- Device platform: arm
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
- Constructing environment
- /data/magisk.img detected!
- Mounting /data/magisk.img to /magisk
- Found Boot Image: /dev/block/mmcblk0p31
- Unpacking boot image
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
5593 blocks
- SuperSU patched boot detected!
- Adding auto patch script for SuperSU
losetup: /data/su.img: No such file or directory
losetup: /data/su.img: No such file or directory
losetup: /data/su.img: No such file or directory
losetup: /data/su.img: No such file or directory
losetup: /data/su.img: No such file or directory
losetup: /data/su.img: No such file or directory
losetup: /data/su.img: No such file or directory
losetup: /data/su.img: No such file or directory
! SU image mount failed...
! Please immediately flash SuperSU now
! Installation will complete after flashing SuperSU
Updater process ended with ERROR: 1
I:Legacy property environment disabled.
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
Error installing zip file '/sdcard/Magisk-v10.2.zip'
Updating partition details...
I:Data backup size is 3020MB, free: 686MB.
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'auto'
...done
I:Set page: 'flash_done'
I:operation_end - status=1
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
MtpServer::run fd: 21
E:request read returned -1, errno: 22, exiting MtpServer::run loop
MtpServer::run fd: 21