Merge branch 'main' into sonoma-development

# Conflicts:
#	payloads/Kexts/Acidanthera/RestrictEvents-v1.1.2-DEBUG.zip
#	payloads/Kexts/Acidanthera/RestrictEvents-v1.1.2-RELEASE.zip
#	payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-Navi-DEBUG.zip
#	payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-Navi-RELEASE.zip
#	payloads/OpenCore/OpenCore-DEBUG.zip
#	payloads/OpenCore/OpenCore-RELEASE.zip
#	resources/constants.py
#	resources/wx_gui/gui_settings.py
This commit is contained in:
Mykola Grymalyuk
2023-08-18 10:36:42 -06:00
13 changed files with 108 additions and 12 deletions

View File

@@ -43,7 +43,7 @@ class Constants:
self.featureunlock_version: str = "1.1.5" # FeatureUnlock
self.debugenhancer_version: str = "1.0.8" # DebugEnhancer
self.cpufriend_version: str = "1.2.7" # CPUFriend
self.bluetool_version: str = "2.6.7" # BlueToolFixup (BrcmPatchRAM)
self.bluetool_version: str = "2.6.8" # BlueToolFixup (BrcmPatchRAM)
self.cslvfixup_version: str = "2.6.1" # CSLVFixup
self.autopkg_version: str = "1.0.3" # AutoPkgInstaller
self.cryptexfixup_version: str = "1.0.2" # CryptexFixup

View File

@@ -280,6 +280,8 @@ class PatchSysVolume:
if self.needs_kmutil_exemptions is True:
logging.info("Note: Apple will require you to open System Preferences -> Security to allow the new kernel extensions to be loaded")
self.constants.root_patcher_succeeded = True
return True
return False
def _rebuild_kernel_collection(self) -> bool:
@@ -418,9 +420,11 @@ class PatchSysVolume:
"""
Unmount root volume
"""
logging.info("- Unmounting Root Volume (Don't worry if this fails)")
utilities.elevated(["diskutil", "unmount", self.root_mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
if self.root_mount_path:
logging.info("- Unmounting Root Volume (Don't worry if this fails)")
utilities.elevated(["diskutil", "unmount", self.root_mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
else:
logging.info("- Skipping Root Volume unmount")
def _rebuild_dyld_shared_cache(self) -> None:

View File

@@ -4,8 +4,10 @@ import pprint
import logging
import py_sip_xnu
import subprocess
import os
from pathlib import Path
from resources.sys_patch.sys_patch import PatchSysVolume
from resources.wx_gui import (
gui_support,
@@ -806,6 +808,9 @@ class SettingsFrame(wx.Frame):
},
},
"Developer": {
"Validation": {
"type": "title",
},
"Install latest nightly build 🧪": {
"type": "button",
"function": self.on_nightly,
@@ -831,6 +836,28 @@ class SettingsFrame(wx.Frame):
"Export constants.py values to a txt file.",
],
},
"Developer Root Volume Patching": {
"type": "title",
},
"Mount Root Volume": {
"type": "button",
"function": self.on_mount_root_vol,
"description": [
"Life's too short to type 'sudo mount -o",
"nobrowse -t apfs /dev/diskXsY",
"/System/Volumes/Update/mnt1' every time.",
],
},
"wrap_around 2": {
"type": "wrap_around",
},
"Save Root Volume": {
"type": "button",
"function": self.on_bless_root_vol,
"description": [
"Rebuild kernel cache and bless snapshot 🙏",
],
},
},
}
@@ -1267,3 +1294,23 @@ Hardware Information:
def on_test_exception(self, event: wx.Event) -> None:
raise Exception("Test Exception")
def on_mount_root_vol(self, event: wx.Event) -> None:
if os.geteuid() != 0:
wx.MessageDialog(self.parent, "Please relaunch as Root to mount the Root Volume", "Error", wx.OK | wx.ICON_ERROR).ShowModal()
else:
#Don't need to pass model as we're bypassing all logic
if PatchSysVolume("",self.constants)._mount_root_vol() == True:
wx.MessageDialog(self.parent, "Root Volume Mounted, remember to fix permissions before saving the Root Volume", "Success", wx.OK | wx.ICON_INFORMATION).ShowModal()
else:
wx.MessageDialog(self.parent, "Root Volume Mount Failed, check terminal output", "Error", wx.OK | wx.ICON_ERROR).ShowModal()
def on_bless_root_vol(self, event: wx.Event) -> None:
if os.geteuid() != 0:
wx.MessageDialog(self.parent, "Please relaunch as Root to save changes", "Error", wx.OK | wx.ICON_ERROR).ShowModal()
else:
#Don't need to pass model as we're bypassing all logic
if PatchSysVolume("",self.constants)._rebuild_root_volume() == True:
wx.MessageDialog(self.parent, "Root Volume saved, please reboot to apply changes", "Success", wx.OK | wx.ICON_INFORMATION).ShowModal()
else:
wx.MessageDialog(self.parent, "Root Volume update Failed, check terminal output", "Error", wx.OK | wx.ICON_ERROR).ShowModal()