Floris497 / mac-pixel-clock-patch-V2

994 stars 221 forks source link

MacBook Pro 13 2017 Mac OS 12.4 (Monterey) doesn't find CoreDisplay #381

Open AndreyLalin opened 2 years ago

AndreyLalin commented 2 years ago

I've seen this issue for quite a while, but still couldn't figure out how to fix this on Mac OS Monterey:

Can't open /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay: No such file or directory. touch: /System/Library/Extensions: Read-only file system Re-signing /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay: No such file or directory Closing...

Also tried to run with md5:

(base) lalin@MacBook-Pro ~ % /Users/lalin/Desktop/CoreDisplay-patcher.command md5 md5: /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay: No such file or directory error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay (No such file or directory) ---- BEGINNING MD5 HASH SUMS ---- version: 12.4 build:21F79

error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay (No such file or directory) otool CoreDisplay: d41d8cd98f00b204e9800998ecf8427e otool CoreDisplay.bak: NO FILE (this is okay) md5: /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay: No such file or directory CoreDisplay: CoreDisplay.bak: NO FILE (this is okay)

---- ENDING MD5 HASH SUMS -------

It just doesn't find the required Folder

Does anyone know how to fix this issue?

moosethegoose2213 commented 2 years ago

In macOS Big Sur and newer, binaries (including CoreDisplay) are no longer on-disk - but rather are within the dyld cache. This means that the only way to obtain CoreDisplay in order to patch it would be to download a full macOS installer, extract the Ramdisk, and pull CoreDisplay from there. On top of that, in order to modify files on the system volume, you now need to handle snapshot extractions. This effectively makes automating these patches in macOS 11+ impossible (specifically the lack of binaries being on-disk - snapshotting is very easy to implement), as you have no binary available to the end user.

augustelemoine commented 2 years ago

Thank you for the explaination. Would it be any help about snapshot extractions and a way to put Coredisplay at the right place so that the patch could run correctly ?