Work around Codesigning killing binary

This commit is contained in:
Mykola Grymalyuk
2021-06-20 13:01:01 -06:00
parent cdc80ef550
commit 11df8195ce
2 changed files with 31 additions and 20 deletions

View File

@@ -5,9 +5,9 @@
# - Temporary Work-around: sudo bless --mount /System/Volumes/Update/mnt1 --bootefi --last-sealed-snapshot # - Temporary Work-around: sudo bless --mount /System/Volumes/Update/mnt1 --bootefi --last-sealed-snapshot
# - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/) # - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/)
import hashlib #import hashlib
import os import os
import requests #mport requests
import shutil import shutil
import subprocess import subprocess
import zipfile import zipfile
@@ -338,22 +338,35 @@ class PatchSysVolume:
print("- Removing old Apple Binaries zip") print("- Removing old Apple Binaries zip")
Path(self.constants.payload_apple_root_path_zip).unlink() Path(self.constants.payload_apple_root_path_zip).unlink()
response = requests.get(link, stream=True) Utilities.cls()
with self.constants.payload_apple_root_path_zip.open("wb") as file: print("- Downloading Apple binaries")
count = 0 popen_oclp = subprocess.Popen(
for chunk in response.iter_content(1024 * 1024 * 4): ["curl", "-S", "-L", link, "--output", self.constants.payload_apple_root_path_zip],
file.write(chunk) stdin=subprocess.PIPE,
count += len(chunk) stdout=subprocess.PIPE,
Utilities.cls() stderr=subprocess.STDOUT,
print(f"- Downloading Apple binaries ({os_ver}) from PatcherSupportPkg") universal_newlines=True,
print(f"- {count / 1024 / 1024}MB Downloaded") )
checksum = hashlib.sha256() for stdout_line in iter(popen_oclp.stdout.readline, ""):
with self.constants.payload_apple_root_path_zip.open("rb") as file: print(stdout_line, end="")
chunk = file.read(1024 * 1024 * 16) popen_oclp.stdout.close()
while chunk:
checksum.update(chunk) #response = requests.get(link, stream=True)
chunk = file.read(1024 * 1024 * 16) #with self.constants.payload_apple_root_path_zip.open("wb") as file:
print(f"- Checksum: {checksum.hexdigest()}") # count = 0
# for chunk in response.iter_content(1024 * 1024 * 4):
# file.write(chunk)
# count += len(chunk)
# Utilities.cls()
# print(f"- Downloading Apple binaries ({os_ver}) from PatcherSupportPkg")
# print(f"- {count / 1024 / 1024}MB Downloaded")
#checksum = hashlib.sha256()
#with self.constants.payload_apple_root_path_zip.open("rb") as file:
# chunk = file.read(1024 * 1024 * 16)
# while chunk:
# checksum.update(chunk)
# chunk = file.read(1024 * 1024 * 16)
#print(f"- Checksum: {checksum.hexdigest()}")
if self.constants.payload_apple_root_path_zip.exists(): if self.constants.payload_apple_root_path_zip.exists():
print("- Download completed") print("- Download completed")
print("- Unzipping download...") print("- Unzipping download...")

View File

@@ -1231,8 +1231,6 @@
</dict> </dict>
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key> <key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<dict> <dict>
<key>SystemAudioVolume</key>
<data>Rg==</data>
<key>boot-args</key> <key>boot-args</key>
<string>keepsyms=1 debug=0x100 -lilubetaall</string> <string>keepsyms=1 debug=0x100 -lilubetaall</string>
<key>csr-active-config</key> <key>csr-active-config</key>