mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 06:10:00 +10:00
utilities.py: Add Preboot UUID parsing
This commit is contained in:
@@ -451,6 +451,15 @@ def monitor_disk_output(disk):
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
def get_preboot_uuid() -> str:
|
||||||
|
"""
|
||||||
|
Get the UUID of the Preboot volume
|
||||||
|
"""
|
||||||
|
args = ["ioreg", "-a", "-n", "chosen", "-p", "IODeviceTree", "-r"]
|
||||||
|
output = plistlib.loads(subprocess.run(args, stdout=subprocess.PIPE).stdout)
|
||||||
|
return output[0]["apfs-preboot-uuid"].strip(b"\0").decode()
|
||||||
|
|
||||||
|
|
||||||
def block_os_updaters():
|
def block_os_updaters():
|
||||||
# Disables any processes that would be likely to mess with
|
# Disables any processes that would be likely to mess with
|
||||||
# the root volume while we're working with it.
|
# the root volume while we're working with it.
|
||||||
|
|||||||
Reference in New Issue
Block a user