Jump to content
ErmaC

Clover General discussion

19,036 posts in this topic

Recommended Posts

Advertisement

Test please the follow change in StartupSound.c, line 193

  - Status = AudioIo->SetupPlayback(AudioIo, OutputIndex, OutputVolume,
  + Status = AudioIo->SetupPlayback(AudioIo, AudioList[OutputIndex].Index, OutputVolume,

I am not at home now...

Share this post


Link to post
Share on other sites
2 hours ago, Slice said:

Test please the follow change in StartupSound.c, line 193


  - Status = AudioIo->SetupPlayback(AudioIo, OutputIndex, OutputVolume,
  + Status = AudioIo->SetupPlayback(AudioIo, AudioList[OutputIndex].Index, OutputVolume,

I am not at home now...

 

Ok. I do that and report.

 

EDIT: Works fine. Thanks :D

Edited by Matgen84

Share this post


Link to post
Share on other sites
39 minutes ago, Matgen84 said:

 

You can try this 4859 version with modified StartupSound.c by  @Slice  for testing

Clover_v2.4k_r4859.pkg.zip

 

I edited those lines (Line 193), then rebuild ./makepkg.

I can confirm,. it works.

Sound testing in GUI CLOVER works too

 

image.png.f7090e58a922235a04a8341c5d2f15a2.png
 

Share this post


Link to post
Share on other sites
1 minute ago, Slice said:

I see no case to clean NVRAM.

Ok, thank you. And I just realized that "F7" for Startup audio test; is working either. I believe it sounds like a guitar.

Share this post


Link to post
Share on other sites

Does not work on my X299 clone.....and I tried all of these options......using Clover 4861

 

Now, I added nothing else, no BootChime stuff, just selected the options and rebooted, each one.  Do I need to do something special?  Do I have to use a specific Theme? (because I just used my standard Buttons theme).  My computer uses a Vega 64 and normally plays it's output on my HDMI, but for this test, I connected a speaker to my green port on the rear of my computer (which, in my computer is seen as internal speakers).  I tested to make sure I got sound, and then went through the rebooting I described earlier.   Three of the HDMI/AMD outputs locked up the computer entirely (only a power off or reset would restore control). 

 

I did use the SVG option, didn't make any difference.....

 

Screen Shot 2019-01-24 at 12.37.05 PM.png

Edited by meaganmargaret
added comments

Share this post


Link to post
Share on other sites
Does not work on my X299 clone.....and I tried all of these options......using Clover 4861
 
Now, I added nothing else, no BootChime stuff, just selected the options and rebooted, each one.  Do I need to do something special?  Do I have to use a specific Theme? (because I just used my standard Buttons theme).  My computer uses a Vega 64 and normally plays it's output on my HDMI, but for this test, I connected a speaker to my green port on the rear of my computer (which, in my computer is seen as internal speakers).  I tested to make sure I got sound, and then went through the rebooting I described earlier.   Three of the HDMI/AMD outputs locked up the computer entirely (only a power off or reset would restore control). 
 
I did use the SVG option, didn't make any difference.....
 
301340704_ScreenShot2019-01-24at12_37_05PM.png.769b4506a8a70d769986698ead2f60bc.png

You need to have the sound file (named sound.wav) in the theme folder that you are you using to hear the sound. The wav file also must be converted properly or you can copy and paste the one supplied in the Clovy folder to your current theme folder.


Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites
35 minutes ago, SavageAUS said:


You need to have the sound file (named sound.wav) in the theme folder that you are you using to hear the sound. The wav file also must be converted properly or you can copy and paste the one supplied in the Clovy folder to your current theme folder.


Sent from my iPhone using Tapatalk

 

So, that worked.  I wish the sound it made was better.  Comparing it to being played outside Clover and when Clover plays it at boot, well, there's a world of difference. The other thing that concerns me is no AMD on HDMI support........oh well, baby steps, I guess.....

Edited by meaganmargaret

Share this post


Link to post
Share on other sites

I have sound when in GUI F7, but when booting Mojave, computer resets, need to delete AudioDxe.efi in order to boot, is there a missed bug somewhere?

Edited by STLVNUB

Share this post


Link to post
Share on other sites
4 hours ago, SavageAUS said:

Kext injection appears to be broken in macOS Mojave 10.14.4 beta.


Sent from my iPhone using Tapatalk

No worries, I have fixed it up!

 

 

EDIT:

Please see https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/?do=findComment&comment=2661179 for the final fix!

Edited by PMheart

Share this post


Link to post
Share on other sites
3 hours ago, meaganmargaret said:

 

So, that worked.  I wish the sound it made was better.  Comparing it to being played outside Clover and when Clover plays it at boot, well, there's a world of difference. The other thing that concerns me is no AMD on HDMI support........oh well, baby steps, I guess.....

My laptop had issues playing the startup sound from a theme. It played but it was buzzy - nasally. I converted the sound.wav from 8000 to 48000 and now it sounds fine. You may want to try it. I used audacity. 

Share this post


Link to post
Share on other sites

In Mojave 10.14.4 Dev Beta 1. Clover fail to inject kext. PMHeart make modification of clover injection and can do that, please make a fix default_smile.pngc4a37badcddedec87a21444671349d57.jpg&key=aefe070544bd15337895a0ec6bcb52ffa0f16f68c90123252b5d5a833dcbd1a3

 

Sent from my Mi Note 2 using Tapatalk

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Hi again,

 

I have cleaned up kext_inject.c once more. (See here)

Now that a friend has confirmed that it did work, let me post the diff here.

 

--- kext_inject_org.c	2019-01-25 10:20:46.000000000 +0800
+++ kext_inject_mod.c	2019-01-25 10:42:03.000000000 +0800
@@ -665,16 +665,30 @@
 UINT8   KBEMojaSearchEXT[]       = { 0xE8, 0xAF, 0x00, 0x00, 0x00, 0xEB, 0x05, 0xE8 };
 UINT8   KBEMojaReplaceEXT[]      = { 0xE8, 0xAF, 0x00, 0x00, 0x00, 0x90, 0x90, 0xE8 };
 
-// High Sierra/Mojave (SIP)
-// PMheart: checked KBEHighSie*SIP
+// High Sierra / Mojave 10.14 - 10.14.3 (SIP)
+// PMheart: for 10.14.4+, see KBEMoja4SearchSIP and KBEMoja4ReplaceSIP below
+// PMheart: checked KBEHighSieMoja3*SIP
 // Need to pair with KBEMoja*EXT
-UINT8   KBEHighSieMojaSearchSIP[]    = { 0xC3, 0x48, 0x85, 0xDB, 0x74, 0x69, 0x48, 0x8B, 0x03, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
-UINT8   KBEHighSieMojaReplaceSIP[]   = { 0xC3, 0x48, 0x85, 0xDB, 0xEB, 0x12, 0x48, 0x8B, 0x03, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
+UINT8   KBEHighSieMoja3SearchSIP[]    = { 0xC3, 0x48, 0x85, 0xDB, 0x74, 0x69, 0x48, 0x8B, 0x03, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
+UINT8   KBEHighSieMoja3ReplaceSIP[]   = { 0xC3, 0x48, 0x85, 0xDB, 0xEB, 0x12, 0x48, 0x8B, 0x03, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
 
+// Mojave 10.14.4+ (SIP)
+// PMheart: checked KBEMoja4*SIP
+// Need to pair with KBEMoja*EXT
+UINT8   KBEMoja4SearchSIP[]           = { 0x48, 0x85, 0xC0, 0x74, 0x6C, 0x48, 0x89, 0xC3, 0x48, 0x8B, 0x00, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
+UINT8   KBEMoja4ReplaceSIP[]          = { 0x48, 0x85, 0xC0, 0xEB, 0x15, 0x48, 0x89, 0xC3, 0x48, 0x8B, 0x00, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
+
+// Mojave 10.14 - 10.14.3
 // Avoid race condition in OSKext::removeKextBootstrap when using booter kexts without keepsyms=1.
-UINT8   KBEMojaSearchKxldUnmap[]     = { 0x00, 0x0F, 0x85, 0xB2, 0x01, 0x00, 0x00, 0x48 };
-UINT8   KBEMojaReplaceKxldUnmap[]    = { 0x00, 0x90, 0xE9, 0xB2, 0x01, 0x00, 0x00, 0x48 };
+// by vit9696
+UINT8   KBEMoja3SearchKxldUnmap[]     = { 0x00, 0x0F, 0x85, 0xB2, 0x01, 0x00, 0x00, 0x48 };
+UINT8   KBEMoja3ReplaceKxldUnmap[]    = { 0x00, 0x90, 0xE9, 0xB2, 0x01, 0x00, 0x00, 0x48 };
 
+// Mojave 10.14.4+
+// Avoid race condition in OSKext::removeKextBootstrap when using booter kexts without keepsyms=1.
+// by PMheart, based on vit9696's work
+UINT8   KBEMoja4SearchKxldUnmap[]     = { 0x00, 0x0F, 0x85, 0xB1, 0x01, 0x00, 0x00, 0x48 };
+UINT8   KBEMoja4ReplaceKxldUnmap[]    = { 0x00, 0x90, 0xE9, 0xB1, 0x01, 0x00, 0x00, 0x48 };
 
 //
 // We can not rely on OSVersion global variable for OS version detection,
@@ -689,100 +703,114 @@
 VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
 {
   UINTN   Num = 0;
-  UINTN   NumSnow_i386 = 0;
-  UINTN   NumSnow_X64 = 0;
-  UINTN   NumLion_i386 = 0;
-  UINTN   NumLion_X64 = 0;
-  UINTN   NumMLMav = 0;
-  UINTN   NumMLDebug = 0;
-  UINTN   NumYos = 0;
-  UINTN   NumMavYosDebug = 0;
-  UINTN   NumEC = 0;
-  UINTN   NumECDebug = 0;
-  UINTN   NumSie = 0;
-  UINTN   NumSieDebug = 0;
-  UINTN   NumHighSieMoja = 0;
-  UINTN   NumMoja = 0;
+  UINTN   NumSnow_i386_EXT   = 0;
+  UINTN   NumSnow_X64_EXT    = 0;
+  UINTN   NumLion_i386_EXT   = 0;
+  UINTN   NumLion_X64_EXT    = 0;
+  UINTN   NumMLMavEXT        = 0;
+  UINTN   NumMLDebugEXT      = 0;
+  UINTN   NumYosEXT          = 0;
+  UINTN   NumMavYosDebugEXT  = 0;
+  UINTN   NumECSIP           = 0;
+  UINTN   NumECDebugSIP      = 0;
+  UINTN   NumSieSIP          = 0;
+  UINTN   NumSieDebugSIP     = 0;
+  UINTN   NumHighSieMoja3SIP = 0; // 10.13.X - 10.14.3
+  UINTN   NumMojaEXT         = 0; // 10.14.X
+  UINTN   NumMoja4SIP        = 0; // 10.14.4+
 
   
   DBG_RT(Entry, "\nPatching kernel for injected kexts...\n");
   
   if (is64BitKernel) {
-    NumSnow_X64    = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_X64, sizeof(KBESnowSearchEXT_X64));
-    NumLion_X64    = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_X64, sizeof(KBELionSearchEXT_X64));
-    NumMLMav       = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMLMavSearchEXT, sizeof(KBEMLMavSearchEXT));
-    //NumMLDebug     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMLDebugSearchEXT, sizeof(KBEMLDebugSearchEXT));
-    NumYos         = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT));
-    //NumMavYosDebug = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMavYosDebugSearchEXT, sizeof(KBEMavYosDebugSearchEXT));
-    NumEC          = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEECSearchSIP, sizeof(KBEECSearchSIP));
-    //NumECDebug     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEECDebugSearchSIP, sizeof(KBEECDebugSearchSIP));
-    NumSie         = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESieSearchSIP, sizeof(KBESieSearchSIP));
-    NumSieDebug    = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchSIP, sizeof(KBESieDebugSearchSIP));
-    NumHighSieMoja = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEHighSieMojaSearchSIP, sizeof(KBEHighSieMojaSearchSIP));
-    NumMoja        = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchEXT, sizeof(KBEMojaSearchEXT));
-  }
-  else {
-    NumSnow_i386 = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_i386, sizeof(KBESnowSearchEXT_i386));
-    NumLion_i386 = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_i386, sizeof(KBELionSearchEXT_i386));
+    NumSnow_X64_EXT     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_X64, sizeof(KBESnowSearchEXT_X64));
+    NumLion_X64_EXT     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_X64, sizeof(KBELionSearchEXT_X64));
+    NumMLMavEXT         = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMLMavSearchEXT, sizeof(KBEMLMavSearchEXT));
+    //NumMLDebugEXT     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMLDebugSearchEXT, sizeof(KBEMLDebugSearchEXT));
+    NumYosEXT           = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT));
+    //NumMavYosDebugEXT = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMavYosDebugSearchEXT, sizeof(KBEMavYosDebugSearchEXT));
+    NumECSIP            = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEECSearchSIP, sizeof(KBEECSearchSIP));
+    //NumECDebugSIP     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEECDebugSearchSIP, sizeof(KBEECDebugSearchSIP));
+    NumSieSIP           = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESieSearchSIP, sizeof(KBESieSearchSIP));
+    NumSieDebugSIP      = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchSIP, sizeof(KBESieDebugSearchSIP));
+    NumHighSieMoja3SIP  = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEHighSieMoja3SearchSIP, sizeof(KBEHighSieMoja3SearchSIP));
+    NumMojaEXT          = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchEXT, sizeof(KBEMojaSearchEXT));   // general EXT patch, for all 10.14.x
+    NumMoja4SIP         = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMoja4SearchSIP, sizeof(KBEMoja4SearchSIP)); // SIP patch, ONLY for 10.14.4+
+  } else {
+    NumSnow_i386_EXT = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_i386, sizeof(KBESnowSearchEXT_i386));
+    NumLion_i386_EXT = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_i386, sizeof(KBELionSearchEXT_i386));
   }
   
-  if (NumSnow_i386 + NumSnow_X64 + NumLion_i386 + NumLion_X64 + NumMLMav > 1) {
+  if (NumSnow_i386_EXT + NumSnow_X64_EXT + NumLion_i386_EXT + NumLion_X64_EXT + NumMLMavEXT > 1) {
     // more then one pattern found - we do not know what to do with it
     // and we'll skipp it
-    AsciiPrint("\nERROR patching kernel for injected kexts:\nmultiple patterns found (Snowi386: %d, SnowX64: %d, Lioni386: %d, LionX64: %d, MLMav: %d) - skipping patching!\n", NumSnow_i386, NumSnow_X64, NumLion_i386, NumLion_X64, NumMLMav);
+    AsciiPrint("\nERROR patching kernel for injected kexts:\nmultiple patterns found (Snowi386: %d, SnowX64: %d, Lioni386: %d, LionX64: %d, MLMav: %d) - skipping patching!\n", NumSnow_i386_EXT, NumSnow_X64_EXT, NumLion_i386_EXT, NumLion_X64_EXT, NumMLMavEXT);
     gBS->Stall(10000000);
     return;
   }
   
   // X64
-  if (NumMoja == 1) {
-    Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchEXT, sizeof(KBEMojaSearchEXT), KBEMojaReplaceEXT, 1) +
-          SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEHighSieMojaSearchSIP, sizeof(KBEHighSieMojaSearchSIP), KBEHighSieMojaReplaceSIP, 1) +
-          SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchKxldUnmap, sizeof(KBEMojaSearchKxldUnmap), KBEMojaReplaceKxldUnmap, 1);
-    DBG_RT(Entry, "==> kernel Mojave: %d replaces done.\n", Num);
-  } else if (NumHighSieMoja == 1) {
+  if (NumMojaEXT == 1) {
+    // apply EXT patch first
+    Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchEXT, sizeof(KBEMojaSearchEXT), KBEMojaReplaceEXT, 1);
+    // then apply corresponding patches based on what we found
+    if (NumMoja4SIP == 1) {
+      // firstly, try to patch 10.14.4+
+      Num += SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMoja4SearchSIP, sizeof(KBEMoja4SearchSIP), KBEMoja4ReplaceSIP, 1) +
+             SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMoja4SearchKxldUnmap, sizeof(KBEMoja4SearchKxldUnmap), KBEMoja4ReplaceKxldUnmap, 1);
+      DBG_RT(Entry, "==> kernel Mojave (10.14.4+): %d replaces done.\n", Num);
+    } else if (NumHighSieMoja3SIP == 1) {
+      // then 10.14 - 10.14.3
+      Num += SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEHighSieMoja3SearchSIP, sizeof(KBEHighSieMoja3SearchSIP), KBEHighSieMoja3ReplaceSIP, 1) +
+             SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMoja3SearchKxldUnmap, sizeof(KBEMoja3SearchKxldUnmap), KBEMoja3ReplaceKxldUnmap, 1);
+      DBG_RT(Entry, "==> kernel Mojave (10.14 - 10.14.3): %d replaces done.\n", Num);
+    } else {
+      // no SIP and KxldUnmap pattern found!
+      DBG_RT(Entry, "==> kernel Mojave WARNING: pattern NOT found - only %d replaces done.\nKext Injection will NOT work!\n", Num);
+    }
+  } else if (NumHighSieMoja3SIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT), KBEYosECSieHighReplaceEXT, 1) +
-          SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEHighSieMojaSearchSIP, sizeof(KBEHighSieMojaSearchSIP), KBEHighSieMojaReplaceSIP, 1);
+          SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEHighSieMoja3SearchSIP, sizeof(KBEHighSieMoja3SearchSIP), KBEHighSieMoja3ReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel High Sierra: %d replaces done.\n", Num);
-  } else if (NumSieDebug == 1) {
+  } else if (NumSieDebugSIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchEXT, sizeof(KBESieDebugSearchEXT), KBESieDebugReplaceEXT, 1) +
           SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchSIP, sizeof(KBESieDebugSearchSIP), KBESieDebugReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel Sierra Debug: %d replaces done.\n", Num);
-  } else if (NumSie == 1) {
+  } else if (NumSieSIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT), KBEYosECSieHighReplaceEXT, 1) +
           SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieSearchSIP, sizeof(KBESieSearchSIP), KBESieReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel Sierra: %d replaces done.\n", Num);
-  } else if (NumECDebug == 1) {
+  } else if (NumECDebugSIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEECDebugSearchEXT, sizeof(KBEECDebugSearchEXT), KBEECDebugReplaceEXT, 1) +
           SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEECDebugSearchSIP, sizeof(KBEECDebugSearchSIP), KBEECDebugReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel El Capitan Debug: %d replaces done.\n", Num);
-  } else if (NumEC == 1) {
+  } else if (NumECSIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT), KBEYosECSieHighReplaceEXT, 1) +
           SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEECSearchSIP, sizeof(KBEECSearchSIP), KBEECReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel El Capitan: %d replaces done.\n", Num);
-  } else if (NumMavYosDebug == 1) {
+  } else if (NumMavYosDebugEXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMavYosDebugSearchEXT, sizeof(KBEMavYosDebugReplaceEXT), KBEMavYosDebugReplaceEXT, 1);
     DBG_RT(Entry, "==> kernel Yosemite Debug: %d replaces done.\n", Num);
-  } else if (NumYos == 1) {
+  } else if (NumYosEXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT), KBEYosECSieHighReplaceEXT, 1);
     DBG_RT(Entry, "==> kernel Yosemite: %d replaces done.\n", Num);
-  } else if (NumMLDebug == 1) {
+  } else if (NumMLDebugEXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMLDebugSearchEXT, sizeof(KBEMLDebugSearchEXT), KBEMLDebugReplaceEXT, 1);
     DBG_RT(Entry, "==> kernel Mountain Lion Debug: %d replaces done.\n", Num)
-  } else if (NumMLMav == 1) {
+  } else if (NumMLMavEXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMLMavSearchEXT, sizeof(KBEMLMavSearchEXT), KBEMLMavReplaceEXT, 1);
     DBG_RT(Entry, "==> kernel Mountain Lion/Mavericks: %d replaces done.\n", Num);
-  } else if (NumLion_X64 == 1) {
+  } else if (NumLion_X64_EXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_X64, sizeof(KBELionSearchEXT_X64), KBELionReplaceEXT_X64, 1);
     DBG_RT(Entry, "==> kernel Lion X64: %d replaces done.\n", Num);
-  } else if (NumSnow_X64 == 1) {
+  } else if (NumSnow_X64_EXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_X64, sizeof(KBESnowSearchEXT_X64), KBESnowReplaceEXT_X64, 1);
     DBG_RT(Entry, "==> kernel Snow Leopard X64: %d replaces done.\n", Num);
   // i386
-  } else if (NumLion_i386 == 1) {
+  } else if (NumLion_i386_EXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_i386, sizeof(KBELionSearchEXT_i386), KBELionReplaceEXT_i386, 1);
     DBG_RT(Entry, "==> kernel Lion i386: %d replaces done.\n", Num);
-  } else if (NumSnow_i386 == 1) {
+  } else if (NumSnow_i386_EXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_i386, sizeof(KBESnowSearchEXT_i386), KBESnowReplaceEXT_i386, 1);
     DBG_RT(Entry, "==> kernel Snow Leopard i386: %d replaces done.\n", Num);
   } else {

 

Here is the full kext_inject.c, if needed.

cleanup_kext_inject.zip

 

Thanks!

Share this post


Link to post
Share on other sites
44 minutes ago, PMheart said:

Hi again,

 

I have cleaned up kext_inject.c once more. (See here)

Now that a friend has confirmed that it did work, let me post the diff here.

...

Here is the full kext_inject.c, if needed.

cleanup_kext_inject.zip

Thanks once again, also tested on 10.11.6 (Normal) 10.13.6 (Recovery) and 10.14.4 for sure;

KextInject is working fine on my case yeiy..!!! 

Edited by Badruzeus

Share this post


Link to post
Share on other sites
1 hour ago, PMheart said:

Hi again,

 

I have cleaned up kext_inject.c once more. (See here)

Now that a friend has confirmed that it did work, let me post the diff here.

 


--- kext_inject_org.c	2019-01-25 10:20:46.000000000 +0800
+++ kext_inject_mod.c	2019-01-25 10:42:03.000000000 +0800
@@ -665,16 +665,30 @@
 UINT8   KBEMojaSearchEXT[]       = { 0xE8, 0xAF, 0x00, 0x00, 0x00, 0xEB, 0x05, 0xE8 };
 UINT8   KBEMojaReplaceEXT[]      = { 0xE8, 0xAF, 0x00, 0x00, 0x00, 0x90, 0x90, 0xE8 };
 
-// High Sierra/Mojave (SIP)
-// PMheart: checked KBEHighSie*SIP
+// High Sierra / Mojave 10.14 - 10.14.3 (SIP)
+// PMheart: for 10.14.4+, see KBEMoja4SearchSIP and KBEMoja4ReplaceSIP below
+// PMheart: checked KBEHighSieMoja3*SIP
 // Need to pair with KBEMoja*EXT
-UINT8   KBEHighSieMojaSearchSIP[]    = { 0xC3, 0x48, 0x85, 0xDB, 0x74, 0x69, 0x48, 0x8B, 0x03, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
-UINT8   KBEHighSieMojaReplaceSIP[]   = { 0xC3, 0x48, 0x85, 0xDB, 0xEB, 0x12, 0x48, 0x8B, 0x03, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
+UINT8   KBEHighSieMoja3SearchSIP[]    = { 0xC3, 0x48, 0x85, 0xDB, 0x74, 0x69, 0x48, 0x8B, 0x03, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
+UINT8   KBEHighSieMoja3ReplaceSIP[]   = { 0xC3, 0x48, 0x85, 0xDB, 0xEB, 0x12, 0x48, 0x8B, 0x03, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
 
+// Mojave 10.14.4+ (SIP)
+// PMheart: checked KBEMoja4*SIP
+// Need to pair with KBEMoja*EXT
+UINT8   KBEMoja4SearchSIP[]           = { 0x48, 0x85, 0xC0, 0x74, 0x6C, 0x48, 0x89, 0xC3, 0x48, 0x8B, 0x00, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
+UINT8   KBEMoja4ReplaceSIP[]          = { 0x48, 0x85, 0xC0, 0xEB, 0x15, 0x48, 0x89, 0xC3, 0x48, 0x8B, 0x00, 0x48, 0x89, 0xDF, 0xFF, 0x50, 0x28, 0x48 };
+
+// Mojave 10.14 - 10.14.3
 // Avoid race condition in OSKext::removeKextBootstrap when using booter kexts without keepsyms=1.
-UINT8   KBEMojaSearchKxldUnmap[]     = { 0x00, 0x0F, 0x85, 0xB2, 0x01, 0x00, 0x00, 0x48 };
-UINT8   KBEMojaReplaceKxldUnmap[]    = { 0x00, 0x90, 0xE9, 0xB2, 0x01, 0x00, 0x00, 0x48 };
+// by vit9696
+UINT8   KBEMoja3SearchKxldUnmap[]     = { 0x00, 0x0F, 0x85, 0xB2, 0x01, 0x00, 0x00, 0x48 };
+UINT8   KBEMoja3ReplaceKxldUnmap[]    = { 0x00, 0x90, 0xE9, 0xB2, 0x01, 0x00, 0x00, 0x48 };
 
+// Mojave 10.14.4+
+// Avoid race condition in OSKext::removeKextBootstrap when using booter kexts without keepsyms=1.
+// by PMheart, based on vit9696's work
+UINT8   KBEMoja4SearchKxldUnmap[]     = { 0x00, 0x0F, 0x85, 0xB1, 0x01, 0x00, 0x00, 0x48 };
+UINT8   KBEMoja4ReplaceKxldUnmap[]    = { 0x00, 0x90, 0xE9, 0xB1, 0x01, 0x00, 0x00, 0x48 };
 
 //
 // We can not rely on OSVersion global variable for OS version detection,
@@ -689,100 +703,114 @@
 VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
 {
   UINTN   Num = 0;
-  UINTN   NumSnow_i386 = 0;
-  UINTN   NumSnow_X64 = 0;
-  UINTN   NumLion_i386 = 0;
-  UINTN   NumLion_X64 = 0;
-  UINTN   NumMLMav = 0;
-  UINTN   NumMLDebug = 0;
-  UINTN   NumYos = 0;
-  UINTN   NumMavYosDebug = 0;
-  UINTN   NumEC = 0;
-  UINTN   NumECDebug = 0;
-  UINTN   NumSie = 0;
-  UINTN   NumSieDebug = 0;
-  UINTN   NumHighSieMoja = 0;
-  UINTN   NumMoja = 0;
+  UINTN   NumSnow_i386_EXT   = 0;
+  UINTN   NumSnow_X64_EXT    = 0;
+  UINTN   NumLion_i386_EXT   = 0;
+  UINTN   NumLion_X64_EXT    = 0;
+  UINTN   NumMLMavEXT        = 0;
+  UINTN   NumMLDebugEXT      = 0;
+  UINTN   NumYosEXT          = 0;
+  UINTN   NumMavYosDebugEXT  = 0;
+  UINTN   NumECSIP           = 0;
+  UINTN   NumECDebugSIP      = 0;
+  UINTN   NumSieSIP          = 0;
+  UINTN   NumSieDebugSIP     = 0;
+  UINTN   NumHighSieMoja3SIP = 0; // 10.13.X - 10.14.3
+  UINTN   NumMojaEXT         = 0; // 10.14.X
+  UINTN   NumMoja4SIP        = 0; // 10.14.4+
 
   
   DBG_RT(Entry, "\nPatching kernel for injected kexts...\n");
   
   if (is64BitKernel) {
-    NumSnow_X64    = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_X64, sizeof(KBESnowSearchEXT_X64));
-    NumLion_X64    = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_X64, sizeof(KBELionSearchEXT_X64));
-    NumMLMav       = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMLMavSearchEXT, sizeof(KBEMLMavSearchEXT));
-    //NumMLDebug     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMLDebugSearchEXT, sizeof(KBEMLDebugSearchEXT));
-    NumYos         = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT));
-    //NumMavYosDebug = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMavYosDebugSearchEXT, sizeof(KBEMavYosDebugSearchEXT));
-    NumEC          = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEECSearchSIP, sizeof(KBEECSearchSIP));
-    //NumECDebug     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEECDebugSearchSIP, sizeof(KBEECDebugSearchSIP));
-    NumSie         = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESieSearchSIP, sizeof(KBESieSearchSIP));
-    NumSieDebug    = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchSIP, sizeof(KBESieDebugSearchSIP));
-    NumHighSieMoja = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEHighSieMojaSearchSIP, sizeof(KBEHighSieMojaSearchSIP));
-    NumMoja        = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchEXT, sizeof(KBEMojaSearchEXT));
-  }
-  else {
-    NumSnow_i386 = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_i386, sizeof(KBESnowSearchEXT_i386));
-    NumLion_i386 = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_i386, sizeof(KBELionSearchEXT_i386));
+    NumSnow_X64_EXT     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_X64, sizeof(KBESnowSearchEXT_X64));
+    NumLion_X64_EXT     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_X64, sizeof(KBELionSearchEXT_X64));
+    NumMLMavEXT         = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMLMavSearchEXT, sizeof(KBEMLMavSearchEXT));
+    //NumMLDebugEXT     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMLDebugSearchEXT, sizeof(KBEMLDebugSearchEXT));
+    NumYosEXT           = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT));
+    //NumMavYosDebugEXT = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMavYosDebugSearchEXT, sizeof(KBEMavYosDebugSearchEXT));
+    NumECSIP            = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEECSearchSIP, sizeof(KBEECSearchSIP));
+    //NumECDebugSIP     = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEECDebugSearchSIP, sizeof(KBEECDebugSearchSIP));
+    NumSieSIP           = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESieSearchSIP, sizeof(KBESieSearchSIP));
+    NumSieDebugSIP      = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchSIP, sizeof(KBESieDebugSearchSIP));
+    NumHighSieMoja3SIP  = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEHighSieMoja3SearchSIP, sizeof(KBEHighSieMoja3SearchSIP));
+    NumMojaEXT          = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchEXT, sizeof(KBEMojaSearchEXT));   // general EXT patch, for all 10.14.x
+    NumMoja4SIP         = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBEMoja4SearchSIP, sizeof(KBEMoja4SearchSIP)); // SIP patch, ONLY for 10.14.4+
+  } else {
+    NumSnow_i386_EXT = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_i386, sizeof(KBESnowSearchEXT_i386));
+    NumLion_i386_EXT = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_i386, sizeof(KBELionSearchEXT_i386));
   }
   
-  if (NumSnow_i386 + NumSnow_X64 + NumLion_i386 + NumLion_X64 + NumMLMav > 1) {
+  if (NumSnow_i386_EXT + NumSnow_X64_EXT + NumLion_i386_EXT + NumLion_X64_EXT + NumMLMavEXT > 1) {
     // more then one pattern found - we do not know what to do with it
     // and we'll skipp it
-    AsciiPrint("\nERROR patching kernel for injected kexts:\nmultiple patterns found (Snowi386: %d, SnowX64: %d, Lioni386: %d, LionX64: %d, MLMav: %d) - skipping patching!\n", NumSnow_i386, NumSnow_X64, NumLion_i386, NumLion_X64, NumMLMav);
+    AsciiPrint("\nERROR patching kernel for injected kexts:\nmultiple patterns found (Snowi386: %d, SnowX64: %d, Lioni386: %d, LionX64: %d, MLMav: %d) - skipping patching!\n", NumSnow_i386_EXT, NumSnow_X64_EXT, NumLion_i386_EXT, NumLion_X64_EXT, NumMLMavEXT);
     gBS->Stall(10000000);
     return;
   }
   
   // X64
-  if (NumMoja == 1) {
-    Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchEXT, sizeof(KBEMojaSearchEXT), KBEMojaReplaceEXT, 1) +
-          SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEHighSieMojaSearchSIP, sizeof(KBEHighSieMojaSearchSIP), KBEHighSieMojaReplaceSIP, 1) +
-          SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchKxldUnmap, sizeof(KBEMojaSearchKxldUnmap), KBEMojaReplaceKxldUnmap, 1);
-    DBG_RT(Entry, "==> kernel Mojave: %d replaces done.\n", Num);
-  } else if (NumHighSieMoja == 1) {
+  if (NumMojaEXT == 1) {
+    // apply EXT patch first
+    Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMojaSearchEXT, sizeof(KBEMojaSearchEXT), KBEMojaReplaceEXT, 1);
+    // then apply corresponding patches based on what we found
+    if (NumMoja4SIP == 1) {
+      // firstly, try to patch 10.14.4+
+      Num += SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMoja4SearchSIP, sizeof(KBEMoja4SearchSIP), KBEMoja4ReplaceSIP, 1) +
+             SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMoja4SearchKxldUnmap, sizeof(KBEMoja4SearchKxldUnmap), KBEMoja4ReplaceKxldUnmap, 1);
+      DBG_RT(Entry, "==> kernel Mojave (10.14.4+): %d replaces done.\n", Num);
+    } else if (NumHighSieMoja3SIP == 1) {
+      // then 10.14 - 10.14.3
+      Num += SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEHighSieMoja3SearchSIP, sizeof(KBEHighSieMoja3SearchSIP), KBEHighSieMoja3ReplaceSIP, 1) +
+             SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMoja3SearchKxldUnmap, sizeof(KBEMoja3SearchKxldUnmap), KBEMoja3ReplaceKxldUnmap, 1);
+      DBG_RT(Entry, "==> kernel Mojave (10.14 - 10.14.3): %d replaces done.\n", Num);
+    } else {
+      // no SIP and KxldUnmap pattern found!
+      DBG_RT(Entry, "==> kernel Mojave WARNING: pattern NOT found - only %d replaces done.\nKext Injection will NOT work!\n", Num);
+    }
+  } else if (NumHighSieMoja3SIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT), KBEYosECSieHighReplaceEXT, 1) +
-          SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEHighSieMojaSearchSIP, sizeof(KBEHighSieMojaSearchSIP), KBEHighSieMojaReplaceSIP, 1);
+          SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEHighSieMoja3SearchSIP, sizeof(KBEHighSieMoja3SearchSIP), KBEHighSieMoja3ReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel High Sierra: %d replaces done.\n", Num);
-  } else if (NumSieDebug == 1) {
+  } else if (NumSieDebugSIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchEXT, sizeof(KBESieDebugSearchEXT), KBESieDebugReplaceEXT, 1) +
           SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchSIP, sizeof(KBESieDebugSearchSIP), KBESieDebugReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel Sierra Debug: %d replaces done.\n", Num);
-  } else if (NumSie == 1) {
+  } else if (NumSieSIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT), KBEYosECSieHighReplaceEXT, 1) +
           SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieSearchSIP, sizeof(KBESieSearchSIP), KBESieReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel Sierra: %d replaces done.\n", Num);
-  } else if (NumECDebug == 1) {
+  } else if (NumECDebugSIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEECDebugSearchEXT, sizeof(KBEECDebugSearchEXT), KBEECDebugReplaceEXT, 1) +
           SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEECDebugSearchSIP, sizeof(KBEECDebugSearchSIP), KBEECDebugReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel El Capitan Debug: %d replaces done.\n", Num);
-  } else if (NumEC == 1) {
+  } else if (NumECSIP == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT), KBEYosECSieHighReplaceEXT, 1) +
           SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEECSearchSIP, sizeof(KBEECSearchSIP), KBEECReplaceSIP, 1);
     DBG_RT(Entry, "==> kernel El Capitan: %d replaces done.\n", Num);
-  } else if (NumMavYosDebug == 1) {
+  } else if (NumMavYosDebugEXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMavYosDebugSearchEXT, sizeof(KBEMavYosDebugReplaceEXT), KBEMavYosDebugReplaceEXT, 1);
     DBG_RT(Entry, "==> kernel Yosemite Debug: %d replaces done.\n", Num);
-  } else if (NumYos == 1) {
+  } else if (NumYosEXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEYosECSieHighSearchEXT, sizeof(KBEYosECSieHighSearchEXT), KBEYosECSieHighReplaceEXT, 1);
     DBG_RT(Entry, "==> kernel Yosemite: %d replaces done.\n", Num);
-  } else if (NumMLDebug == 1) {
+  } else if (NumMLDebugEXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMLDebugSearchEXT, sizeof(KBEMLDebugSearchEXT), KBEMLDebugReplaceEXT, 1);
     DBG_RT(Entry, "==> kernel Mountain Lion Debug: %d replaces done.\n", Num)
-  } else if (NumMLMav == 1) {
+  } else if (NumMLMavEXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBEMLMavSearchEXT, sizeof(KBEMLMavSearchEXT), KBEMLMavReplaceEXT, 1);
     DBG_RT(Entry, "==> kernel Mountain Lion/Mavericks: %d replaces done.\n", Num);
-  } else if (NumLion_X64 == 1) {
+  } else if (NumLion_X64_EXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_X64, sizeof(KBELionSearchEXT_X64), KBELionReplaceEXT_X64, 1);
     DBG_RT(Entry, "==> kernel Lion X64: %d replaces done.\n", Num);
-  } else if (NumSnow_X64 == 1) {
+  } else if (NumSnow_X64_EXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_X64, sizeof(KBESnowSearchEXT_X64), KBESnowReplaceEXT_X64, 1);
     DBG_RT(Entry, "==> kernel Snow Leopard X64: %d replaces done.\n", Num);
   // i386
-  } else if (NumLion_i386 == 1) {
+  } else if (NumLion_i386_EXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_i386, sizeof(KBELionSearchEXT_i386), KBELionReplaceEXT_i386, 1);
     DBG_RT(Entry, "==> kernel Lion i386: %d replaces done.\n", Num);
-  } else if (NumSnow_i386 == 1) {
+  } else if (NumSnow_i386_EXT == 1) {
     Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_i386, sizeof(KBESnowSearchEXT_i386), KBESnowReplaceEXT_i386, 1);
     DBG_RT(Entry, "==> kernel Snow Leopard i386: %d replaces done.\n", Num);
   } else {

 

Here is the full kext_inject.c, if needed.

cleanup_kext_inject.zip

 

Thanks!

Thanks, committed to 4862

Share this post


Link to post
Share on other sites
8 hours ago, Slice said:

Is there anybody can propose a small C library to decode ogg sound files?

I think you can get some useful infos here and eventually the files here

 

hope it helps.

Share this post


Link to post
Share on other sites

Regarding the Chime sound in Clover.......It's great that it works.  And recompiling it at 48 Khz did make it sound better. 

 

But, are there any parameters I can use to set a time for it to chime?  Can I delay the chime with some parameter?

And if that capability exists, where would it be entered (and how?)

Share this post


Link to post
Share on other sites

Having freeze on wake issues since latest clover release. One more person on the German hackintosh-forum confirmed the issue so far. Anyone in here having the same problem?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   1 member

  • Similar Content

    • By Reel
      All work 10.10, 10.11, 10,12
      camera not work in 10.13, 10.14
      You need SwitchResX that the screen does not freeze
      Custom resolutions: Back porch - lines change to 2
      UEFI boot moded bios https://github.com/Thiblizz/l502x-modded-bios
       
      For 10.14 you need: HD3000 Fix for Mojave.zip
      Installed in S/L/E 
       
      SMBIOS: MacbookPro 8.3 or MacbookPro 9.1
       
       

       

       
       
    • By glasgood
      CLOVER DUAL BOOT MOJAVE & WINDOWS 10 GUIDE 
       

       
       
      INCLUDES  MBR / LEGACY BIOS  TO  GPT / EFI CONVERSION
      USING MBR2GPT TOOL
       
       
      PREREQUISITE: Two physical discs ( SSD’s or HDD’s )
       
       
       
       
       
      STEP 1 - Clover dual boot configuration 
       
      Open config.plist with Clover Configurator
       
      Boot
       Legacy = PBR Timeout = True ( will remove the Timeout countdown, from Clover boot menu)  

       
      GUI 
      Scan / Custom
       Entries = True  Tool = True  Legacy = False ( removes extra Windows 10 entries )  
      Hide Volume
      - Preboot ( macOS Preboot )
      - Recovery ( macOS Recovery )
       

       
      So at boot you will have two options: boot macOS Mojave or Windows 10 
       
       
       
       
       
       
       
      ————————————————————
       
       
      STEP 2 - Using a drive without Windows 10 installed
       
      Disconnect system drive that contains your macOS Mojave install from computer ( This is so that Windows does not overwrite existing macOS Mojave boot loader )
       
      Proceed with a Windows 10 UEFI install.  
      After installation reconnect macOS Mojave Drive, the Windows installation should now be detected and usable in Clover. 
      If Windows 10 is not detected or able to boot,  then verify you installed Windows 10 as UEFI and not MBR ---->  ( Read step 2 - For a drive with Windows 10 installed )
       
       
      OR
       
       
       
      STEP 2 - Using a drive with Windows 10 already installed
       
      Verify your Windows install is  GPT / UEFI or MBR / Legacy BIOS.   
      If Windows install is GPT UEFI then Windows 10 install is ready to use at Clover boot menu, you should be able to boot into Windows directly from Clover boot screen. 
       

       
       
      But if  Windows drive is detected at Clover boot screen, but when booting Windows you get a black screen with a cursor on the top left,
      then this is most likely because Windows drive is MBR ( Legacy BIOS ).  You can easily convert MBR to GPT using  Windows MBR2GPT tool ( this saves hours work having to reinstall Windows 10 and setting up all your applications again  ) 
       
      If Windows 10 install is MBR / Legacy BIOS  then simply convert to GPT / UEFI  following instructions below ( read video summary and view video )
       
       
      ** To use Windows 10  MBR2GPT tool  you must have Windows 10 version 1703 ( creators update  ) or later and less than 3 partitions on 
      the Windows 10 drive **
       
      Video summary:
       
      Confirm Windows 10 drive is MBR Legacy BIOS ( in Windows Disk Management ) Reboot into Windows PE ( Advanced Startup ) Convert from MBR Legacy BIOS to GPT UEFI ( using commands below ) mbr2gpt /validate mbr2gpt /convert Restart Verify Windows 10 drive has changed to GPT UEFI ( in Windows Disk Management )  
       
       
       
      After conversion Windows 10 is ready to use at the Clover boot menu 
       
       
    • By SepehrM
      I'm trying to install High Sierra 10.13.3 on an ASUS N552VW laptop, and I get stuck after this message:
      "could not recover SATA HDD after 5 attempts, terminating" 
      And some other warnings afterwards.
      Specs:
      CPU: Intel Skylake 6700HQ 2.6GHz
      RAM: 16GB DDR4
      2TB HDD + 128GB SSD
      GPU: Intel HD Graphics 530 + Nvidia GTX960m
      I'm installing using a 16GB USB3 flash drive on one of HDD volumes (UEFI Mode)
       
      I uploaded the verbose log and clover config.plist
      config-new.plist

    • By RougeOne
      Budget Workstation MacOS 10.14.1 build: z370 AORUS Gaming 5 - i5-8600K - RX 580 - UHD 630
      flawless iGPU/dGPU integration, fast FCPX editing/rendering, great overall performance for ~$1200 / ~£1000
       
      Update: updated WhateverGreen and Lilu, then updated OS to 10.14.3 and everything is fine! Even iMessage, which previously I hadn't been able to make work, is now working - possibly the update flushed the NVRAM?
       
      I'm gonna come straight out and admit it - I used newb tools which are considered taboo on InsanelyMac, and so this isn't so much an installation guide as it is a green flag to anyone considering the same hardware. My first and previous Hackintosh project was just over ten years ago and this site was massively helpful, so this is my (very small) way of giving back.
       
      EFI DIRECTORY
      http://s000.tinyupload.com/index.php?file_id=97606131925137056003
       
      HARDWARE
      CPU: Intel i5-8600K 3.6GHz hexacore (contains UHD 630 iGPU)
      CPU Cooler: be quiet! Pure Rock Slim (no paste needed, and fan facing front)
      Mobo: GIGABYTE z370 AORUS Gaming 5 (WIFI)
      RAM: 1x 8GB CORSAIR Vengeance LPX C16 2666MHz (in first slot)
      GFX Card: Sapphire RX 580 NITRO+ SE
      SATA: used ports 0, 1, 3, 5 (HDD problems when connected to port 4)
      HDD: generic
      DVD Drive: generic
      PSU: EVGA 500W Semi Modular (but you should get 650W!)
      Case: CoolerMaster CM590 III
      Fans: 2x stock case fans (one sucky on front, one blowy on back), 3x be quiet! BL046 120mm fans (two blowy on top, one sucky on front). Airflow near-perfectly balanced.
       
      ADVICE
      With the Clover configuration, you want to pay close attention to all things relating to graphics. There are some specific settings for ACPI, Boot, Devices and Graphics which should be copied exactly in order to get the iGPU and dGPU to work in perfect harmony. For instance, make sure you use ig-platform-id 59120003 rather than 59120000 if you want FCPX to be usable. With the right settings, FCPX will not only run, but run flawlessly.
       
      I was not able to figure out how to make NVRAM/PRAM behave itself, and I got errors when I tried to issue relevant commands. As a result, I could not at first get iMessage to work properly. It worked once on my first installation attempt but not from subsequent attempts. This Clover configuration therefore has no consideration whatsoever toward iMessage reliability - however, iMessage ended up working somehow, anyway - I noticed it after I'd updated to 10.14.3 but this may just have been coincidence.
       
      Onboard WiFi does not work. There is no driver for it. I'm using wired ethernet to a bridge router as it was cheaper than getting a compatible PCI card.
       
      Audio is working well after I installed the z370 audio patch, then the ALC1220 codecs, then AppleALC.
       
      With kexts for generic 3rd party SATA and generic 3rd party eSATA, my HDDs and DVD drive work perfectly well.
       
      Sleep/Wake functions run perfectly. iCloud functions run perfectly. Shutdown leaves the mobo LEDs on, annoyingly.
       
      My USB 3 ports seem to suffer from low power output, and I don't know why.
       
      Overall, this system appears to run about as well under MacOS 10.14 Mojave as it does under Windows 7. I would solidly recommend this build to anyone looking to build a computer for workstation purposes, on a budget.
    • By JhonneR
      Good morning, everyone, I'm sorry if I was wrong in choosing the topic but I need help.
      I have found it extremely difficult to mount a Hackintosh in my acer.
      Setup;
      I5 2430m 2.4 6GB RAM
      Mobo P5we0 - Intel intel Graphics 3000
      At the moment I have not found out what my audio codecs are.
      but I'll leave the link on the motherboard.
      however, my real problem is several.
      I have already used the itakos image, I have already used several images that could be installed normally and that after installing the image I do not have internet via cable or wireless.
      And another, I already looked in other forums and I know that I will be called a donkey in the logical question but I have not been able to install the [url="http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/"]#####[/url] or clover to start from the Hard Disk, so I do not know what to do.At the moment I still do not know if there has already been someone who has already installed the High Sierra or just the Sierra in this notebook model and obtained permanent success.
      If anyone can help me, I'll be grateful.
      Installations without success, but with the system already installed in ACER;
      SIERRA
      HIGH SIERRA
      MOJAVE
      All with the same symptom. Starting only by the bootable USB stick and without internet connection via cable and wireless.
      Appreciate ! Acer 5750 Official Page
×