Skip to content

Commit c3fdd15

Browse files
committed
Fix SROS ver check
Wrong version types... Signed-off-by: Hector Martin <[email protected]>
1 parent 0f8b5da commit c3fdd15

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ def main(self):
849849

850850
hz = self.sysinfo.get_refresh_rate()
851851

852-
if split_ver(self.sysinfo.sros_full_ver) < split_ver(BUGGY_SFR_MIN):
852+
if split_ver(self.sysinfo.sros_ver) < split_ver(BUGGY_SFR_MIN):
853853
p_error("Mismatched System Firmware / System Recovery detected!")
854854
print()
855855
p_warning("You have a machine with a ProMotion display, with a System Firmware version")
@@ -880,6 +880,9 @@ def main(self):
880880
p_warning("DO NOT CHANGE THIS TO ANY OTHER MODE. Doing so would make your System RecoveryOS")
881881
p_warning("stop working, which is a very dangerous situation. This is a critical Apple bug.")
882882
print()
883+
p_warning("Please update to the next version of macOS as soon as it is available, which")
884+
p_warning("should roll forward to the next System RecoveryOS version and clear the danger.")
885+
print()
883886
p_warning("You may continue the install, but you MUST NOT change the refresh rate until")
884887
p_warning("Apple fixes this bug. Doing so would break your system. Proceed at your own")
885888
p_warning("risk.")

src/system.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def fetch(self):
8383
self.login_user = consoleuser
8484

8585
self.sros_full_ver = "0"
86+
self.sros_ver = None
87+
self.sros_build = None
8688

8789
base = "/System/Volumes/iSCPreboot/SystemRecovery"
8890
for p in os.listdir(base):
@@ -92,6 +94,7 @@ def fetch(self):
9294
continue
9395
if split_ver(v) > split_ver(self.sros_full_ver):
9496
self.sros_full_ver = v
97+
self.sros_ver, self.sros_build = self.get_version(os.path.join(base, p, "SystemVersion.plist"))
9598

9699
def get_nvram_data(self):
97100
nvram_data = subprocess.run(["nvram", "-p"],
@@ -146,7 +149,7 @@ def show(self):
146149
else:
147150
p_info(f" No Fallback System Firmware / rOS")
148151
p_info(f" SFR version: {col()}{self.sfr_full_ver}")
149-
p_info(f" SystemRecovery version: {col()}{self.sros_full_ver}")
152+
p_info(f" SystemRecovery version: {col()}{self.sros_full_ver} ({self.sros_ver} {self.sros_build})")
150153
p_info(f" Login user: {col()}{self.login_user}")
151154

152155
def get_child(self, obj, name):

0 commit comments

Comments
 (0)