Fix AppleHDA patch crashing

This commit is contained in:
Mykola Grymalyuk
2021-03-27 10:05:01 -06:00
parent b227480e6c
commit c32a3d89e9
9 changed files with 9 additions and 303 deletions

View File

@@ -3,7 +3,10 @@
from __future__ import print_function
import subprocess, sys, time, platform
import subprocess
import sys
import time
import platform
from Resources import build, ModelArray, Constants, SysPatch, utilities, CliMenu
@@ -85,7 +88,6 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
- Khronokernel:\tWriting and maintaining this patcher
- DhinakG:\t\tWriting and maintaining this patcher
- Syncretic:\t\tAAAMouSSE and telemetrap
- Slice:\t\tVoodooHDA
- cdf:\t\tNightShiftEnabler"""]).start()
def PatchVolume(self):

View File

@@ -158,8 +158,8 @@ class PatchSysVolume:
# Start Patch engine
if self.model in ModelArray.LegacyAudio:
print("- Attempting AppleHDA Patch")
subprocess.run(f"sudo rm -R '{self.mount_extensions}/AppleHDA.kext'".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo cp -R '{self.constants.applehda_path}' '{self.mount_extensions}'".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo rm -R {self.mount_extensions}/AppleHDA.kext".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo cp -R {self.constants.applehda_path} {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
rebuild_required = True
if (self.model in ModelArray.LegacyGPU) and (Path(self.constants.hiddhack_path).exists()):
@@ -180,15 +180,15 @@ class PatchSysVolume:
print("- Creating backup snapshot of user data (This may take some time)")
subprocess.run("tmutil snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
print("- Reverting to last signed APFS snapshot")
subprocess.run(f"sudo bless --mount '{self.mount_location}' --bootefi --last-sealed-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo bless --mount {self.mount_location} --bootefi --last-sealed-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
def rebuild_snapshot(self):
input("Press [ENTER] to continue with cache rebuild")
print("- Rebuilding Kernel Cache (This may take some time)")
subprocess.run(f"sudo kmutil install --volume-root '{self.mount_location}' --update-all".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo kmutil install --volume-root {self.mount_location} --update-all".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
input("Press [ENTER] to continue with snapshotting")
print("- Creating new APFS snapshot")
subprocess.run(f"sudo bless --folder '{self.mount_location}/System/Library/CoreServices' --bootefi --create-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo bless --folder {self.mount_location}/System/Library/CoreServices --bootefi --create-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
def unmount_drive(self):
print("- Unmounting Root Volume (Don't worry if this fails)")

View File

@@ -10,8 +10,6 @@ This patcher is made of multiple external applications from different people and
* [CPUFriend](https://github.com/acidanthera/CPUFriend/blob/master/LICENSE)
* [RestrictEvents](https://github.com/acidanthera/RestrictEvents/blob/master/LICENSE.txt)
* [NightShiftEnabler](https://github.com/cdf/NightShiftEnabler/blob/master/LICENSE.txt)
* Public Domain
* [VoodooHDA](https://sourceforge.net/projects/voodoohda/)
* All rights reserved to respective authors
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) - Syncretic
* [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) - Syncretic

View File

@@ -1,148 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18A391024</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>AppleBCM5701Ethernet</string>
<key>CFBundleGetInfoString</key>
<string>Apple Broadcom 57XX Ethernet 10.3.5, Copyright 2002-2013 Apple Inc.</string>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.AppleBCM5701Ethernet</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AppleBCM5701Ethernet</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>10.3.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>10.3.5</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11O62d</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>10.15.6</string>
<key>DTSDKBuild</key>
<string>19G829</string>
<key>DTSDKName</key>
<string>macosx10.15internal</string>
<key>DTXcode</key>
<string>1140</string>
<key>DTXcodeBuild</key>
<string>11O62d</string>
<key>EXTMemorySupport</key>
<string></string>
<key>IOKitPersonalities</key>
<dict>
<key>PCI Matching</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.AppleBCM5701Ethernet</string>
<key>Configuration Data</key>
<dict>
<key>Batch_ARP_Enable</key>
<true/>
<key>EnableRxHwCksum</key>
<true/>
<key>EnableTxHwCksum</key>
<true/>
<key>JumboRcvThreshold</key>
<integer>5</integer>
<key>MTU</key>
<integer>9018</integer>
<key>PassUpCRC</key>
<false/>
<key>RxCoalescingTicks</key>
<integer>25</integer>
<key>RxCoalescingTicksDuringInt</key>
<integer>120</integer>
<key>RxJumboRcvBuffers</key>
<integer>128</integer>
<key>RxMaxCoalescedFrames</key>
<integer>15</integer>
<key>RxMaxCoalescedFramesDuringInt</key>
<integer>15</integer>
<key>RxStdRcvBuffers</key>
<integer>510</integer>
<key>StdRcvThreshold</key>
<integer>8</integer>
<key>TxCoalescingTicks</key>
<integer>150</integer>
<key>TxCoalescingTicksDuringInt</key>
<integer>150</integer>
<key>TxMaxCoalescedFrames</key>
<integer>64</integer>
<key>TxMaxCoalescedFramesDuringInt</key>
<integer>64</integer>
<key>TxPacketQueueSize</key>
<integer>1024</integer>
<key>TxSendBuffers</key>
<integer>500</integer>
<key>WOL</key>
<string>Enable</string>
</dict>
<key>IOClass</key>
<string>BCM5701Enet</string>
<key>IOMatchCategory</key>
<string>IODefaultMatchCategory</string>
<key>IONameMatch</key>
<array>
<string>pci14e4,1684</string>
<string>pci14e4,16b0</string>
<string>pci14e4,16b4</string>
<string>pci14e4,1682</string>
<string>pci14e4,1686</string>
</array>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOPlatformPanicAction</key>
<integer>89000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2002-2013 Apple Inc. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.driver.mDNSOffloadUserClient</key>
<string>1.0.0d6</string>
<key>com.apple.iokit.IOACPIFamily</key>
<string>1.2.0</string>
<key>com.apple.iokit.IOEthernetAVBController</key>
<string>1.0.3b2</string>
<key>com.apple.iokit.IONetworkingFamily</key>
<string>1.5.0</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>1.6</string>
<key>com.apple.kpi.bsd</key>
<string>8.0.0b2</string>
<key>com.apple.kpi.iokit</key>
<string>8.0.0b2</string>
<key>com.apple.kpi.libkern</key>
<string>8.0.0b2</string>
<key>com.apple.kpi.mach</key>
<string>8.0.0b2</string>
<key>com.apple.kpi.private</key>
<string>13.0.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Network-Root</string>
</dict>
</plist>

View File

@@ -1,128 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>version.plist</key>
<data>
V+EvCNOJrCzRE72b2VJVdH1Vjx4=
</data>
</dict>
<key>files2</key>
<dict>
<key>version.plist</key>
<dict>
<key>hash2</key>
<data>
PVjFit3cgKhkY9C6TjRWp4Pj7Y4iPCeP8elbAFMOPRc=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildAliasOf</key>
<string>AppleBroadcom570X</string>
<key>BuildVersion</key>
<string>113</string>
<key>CFBundleShortVersionString</key>
<string>10.3.5</string>
<key>CFBundleVersion</key>
<string>10.3.5</string>
<key>ProjectName</key>
<string>AppleBroadcom570X</string>
<key>SourceVersion</key>
<string>1067120002000000</string>
</dict>
</plist>

Binary file not shown.