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 disablein recovery mode, and reboot.
- disable kext signing check by running
sudo nvram kext-dev-mode=1and reboot
- give it permission:
sudo chown -R root:wheel KAuthTest.kext
Then I load it using
sudo kextload KAuthTest.kext.
- in the system log, I didn't see the log from its start function
- when I run
kextstat | grep -v com.appleto 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?
kextutil -n -print-diagnostics KAuthTest.kextgives 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