[Android Software Development] The MAZZTer:
I couldn't get this to work on nougat (at least on my Pixel C), it looks like it is trying to remount / wrong (issues command mount -o rw,remount / / which fails; mount -o rw,remoint / is what it should be).

This is why it gives the "could not patch adbd" error. But even when I remount it manually it doesn't work.... the error disappears and it is able to patch the binary now, but adbd won't come back up after patching until I unpatch.

Apart from the faiiled mount commands, I found some bits in the logcat that look suspicious:

09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] supolicy v2.76 (ndk:armeabi) - Copyright (C) 2014-2016 - Chainfire
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*]
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] Patching policy ...
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -permissive:init_shell=fail
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:adbd:adbd:process:setcurrent=ok
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:adbd:init:process:dyntransition=ok
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:servicemanager:init_shell:dir:search=fail
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:servicemanager:zygote:dir:search=ok
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:servicemanager:init_shell:file:read=fail
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:servicemanager:init_shell:file:open=fail
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:servicemanager:zygote:file:read=ok
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:servicemanager:zygote:file:open=ok
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:servicemanager:init_shell:process:getattr=fail
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:servicemanager:zygote:process:getattr=ok
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:system_server:init_shell:binder:transfer=fail
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:system_server:init_shell:binder:call=fail
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:zygote:servicemanager:binder:call=ok
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] -allow:zygote:system_server:binder:call=ok
09-27 22:05:54.055 6845 10871 E CF-ADBD : [CF-ADBD][SU*] - Success

09-27 22:05:54.574 11189 11189 D su : 10209 /magisk/phh/su executing 0 /system/bin/sh using binary /system/bin/sh : sh
09-27 22:05:54.583 11140 11140 D AndroidRuntime: Calling main entry com.android.commands.am.Am
09-27 22:05:54.584 251 251 I SELinux : SELinux: Loaded service_contexts from /service_contexts.
09-27 22:05:54.585 251 251 I SELinux : avc: received policyload notice (seqno=9)
09-27 22:05:54.587 892 1164 E ActivityManager: Sending non-protected broadcast null from system uid 0 pkg null
09-27 22:05:54.587 892 1164 E ActivityManager: java.lang.Throwable
09-27 22:05:54.587 892 1164 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:17695)
09-27 22:05:54.587 892 1164 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:18256)
09-27 22:05:54.587 892 1164 E ActivityManager: at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:499)
09-27 22:05:54.587 892 1164 E ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2755)
09-27 22:05:54.587 892 1164 E ActivityManager: at android.os.Binder.execTransact(Binder.java:565)
09-27 22:05:54.597 11198 11198 D su : sending code
09-27 22:05:54.605 11140 11140 D AndroidRuntime: Shutting down VM
09-27 22:05:54.606 11199 11199 D su : child exited
09-27 22:05:54.620 11200 11200 D su : client exited 0

Unfortunately I was unable to come up with a workaround beyond the mount one.

As a side note, it looks like the supolicy binary being used is provided by my root solution of choice; in this case, Magisk phh Superuser. Not sure if it matters especially chainfire made it apparently...

Also Pixel C is 64-bit while the output for supolicy suggests it was compiled for 32-bit (I think?). Again, not sure if that matters.

[Edit: Upgraded my Nexus 6 to Nougat. Same exact problem that didn't exist before. Probably not a 32/64 thing then.]