mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 22:50:51 +10:00
Merge branch 'main' into main
This commit is contained in:
@@ -126,7 +126,7 @@ body:
|
||||
id: used-forums
|
||||
attributes:
|
||||
label: Have you already verified this is a patcher bug and not a macOS bug/user error on our discord servers?
|
||||
description: If no, please do not use issues for this. We'd appreciate it if users check discuss with others before filing. Issues are for valid patcher issues only, not for personal troubleshooting scessions.
|
||||
description: If no, please do not use issues for this. We'd appreciate it if users check discuss with others before filing. Issues are for valid patcher issues only, not for personal troubleshooting secessions.
|
||||
multiple: true
|
||||
options:
|
||||
- 'true'
|
||||
|
||||
@@ -40,7 +40,7 @@ class create_binary:
|
||||
|
||||
def parse_arguments(self):
|
||||
parser = argparse.ArgumentParser(description='Builds OpenCore-Patcher binary')
|
||||
parser.add_argument('--build_tui', action='store_true', help='Builds TUI binary, if ommited GUI binary is built')
|
||||
parser.add_argument('--build_tui', action='store_true', help='Builds TUI binary, if omitted GUI binary is built')
|
||||
parser.add_argument('--branch', type=str, help='Git branch name')
|
||||
parser.add_argument('--commit', type=str, help='Git commit URL')
|
||||
parser.add_argument('--commit_date', type=str, help='Git commit date')
|
||||
@@ -56,7 +56,7 @@ class create_binary:
|
||||
# macOS (using Python installed by homebrew (e.g. brew))
|
||||
if f"/usr/local/opt/python@3." in sys.executable:
|
||||
print(f"\t* NOTE: home(brew) python3 detected; using (sys.exec_prefix, python_path) ==> {sys.exec_prefix, python_path}")
|
||||
# - under brew, pip3 will install pyinstall at:
|
||||
# - under brew, pip3 will install pyinstaller at:
|
||||
# /usr/local/lib/python3.9/site-packages/pyinstaller
|
||||
# and /usr/local/bin/pyinstaller stub to load and run.
|
||||
|
||||
@@ -77,7 +77,7 @@ class create_binary:
|
||||
self.download_resources()
|
||||
if not self.args.build_tui:
|
||||
# payloads.dmg is only needed for GUI builds
|
||||
self.generate_paylods_dmg()
|
||||
self.generate_payloads_dmg()
|
||||
|
||||
def postflight_processes(self):
|
||||
print("- Starting postflight processes")
|
||||
@@ -174,7 +174,7 @@ class create_binary:
|
||||
print(mv_output.stderr.decode('utf-8'))
|
||||
raise Exception("Move failed")
|
||||
|
||||
def generate_paylods_dmg(self):
|
||||
def generate_payloads_dmg(self):
|
||||
if Path("./payloads.dmg").exists():
|
||||
if self.args.reset_binaries:
|
||||
print(" - Removing old payloads.dmg")
|
||||
|
||||
+1
-1
@@ -271,7 +271,7 @@
|
||||
- Allow for setting custom SIP values via TUI
|
||||
- Drop `CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE` requirement for root patching
|
||||
- Lowers default SIP Disabled value to 0xA03
|
||||
- Update Legacy GMUX patchset to latest Sierra Secuirty Update
|
||||
- Update Legacy GMUX patchset to latest Sierra security Update
|
||||
- [Source](https://github.com/HackintoshHD/mbp5x-instant-gpu-switching)
|
||||
- Fix non-Metal acceleration crashing on 12.0.1
|
||||
- Yes Apple adding a notch broke our accel patches
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Mirrors of Apple's InstallAssistant.ppkg
|
||||
# Mirrors of Apple's InstallAssistant.pkg
|
||||
# Currently only listing important Installers no longer on Apple's servers
|
||||
|
||||
Install_macOS_Big_Sur_11_2_3 = {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Array of Device IDs for different devices
|
||||
class nvidia_ids:
|
||||
# Courteous of envytools as well as Macrumors:
|
||||
# Courteous of envytools as well as MacRumors:
|
||||
# https://envytools.readthedocs.io/en/latest/hw/pciid.html
|
||||
# https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/
|
||||
# https://pci-ids.ucw.cz/read/PC/10de
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# OpenCore Legacy Patcher Licence
|
||||
# OpenCore Legacy Patcher License
|
||||
|
||||
This patcher is made of multiple external applications from different people and organizations. See each program for their licensing:
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
* Models: 2008 and older Marvel Ethernet require
|
||||
* CatalinaBCM5701Ethernet
|
||||
* Reason: Inject old Broadcom Ethernet kext to resolve networking in Big Sur
|
||||
* Logic: Patch out conflicting symbols to not colide existing BCM5701Ethernet
|
||||
* Logic: Patch out conflicting symbols to not collide existing BCM5701Ethernet
|
||||
* Models: 2011 and older Broadcom Ethernet require
|
||||
|
||||
### Maps
|
||||
@@ -217,11 +217,11 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
|
||||
* IO80211HighSierra
|
||||
* Reason: Re-inject Atheros wifi drivers from High Sierra
|
||||
* Logic: Patch out conflicting symbols to not colide existing IO80211Family
|
||||
* Logic: Patch out conflicting symbols to not collide existing IO80211Family
|
||||
* Models: Atheros cards
|
||||
* IO80211Mojave
|
||||
* Reason: Re-inject Broadcom wifi drivers from Mojave
|
||||
* Logic: Patch out conflicting symbols to not colide existing IO80211Family
|
||||
* Logic: Patch out conflicting symbols to not collide existing IO80211Family
|
||||
* Models: BCM94322
|
||||
|
||||
### Misc
|
||||
|
||||
+2
-2
@@ -16,14 +16,14 @@ Term | Description
|
||||
--- | ---
|
||||
**OpenCore** | The new hotness on the scene, made with security in mind by the [Acidanthera team](https://github.com/acidanthera), has faster booting and lighter weight than previous boot managers. Supports many native Mac features such as SIP, FileVault, Secure Boot, etc
|
||||
**ACPI** | Tables defined in your firmware defining your hardware and different methods, tied directly to how IOKit/IOService handles device setup
|
||||
**NVRAM** | Non-volitile storage, where many variables are stored including default boot options, Hibernation keys, Secure Boot information, etc
|
||||
**NVRAM** | Non-volatile storage, where many variables are stored including default boot options, Hibernation keys, Secure Boot information, etc
|
||||
---
|
||||
Term | Description
|
||||
--- | ---
|
||||
**XNU** | Also known as **X** is **N**ot **U**nix, XNU is referred to as macOS's "kernel" and the heart of what makes macOS tick
|
||||
**Kexts** | Also known as **K**ernel **Ext**ensions, are macOS's drivers. They're used to perform different tasks like device drivers or for a different purpose (in this patcher) like patching the OS, injecting information or running tasks.
|
||||
**KernelCollection** | Also known as the ImmutableKernel and PrelinkedKernel, this is a bundle of the kernel(XNU) and kernel extensions(Kexts) that we use to boot macOS. This is also what OpenCore patches in memory to allow us to have a seamless experience <br/>- PrelinkedKernel: Default caching system since 10.7 <br/>- ImmutableKernel: Secure Boot based caching system since 10.13 <br/>- KernelCollection: Merge of both Prelinked and ImmutableKernel's since macOS 11, Big Sur
|
||||
**IOKit** | Backbone of how Kernel Extentions (Kexts) probe and attach onto hardware, starts quickly after kernel initates
|
||||
**IOKit** | Backbone of how Kernel Extensions (Kexts) probe and attach onto hardware, starts quickly after kernel initiates
|
||||
**WindowServer** | Backbone of the GUI interface in macOS, one of the first userfacing userspace programs to kick-in
|
||||
**OTA** | Short for **O**ver **T**he **A**ir, refers to native OS updates via System Preferences like a supported Mac
|
||||
**DELTA** | Often used with OTA, refers to OS updates that much smaller than full installers (generally ~3GB), note Deltas require the root volume to be unmodified otherwise ~12GB updates will occur.
|
||||
|
||||
@@ -4,6 +4,6 @@ import subprocess
|
||||
for i in [i for i in list(Path().resolve().glob("**/*.md")) if "node_modules" not in str(i.parent) and "_book" not in str(i.parent)]:
|
||||
#bert = subprocess.run(['npx', 'markdown-link-check', '"' + str(i) + '"', '-c', '.markdownlinkcheck.json'], capture_output=True, shell=True, cwd=Path().resolve())
|
||||
bert = subprocess.run('npx markdown-link-check "' + str(i) + '"', stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, cwd=Path().resolve())
|
||||
outpot = bert.stdout.decode().replace("\r", "").split("\n")
|
||||
outpot = [i for i in outpot if ("FILE: " in i or " → Status: " in i) and " → Status: 429" not in i]
|
||||
[print(i) for i in outpot]
|
||||
output = bert.stdout.decode().replace("\r", "").split("\n")
|
||||
output = [i for i in output if ("FILE: " in i or " → Status: " in i) and " → Status: 429" not in i]
|
||||
[print(i) for i in output]
|
||||
+2
-2
@@ -2961,9 +2961,9 @@ class wx_python_gui:
|
||||
self.configure_sip_title.SetFont(wx.Font(18, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
|
||||
self.configure_sip_title.Center(wx.HORIZONTAL)
|
||||
|
||||
# Label: Flip indivdual bits corresponding to XNU's csr.h
|
||||
# Label: Flip individual bits corresponding to XNU's csr.h
|
||||
# If you're unfamiliar with how SIP works, do not touch this menu
|
||||
self.sip_label = wx.StaticText(self.frame_modal, label="Flip indivdual bits corresponding to")
|
||||
self.sip_label = wx.StaticText(self.frame_modal, label="Flip individual bits corresponding to")
|
||||
self.sip_label.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
|
||||
self.sip_label.SetPosition(
|
||||
wx.Point(-1, self.configure_sip_title.GetPosition().y + self.configure_sip_title.GetSize().height + 10)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* Disable the non-existant Co-processor Bridge found on Arrandale, Lynnfield and Clarkdale Macs.
|
||||
/* Disable the non-existent Co-processor Bridge found on Arrandale, Lynnfield and Clarkdale Macs.
|
||||
* IOPCIFamily in macOS 11.0 up-to 11.2 was unable to handle ACPI probing when device was not present,
|
||||
* therefore kernel panicing the machine.
|
||||
* therefore kernel panicking the machine.
|
||||
*
|
||||
* This SSDT reports the device as disabled avoiding the probing.
|
||||
* Not required for macOS 11.2 and newer, however recommended to alliviate pottential issues
|
||||
* Not required for macOS 11.2 and newer, however recommended to alleviate potential issues
|
||||
*/
|
||||
DefinitionBlock ("", "SSDT", 2, "DRTNIA", "CPBGoff", 0x00001000)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* hardware modifications.
|
||||
*
|
||||
* Notes:
|
||||
* - SSDT must be used in conjuction with '_INI' to 'XINI' patch
|
||||
* - SSDT must be used in conjunction with '_INI' to 'XINI' patch
|
||||
* to reroute PCI0 initialization.
|
||||
*
|
||||
* - AMD drivers in macOS may still attempt to attach and kernel
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Removes PCI0's 32-bit Allocation Limitation to resolve PCIe device support on Sandy and
|
||||
* Ivy Bridge Macs, mainly applicable for Audio and eGPU support.
|
||||
* BUF0 to BUF1 patch required to override exisiting BuffObj in DSDT.
|
||||
* BUF0 to BUF1 patch required to override existing BuffObj in DSDT.
|
||||
*
|
||||
* Source:
|
||||
* https://egpu.io/forums/pc-setup/fix-dsdt-override-to-correct-error-12/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Simple script to delete unnessary files from OpenCore and move into place
|
||||
# Simple script to delete unnecessary files from OpenCore and move into place
|
||||
# To use, simply :
|
||||
# - Download an OpenCore build
|
||||
# - Place the X64 folder in the /payloads/OpenCore folder
|
||||
|
||||
+4
-4
@@ -1019,7 +1019,7 @@ class BuildOpenCore:
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -revasset"
|
||||
if self.get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False:
|
||||
# Ensure this is done at the end so all previous RestrictEvents patches are applied
|
||||
# RestrictEvents and EFICheckDisabler will confilict if both are injected
|
||||
# RestrictEvents and EFICheckDisabler will conflict if both are injected
|
||||
self.enable_kext("EFICheckDisabler.kext", self.constants.restrictevents_version, self.constants.efi_disabler_path)
|
||||
if self.constants.set_vmm_cpuid is True:
|
||||
# Should be unneeded with our sysctl VMM patch, however for reference purposes we'll leave it here
|
||||
@@ -1161,8 +1161,8 @@ class BuildOpenCore:
|
||||
minimal_serial_patch(self)
|
||||
else:
|
||||
# Update DataHub to resolve Lilu Race Condition
|
||||
# macOS Monterey will somtimes not present the boardIdentifier in the DeviceTree on UEFI 1.2 or older Mac,
|
||||
# Thus resulting in an infitinte loop as Lilu tries to request the Board ID
|
||||
# macOS Monterey will sometimes not present the boardIdentifier in the DeviceTree on UEFI 1.2 or older Mac,
|
||||
# Thus resulting in an infinite loop as Lilu tries to request the Board ID
|
||||
# To resolve this, set PlatformInfo -> DataHub -> BoardProduct and enable UpdateDataHub
|
||||
|
||||
# Note 1: Only apply if system is UEFI 1.2, this is generally Ivy Bridge and older, excluding MacPro6,1
|
||||
@@ -1339,7 +1339,7 @@ class BuildOpenCore:
|
||||
def sign_files(self):
|
||||
if self.constants.vault is True:
|
||||
if utilities.check_command_line_tools() is True:
|
||||
# sign.command checks for the existance of '/usr/bin/strings' however does not verify whether it's executable
|
||||
# sign.command checks for the existence of '/usr/bin/strings' however does not verify whether it's executable
|
||||
# sign.command will continue to run and create an unbootable OpenCore.efi due to the missing strings binary
|
||||
# macOS has dummy binaries that just reroute to the actual binaries after you install Xcode's Command Line Tools
|
||||
print("- Vaulting EFI")
|
||||
|
||||
@@ -171,7 +171,7 @@ Note: For security reasons, OpenShell will be disabled when Vault is set.
|
||||
utilities.cls()
|
||||
utilities.header(["Set System Integrity protection"])
|
||||
print(
|
||||
f"""SIP is used to ensure proper secuirty measures are set,
|
||||
f"""SIP is used to ensure proper security measures are set,
|
||||
however to patch the root volume this must be lowered partially.
|
||||
Only disable is absolutely necessary. SIP value = 0x802
|
||||
|
||||
@@ -553,7 +553,7 @@ be prepared if enabling.
|
||||
Some 2013-14 MacBook Pro's have issues with the built-in thunderbolt,
|
||||
resulting in kernel panics and random shutdowns.
|
||||
|
||||
To alliviate, you can disable the thunderbolt controller on MacBookPro11,x
|
||||
To alleviate, you can disable the thunderbolt controller on MacBookPro11,x
|
||||
machines with this option.
|
||||
|
||||
Note: This option only works on MacBookPro11,x, file an issue if you know of
|
||||
@@ -650,7 +650,7 @@ for Windows may prefer to only work with the dGPU and eGPU active.
|
||||
else:
|
||||
self.dGPU_switch_support()
|
||||
|
||||
def set_3rd_party_drices(self):
|
||||
def set_3rd_party_drives(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set enhanced 3rd Party SSD Support"])
|
||||
print(
|
||||
@@ -671,7 +671,7 @@ TRIM is not ideal.
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.set_3rd_party_drices()
|
||||
self.set_3rd_party_drives()
|
||||
|
||||
def set_software_demux(self):
|
||||
utilities.cls()
|
||||
@@ -795,7 +795,7 @@ Flipping this setting will disable automatic loading of additional drives in
|
||||
OpenCore's boot menu other than what was booted.
|
||||
|
||||
Note: This option should only be flipped under the following circumstances:
|
||||
- You are experincing wake failures from hibernation
|
||||
- You are experiencing wake failures from hibernation
|
||||
- You are only using 1 disk in your system for booting (ie. no RAID)
|
||||
- OpenCore is installed on the same disk as the OS
|
||||
- Your system has an Intel iGPU and Nvidia dGPU
|
||||
@@ -1156,7 +1156,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
[f"Disable Battery Throttling:\tCurrently {self.constants.disable_msr_power_ctl}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_battery_throttle],
|
||||
[f"Disable XCPM:\t\tCurrently {self.constants.disable_xcpm}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_xcpm],
|
||||
[f"Set Software Demux:\tCurrently {self.constants.software_demux}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_software_demux],
|
||||
[f"Set 3rd Party SSD Support:\tCurrently {self.constants.allow_3rd_party_drives}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_3rd_party_drices],
|
||||
[f"Set 3rd Party SSD Support:\tCurrently {self.constants.allow_3rd_party_drives}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_3rd_party_drives],
|
||||
[f"Set FeatureUnlock: \tCurrently {self.constants.fu_status}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_fu_settings],
|
||||
[f"Set NVRAM Write:\t\tCurrently {self.constants.nvram_write}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_nvram_write],
|
||||
[f"Set Content Caching:\tCurrently {self.constants.set_content_caching}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_cc_support],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Alternative to Apple's 'defaults' tool
|
||||
# Store data in '/Users/Shared'
|
||||
# This is to ensure compatibility when running wihout a user
|
||||
# This is to ensure compatibility when running without a user
|
||||
# ie. during automated patching
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Installation of OpenCore files to ESP
|
||||
# Usage soley for TUI
|
||||
# Usage solely for TUI
|
||||
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
import plistlib
|
||||
|
||||
@@ -345,7 +345,7 @@ def generate_installer_creation_script(tmp_location, installer_path, disk):
|
||||
# Goals:
|
||||
# - Format provided disk as HFS+ GPT
|
||||
# - Run createinstallmedia on provided disk
|
||||
# Implemnting this into a single installer.sh script allows us to only call
|
||||
# Implementing this into a single installer.sh script allows us to only call
|
||||
# OCLP-Helper once to avoid nagging the user about permissions
|
||||
|
||||
additional_args = ""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Reoute binaries to tmp directory, and mount a disk image of the payloads
|
||||
# Reroute binaries to tmp directory, and mount a disk image of the payloads
|
||||
# Implements a shadowfile to avoid direct writes to the dmg
|
||||
# Copyright (C) 2022, Mykola Grymalyuk
|
||||
|
||||
@@ -46,7 +46,7 @@ class reroute_payloads:
|
||||
def unmount_active_dmgs(self, unmount_all_active=True):
|
||||
# Find all DMGs that are mounted, and forcefully unmount them
|
||||
# If our disk image was previously mounted, we need to unmount it to use again
|
||||
# This can happen if we crash during a previous scession, however 'atexit' class should hopefully avoid this
|
||||
# This can happen if we crash during a previous secession, however 'atexit' class should hopefully avoid this
|
||||
dmg_info = subprocess.run(["hdiutil", "info", "-plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
dmg_info = plistlib.loads(dmg_info.stdout)
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ class PatchSysVolume:
|
||||
elif Path(source_folder + "/" + file_name_str).is_dir():
|
||||
# Applicable for .kext, .app, .plugin, .bundle, all of which are directories
|
||||
if Path(destination_folder + "/" + file_name).exists():
|
||||
print(f" - Found existing {file_name}, overwritting...")
|
||||
print(f" - Found existing {file_name}, overwriting...")
|
||||
utilities.process_status(utilities.elevated(["rm", "-R", f"{destination_folder}/{file_name}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
else:
|
||||
print(f" - Installing: {file_name}")
|
||||
@@ -313,7 +313,7 @@ class PatchSysVolume:
|
||||
else:
|
||||
# Assume it's an individual file, replace as normal
|
||||
if Path(destination_folder + "/" + file_name).exists():
|
||||
print(f" - Found existing {file_name}, overwritting...")
|
||||
print(f" - Found existing {file_name}, overwriting...")
|
||||
utilities.process_status(utilities.elevated(["rm", f"{destination_folder}/{file_name}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
else:
|
||||
print(f" - Installing: {file_name}")
|
||||
|
||||
@@ -193,7 +193,7 @@ class AutomaticSysPatch:
|
||||
utilities.process_status(utilities.elevated(["cp", "-R", path, "/Library/Application Support/Dortania/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
if not Path("/Library/Application Support/Dortania/OpenCore-Patcher.app").exists():
|
||||
# Sometimes the binary the user launches maye have a suffix (ie. OpenCore-Patcher 3.app)
|
||||
# Sometimes the binary the user launches may have a suffix (ie. OpenCore-Patcher 3.app)
|
||||
# We'll want to rename it to OpenCore-Patcher.app
|
||||
path = path.split("/")[-1]
|
||||
print(f"- Renaming {path} to OpenCore-Patcher.app")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymaluk
|
||||
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
|
||||
from resources import utilities
|
||||
|
||||
class TUIMenu:
|
||||
|
||||
@@ -62,7 +62,7 @@ class check_binary_updates:
|
||||
# print("- Network connection functional")
|
||||
response = requests.get(self.binary_url)
|
||||
data_set = response.json()
|
||||
# print("- Retrived latest version data")
|
||||
# print("- Retrieved latest version data")
|
||||
self.remote_version = data_set["tag_name"]
|
||||
# print(f"- Latest version: {self.remote_version}")
|
||||
self.remote_version_array = self.remote_version.split(".")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymaluk
|
||||
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
import hashlib
|
||||
import math
|
||||
@@ -254,7 +254,7 @@ def check_secure_boot_level():
|
||||
#
|
||||
# Genuine Mac logic:
|
||||
# - On genuine non-T2 Macs, they always return 0
|
||||
# - T2 Macs will return based on their Starup Policy (Full(2), Medium(1), Disabled(0))
|
||||
# - T2 Macs will return based on their Startup Policy (Full(2), Medium(1), Disabled(0))
|
||||
# Ref: https://support.apple.com/en-us/HT208198
|
||||
if check_ap_security_policy() != 0:
|
||||
return True
|
||||
@@ -602,7 +602,7 @@ def check_boot_mode():
|
||||
return sys_plist[0]["_items"][0]["boot_mode"]
|
||||
|
||||
def elevated(*args, **kwargs) -> subprocess.CompletedProcess:
|
||||
# When runnign through our GUI, we run as root, however we do not get uid 0
|
||||
# When running through our GUI, we run as root, however we do not get uid 0
|
||||
# Best to assume CLI is running as root
|
||||
if os.getuid() == 0 or check_cli_args() is not None:
|
||||
return subprocess.run(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user