Contribute
Register

[Guide] HackrNVMeFamily co-existence with IONVMeFamily using class-code spoof

Status
Not open for further replies.
Thanks for the helping hand, no i feel a litte less lost!

I have a running System on regular SSD.

kernel cache looks very messy, but i have no clue?!
Code:
Last login: Wed Feb 15 18:44:26 on ttys000
APOLLO:~ work$ sudo kextcache -system-prelinked-kernel
Password:
IONVMeFamily.kext has incorrect permissions; omitting.
HackrNVMeFamily-10_12_3.kext has incorrect permissions; omitting.
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleGraphicsDevicePolicy.kext
KernelCache ID: 24F91D532BE9CEBFD603268C91CFA65E
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
APOLLO:~ work$ sudo kextcache -system-caches
APOLLO:~ work$ sudo kextcache -i /
IONVMeFamily.kext has incorrect permissions; omitting.
HackrNVMeFamily-10_12_3.kext has incorrect permissions; omitting.
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleGraphicsDevicePolicy.kext
KernelCache ID: 24F91D532BE9CEBFD603268C91CFA65E
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
APOLLO:~ work$



As well i verified AHCI mode in BIOS.

Placing the HackrNVMeFamily-10_12_3.kext in /S/L/E did not help either.

looks like the patch was applied somehow
Code:
=== [ ACPIPatchedAML ] ====================================
0:723  0:000  Start: Processing Patched AML(s): Unsorted
0:723  0:000  Inserting SSDT-NVMe-Pcc.aml from EFI\CLOVER\ACPI\patched ... Success
0:724  0:001  End: Processing Patched AML(s)

it might be this is the issue. But what can i do about it?
Code:
APOLLO:~ work$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
IONVMeFamily.kext has incorrect permissions; omitting.
HackrNVMeFamily-10_12_3.kext has incorrect permissions; omitting.
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleGraphicsDevicePolicy.kext
KernelCache ID: D170A36BD23909E4CAAC368AAC4AE38E
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
APOLLO:~ work$
 

Attachments

  • Screen Shot 2017-02-15 at 18.24.27.png
    Screen Shot 2017-02-15 at 18.24.27.png
    315.6 KB · Views: 139
  • image1 copy.jpg
    image1 copy.jpg
    684.6 KB · Views: 127
  • APOLLO.ioreg
    5.7 MB · Views: 129
  • bootlog.txt
    38.1 KB · Views: 202
Last edited:
No worries. I went through the same thing as you.
Okay, I think you did not install your HackrNVMeFamily-10_12_3.kext and IONVMeFamily.kext in the right way.

It seems that you just dragged and dropped them into S/L/E, which is why terminal output says you have the wrong permissions:

IONVMeFamily.kext has incorrect permissions; omitting.

However, having your kexts with invalid signatures are right, because they are not Apple Originals™

So, to install these kexts the right way, you cannot just drag and drop them in. Kextbeast helps you install them the right way with the proper user permissions.

You need to:
  1. Download Kextbeast
  2. Follow the instructions (i.e. place HackrNVMeFamily-10_12_3.kext and unmodified IONVMeFamily.kext on the Desktop)
  3. Install into S/L/E
  4. Try the kext cache clears in Terminal as per above
  5. Restart

Alternatively to KextBeast, There is a command line way to do this as well, which actually RehabMan mentions in his first post.
You would need to do this for both kexts.

The result will be HackrNVMeFamily-10_12_2.kext which can be placed in EFI/Clover/kexts/Other for injection via Clover (installer or recovery scenario), or installed to the system volume (post-install scenario).

You can install kexts easily with Terminal. For example, to install the generated HackrNVMeFamily-10_12_2.kext:
Code:
cd ~/Projects/patch-nvme.git
sudo cp -R HackrNVMeFamily-10_12_2.kext /Library/Extensions

You can rebuild cache to verify cache can be built without error:
Code:
sudo kextcache -i /

He puts it in /L/E, but I just happen to have mine in S/L/E.

Reading his first post word for word, is everything. There's no skimming here as I learned... heh
 
Last edited:
Thank You!! I was refreshing the page like every 2 min i hope so. helps me out :)

using kext beast fixed the permissions and i can at least see the Drive in IORexp.

But still not available in Diskutility..

Code:
Last login: Wed Feb 15 19:39:52 on ttys000
APOLLO:~ work$ sudo kextcache -system-prelinked-kernel
Password:
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext HackrNVMeFamily-10_12_3.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleGraphicsDevicePolicy.kext
KernelCache ID: D9D14026C620188A9B569918C57D0ABA
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
APOLLO:~ work$ sudo kextcache -system-caches
APOLLO:~ work$ sudo kextcache -i /
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext HackrNVMeFamily-10_12_3.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleGraphicsDevicePolicy.kext
KernelCache ID: D9D14026C620188A9B569918C57D0ABA
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
APOLLO:~ work$

.. believe me, im reading word by word :) 3x

EDIT:

tried 10.11.x fix for EVO 960 with no luck
Code:
// Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
// also inject "compatible", "IOName", and "name" such that 10.11.x IONVMeFamily
// does not match on pci144d,a804 (Samsung 960 EVO)
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
    External(_SB.PCI0.BR1B.PXSX, DeviceObj)
    Method(_SB.PCI0.BR1B.PXSX._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
            "built-in", Buffer() { 0 },
            "compatible", Buffer() { "pci144d,a801" },
            "IOName", "pci144d,a801",
            "name", Buffer() { "pci144d,a801" },
        })
    }
}
//EOF
 

Attachments

  • Screen Shot 2017-02-15 at 19.45.35.png
    Screen Shot 2017-02-15 at 19.45.35.png
    319.8 KB · Views: 110
  • Screen Shot 2017-02-15 at 19.56.56.png
    Screen Shot 2017-02-15 at 19.56.56.png
    240.9 KB · Views: 109
Last edited:
where is your IONVMeFamily.kext? Just make sure its in the same place I think...

Code:
Last login: Wed Feb 15 19:39:52 on ttys000
APOLLO:~ work$ sudo kextcache -system-prelinked-kernel
Password:
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext HackrNVMeFamily-10_12_3.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleGraphicsDevicePolicy.kext
KernelCache ID: D9D14026C620188A9B569918C57D0ABA
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
APOLLO:~ work$ sudo kextcache -system-caches
APOLLO:~ work$ sudo kextcache -i /
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext HackrNVMeFamily-10_12_3.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleGraphicsDevicePolicy.kext
KernelCache ID: D9D14026C620188A9B569918C57D0ABA
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
APOLLO:~ work$


After that, I suspect its working???

can you run
Code:
diskutil list

in terminal and post the output here please.

If your disk shows up, then i has not been formatted, then open Disk Utility, and format it accordingly (pretty standard stuff.. I googled "format Mac drive" see attached for what its supposed to look like)

erase-disk.jpg



Lastly, if you are working in 10.12.X Sierra, just stick with that install/spoof/kext. Leave the 10.11 stuff behind unless your Hackie is El Capitan.

Also, I seem to remember RehabMan has a special condition (something else you had to do) for Samsung 9XX drives in his first post. I would double-check that.
 
Last edited:
Thanks, but still no luck :(
Code:
Last login: Wed Feb 15 20:08:25 on console
APOLLO:~ work$ diskutil list
/dev/disk0 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS OSX                     499.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

APOLLO:~ work$

This seems to be my other SSD

im rebuilding the SSDT-NVMe-Pcc.aml with
Code:
// Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
    External(_SB.PCI0.BR1B.PXSX, DeviceObj)
    Method(_SB.PCI0.BR1B.PXSX._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
            "built-in", Buffer() { 0 },
        })
    }
}
//EOF
 
Thanks, but still no luck :(

im rebuilding the SSDT-NVMe-Pcc.aml with
Code:
// Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
    External(_SB.PCI0.BR1B.PXSX, DeviceObj)
    Method(_SB.PCI0.BR1B.PXSX._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
            "built-in", Buffer() { 0 },
        })
    }
}
//EOF

Your aml is fine. I think.

[UPDATE]
Just kidding....
Your hunch is right.

It isn't PXSX.... You need to insert:

Code:
_SB.PCI0.BR1B.H000.

because in your IOReg... its not PXSX!!!

This is what you should be looking at:
Screen Shot 2017-02-15 at 19.56.56.png


compare this with mine (in purple):

NVMe ACPI Path copy.png
 
Last edited:
OH MY GOD - its working :D

The H000 was the last piece of the puzzle..
Thank you so much for your help!!
 

Attachments

  • Screen Shot 2017-02-15 at 20.36.48.png
    Screen Shot 2017-02-15 at 20.36.48.png
    75.8 KB · Views: 91
Last edited:
@RehabMan would you possibly consider updating your guide with the screenshots here of different examples of the paths as seen on IOReg

Especially those that may no have Windows and only have a Mac available or installed... so people don't get lost in finding the ACPI path of their NVMe device.

(It was actually a guess for me my path was PXSX. I also assumed it was like yours... I think there could be some other people may be guessing the same way... ehhhhh)
 
ok, second attempt:

1. I installed Windows 10. (960 EVO is now listed in BIOS)
2. Got the ACPI path: _SB.PCI0.BR1B.H000
3. Created SSDT-NVMe-Pcc.aml and copied to EFI/Clover/ACPI/patched
Code:
// Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
    External(_SB.PCI0.BR1B.PXSX, DeviceObj)
    Method(_SB.PCI0.BR1B.PXSX._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
            "built-in", Buffer() { 0 },
        })
    }
}
//EOF

Tried 10.11.x fix for 960 as well
Code:
/ Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
// also inject "compatible", "IOName", and "name" such that 10.11.x IONVMeFamily
// does not match on pci144d,a804 (Samsung 960 EVO)
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
    External(_SB.PCI0.BR1B.PXSX, DeviceObj)
    Method(_SB.PCI0.BR1B.PXSX._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
            "built-in", Buffer() { 0 },
            "compatible", Buffer() { "pci144d,a801" },
            "IOName", "pci144d,a801",
            "name", Buffer() { "pci144d,a801" },
        })
    }
}
//EOF
4. created HackrNVMeFamily-10_12_3.kext and copied to EFI/Clover/ACPI/patched
Code:
cd ~/Downloads/patch-nvme-master
./patch_nvme.sh --spoof 10_12_3
5. Added OSI and DSM rename in config.plist
Code:
<key>Patches</key>
            <array>
                <dict>
                    <key>Comment</key>
                    <string>change _OSI to XOSI</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    X09TSQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WE9TSQ==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change _DSM to XDSM</string>
                    <key>Find</key>
                    <data>
                    lXmDcw==
                    </data>
                    <key>Replace</key>
                    <data>
                    WERTTQ==
                    </data>
                </dict>
            </array>


SSD still not showing up in System Utility or System Information.

I am lost...



You did not enter the _DSM->XDSM patch correctly.
 
Status
Not open for further replies.
Back
Top