I built a self-made kernel extension (named KAuthTest.kext
) and would like to test it out. So in a VM running macOS 10.12.3, I did the followings:
- disable SIP by running
csrutil disable
in recovery mode, and reboot. - disable kext signing check by running
sudo nvram kext-dev-mode=1
and reboot - give it permission:
sudo chown -R root:wheel KAuthTest.kext
Then I load it using sudo kextload KAuthTest.kext
.
However,
- in the system log, I didn't see the log from its start function
- when I run
kextstat | grep -v com.apple
to see all third party kexts, I didn't see my kernel extension.
So did I miss something? How I can successfully load this into the kernel?
Note:
kextutil -n -print-diagnostics KAuthTest.kext
gives this:Diagnostics for KAuthTest.kext: Code Signing Failure: code signature is invalid KAuthTest.kext appears to be loadable (including linkage for on-disk libraries).
- I did try rebooting, but still no luck