[Moto Z Questions & Answers] Kibu21:
Hello everyone, I had stock Nougat 7 and managed to unlock my bootloader, flash TWRP and rooted Moto Z (EU1650-03). I then proceeded to flash a custom ROM (AICP N-12.1-GRIFFIN - Nougat 7.1.2) that came with a custom lineage kernel (3.18.31) & the Magisk Manager app. After having root access I wanted to remove root using SuperSU's option in the app due to certain apps not working upon detecting root access (which I did). But now I want to re-root my Moto Z with the custom ROM already installed, but when I try to re-flash SuperSU it fails. So my question is this, is there a way to re-root a custom ROM? I also made an idiotic mistake of not backing up my stock ROM/Recovery too. Logs when attempting to flash the SuperSU Zip are below.

- Detecting system compatibility
sukernel v2.79 (ndk:arm64-v8a) - Copyright (C) 2014-2016 - Chainfire

Loading from [/dev/block/sda17] ...

magic: [ANDROID!]
kernel: [10234663] (10235904) @ 0x80008000
ramdisk: [2545972] (2547712) @ 0x81000000
second: [0] (0) @ 0x80f00000
tags: @ 0x80000100
page size: 4096
unused: [0x007e9000] [0x0e041115]
dtb(?): [8294400] (8294400)
name: []
command line: [androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff cnsscore.pcie_link_down_panic=1 buildvariant=userdebug]
extra command line: []
id: [0xa4ce43a8667d37aae9db2ac40404e5118dfc24ef000000000000000000000000]

Saving to [/sutmp/ramdisk.packed] ...

sukernel v2.79 (ndk:arm64-v8a) - Copyright (C) 2014-2016 - Chainfire

Loading from [/sutmp/ramdisk.packed] ...

Decompressing [2545972] --> [5334776]

Saving to [/sutmp/ramdisk] ...

sukernel v2.79 (ndk:arm64-v8a) - Copyright (C) 2014-2016 - Chainfire

Loading from [/sutmp/ramdisk] ...

----- patch check -----

Loading from cpio:[init.rc] ...

Finding [daemonsu]
-!Found

Finding [SuperSU:PATCH]
-!Found

Result: not patched

sukernel v2.79 (ndk:arm64-v8a) - Copyright (C) 2014-2016 - Chainfire

Loading from [/sutmp/ramdisk] ...

Saving to [/sutmp/fstab] ...

- System-less mode, boot image support required
- Creating image
/data/su.img: 11/6144 files (0.0% non-contiguous), 1422/24576 blocks
- Mounting image
mkdir: can't create directory '/su': File exists
- Creating paths
mkdir: can't create directory '/su/bin': Read-only file system
chown: /su/bin: No such file or directory
chown: /su/bin: No such file or directory
chmod: /su/bin: No such file or directory
mkdir: can't create directory '/su/xbin': Read-only file system
chown: /su/xbin: No such file or directory
chown: /su/xbin: No such file or directory
chmod: /su/xbin: No such file or directory
mkdir: can't create directory '/su/lib': Read-only file system
chown: /su/lib: No such file or directory
chown: /su/lib: No such file or directory
chmod: /su/lib: No such file or directory
mkdir: can't create directory '/su/etc': Read-only file system
chown: /su/etc: No such file or directory
chown: /su/etc: No such file or directory
chmod: /su/etc: No such file or directory
mkdir: can't create directory '/su/su.d': Read-only file system
chown: /su/su.d: No such file or directory
chown: /su/su.d: No such file or directory
chmod: /su/su.d: No such file or directory
- Removing old files
- Placing files
rm: can't remove '/su/bin/su': No such file or directory
/tmp/updater: line 1564: can't create /su/bin/su: nonexistent directory
chown: /su/bin/su: No such file or directory
chown: /su/bin/su: No such file or directory
chmod: /su/bin/su: No such file or directory
rm: can't remove '/su/bin/daemonsu': No such file or directory
/tmp/updater: line 1564: can't create /su/bin/daemonsu: nonexistent directory
chown: /su/bin/daemonsu: No such file or directory
chown: /su/bin/daemonsu: No such file or directory
chmod: /su/bin/daemonsu: No such file or directory
rm: can't remove '/su/bin/supolicy_wrapped': No such file or directory
/tmp/updater: line 1564: can't create /su/bin/supolicy_wrapped: nonexistent directory
chown: /su/bin/supolicy_wrapped: No such file or directory
chown: /su/bin/supolicy_wrapped: No such file or directory
chmod: /su/bin/supolicy_wrapped: No such file or directory
rm: can't remove '/su/lib/libsupol.so': No such file or directory
/tmp/updater: line 1564: can't create /su/lib/libsupol.so: nonexistent directory
chown: /su/lib/libsupol.so: No such file or directory
chown: /su/lib/libsupol.so: No such file or directory
chmod: /su/lib/libsupol.so: No such file or directory
rm: can't remove '/su/bin/sukernel': No such file or directory
/tmp/updater: line 1564: can't create /su/bin/sukernel: nonexistent directory
chown: /su/bin/sukernel: No such file or directory
chown: /su/bin/sukernel: No such file or directory
chmod: /su/bin/sukernel: No such file or directory

******************
Boot image patcher
******************
- Finding boot image
--- Boot image: /dev/block/sda17
/tmp/updater: line 1564: /su/bin/sukernel: not found
- Extracting ramdisk
/tmp/updater: eval: line 1: /su/bin/sukernel: not found
--- Failure, aborting

*************************
IMPORTANT NOTICES
*************************
First reboot may take a
few minutes. It can also
loop a few times. Do not
interrupt the process!
*************************

- Unmounting /system
- Done !
I:Updater process ended with RC=0
I:Legacy property environment disabled.
I:Install took 9 second(s).
Updating partition details...
I:Data backup size is 3611MB, free: 45361MB.
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'auto'
...done
I:Set page: 'flash_done'
I:operation_end - status=0
I:Set page: 'clear_vars'
I:Set page: 'install'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'filemanagerlist'
I:Set page: 'advanced'
I:Set page: 'filemanagerlist'
Truncating string cache entries.
I:Set page: 'filemanageroptions'
I:Set page: 'filemanagerlist'
I:Set overlay: 'slideout'
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 25
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 0
I:TWFunc::Set_Brightness: Setting brightness control to 25
I:Set overlay: ''
I:Set overlay: ''
I:Set overlay: 'slideout'
I:Set overlay: ''
I:Set page: 'advanced'
I:Set page: 'confirm_action'
I:Set page: 'action_page'
I:operation_start: 'Copy Log'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log