This script helps you fix a broken screencapture on an OCLP-patched MacBookPro8,1 (and probably some other systems around 2011 as well). See my blog for why this script was created.
- macOS Sequoia (15.7.4 - 15.7.7) installed on a MacBook Pro (Model ID MacBookPro8,1) using OCLP 2.4.1
- a clean
screencapturebinary from macOS Sequoia 15.7.4 or later - this script
Tip
When booted into a macOS installer or Recovery Mode, you can access the screencapture binary via the Terminal, often located at /Volumes/Macintosh\ HD/usr/sbin/screencapture if the main drive is mounted, or by copying it from a running system.
Download the screencapture-fix.sh file from GitHub to a folder of your choice.
Shortcut:
% curl -Ls https://bit.ly/screencapture-fix > screencapture-fix.sh
Caution
Use at your own risk.
This script modifies system files located in /usr/sbin/. While this fix has been tested on MacBookPro8,1 running macOS Sequoia via OCLP, always ensure you have a current backup of your data before modifying system-level binaries. The author is not responsible for any system instability or data loss.
To fix a broken screencapture on an OCLP patched MacBookPro8,1 simply run
% sudo ./screencapture-fix.sh
The script replaces /usr/sbin/screencapture with the binary located in the same folder as the script.
Reapplying OCLP root patches in the future will likely overwrite the fix.
Run the script as often as needed.
You can also append the screencapture binary to the script as its payload to make a single file.
% cat ./screencapture-fix.sh ./screencapture > ./screencapture-fix-with-payload.sh
If you run screencapture-fix-with-payload.sh, the script extracts its payload and saves screencapture if it is not found in the script's working directory.
Warning
You should not publish the script with an embedded screencapture binary because that would violate Apple's license terms.
The screencapture binary is the same from macOS 15.7.4 to 15.7.7.
Yes, just boot from the volume that you want to patch. The script identifies the booted one.