Skip to content

Commit cf3a1e4

Browse files
committed
kern_start: Add Big Sur+ support for Install.app usage
1 parent 3d94105 commit cf3a1e4

2 files changed

Lines changed: 24 additions & 17 deletions

File tree

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ CryptexFixup Changelog
22
======================
33
#### v1.0.0
44
- Initial release
5+
6+
#### v1.0.1
7+
- Allow in-OS Install macOS.app usage on Big Sur and newer

CryptexFixup/kern_start.cpp

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -102,23 +102,27 @@ static void pluginStart() {
102102
}
103103
}
104104

105-
// Userspace Patcher (ramrod)
106-
lilu.onPatcherLoadForce([](void *user, KernelPatcher &patcher) {
107-
KernelPatcher::RouteRequest csRoute = KernelPatcher::RouteRequest("_cs_validate_page", patched_cs_validate_page, orig_cs_validate);
108-
if (!patcher.routeMultipleLong(KernelPatcher::KernelID, &csRoute, 1))
109-
SYSLOG(MODULE_SHORT, "failed to route cs validation pages");
110-
});
111-
105+
// Userspace Patcher (ramrod)
106+
// Support Big Sur and newer for in-place Install macOS.app usage
107+
if (getKernelVersion() >= KernelVersion::BigSur) {
108+
lilu.onPatcherLoadForce([](void *user, KernelPatcher &patcher) {
109+
KernelPatcher::RouteRequest csRoute = KernelPatcher::RouteRequest("_cs_validate_page", patched_cs_validate_page, orig_cs_validate);
110+
if (!patcher.routeMultipleLong(KernelPatcher::KernelID, &csRoute, 1))
111+
SYSLOG(MODULE_SHORT, "failed to route cs validation pages");
112+
});
113+
}
114+
112115
// Kernel Space Patcher (APFS.kext)
113-
if (checkKernelArgument("-crypt_allow_hash_validation")) {
114-
SYSLOG(MODULE_SHORT, "disabling APFS.kext patching upon user request");
115-
} else {
116-
lilu.onKextLoadForce(kextList, arrsize(kextList),
117-
[](void *user, KernelPatcher &patcher, size_t index, mach_vm_address_t address, size_t size) {
118-
processKext(patcher, index, address, size);
119-
}, nullptr);
120-
}
121-
116+
if (getKernelVersion() >= KernelVersion::Ventura) {
117+
if (checkKernelArgument("-crypt_allow_hash_validation")) {
118+
SYSLOG(MODULE_SHORT, "disabling APFS.kext patching upon user request");
119+
} else {
120+
lilu.onKextLoadForce(kextList, arrsize(kextList),
121+
[](void *user, KernelPatcher &patcher, size_t index, mach_vm_address_t address, size_t size) {
122+
processKext(patcher, index, address, size);
123+
}, nullptr);
124+
}
125+
}
122126
}
123127

124128
// Boot args.
@@ -143,7 +147,7 @@ PluginConfiguration ADDPR(config) {
143147
arrsize(bootargDebug),
144148
bootargBeta,
145149
arrsize(bootargBeta),
146-
KernelVersion::Ventura,
150+
KernelVersion::BigSur,
147151
KernelVersion::Ventura,
148152
pluginStart
149153
};

0 commit comments

Comments
 (0)