Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tested on Catalina 10.15.4
#!/usr/bin/env bash
cpuname=$(sysctl -n machdep.cpu.brand_string)
# Patch Lightroom Classic first
sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x3A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' /Applications/Adobe\ Lightroom\ Classic/Adobe\ Lightroom\ Classic.app/Contents/Frameworks/CameraRaw.lrtoolkit/CameraRaw
sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Lightroom\ Classic/Adobe\ Lightroom\ Classic.app/Contents/Frameworks/CameraRaw.lrtoolkit/CameraRaw
# Patch MMXCore and FastCore instances in all other applications
find /Applications/Adobe* -type f -name "MMXCore" -print0 | sudo xargs -0 -I "{}" perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' "{}"
find /Applications/Adobe* -type f -name "MMXCore" -print0 | sudo xargs -0 -I "{}" perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' "{}"
find /Applications/Adobe* -type f -name "FastCore" -print0 | sudo xargs -0 -I "{}" perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' "{}"
find /Applications/Adobe* -type f -name "FastCore" -print0 | sudo xargs -0 -I "{}" perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' "{}"
#Patch Camera Raw
sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x3A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' /Library/Application\ Support/Adobe/Plug-Ins/CC/File\ Formats/Camera\ Raw.plugin/Contents/MacOS/Camera\ Raw
sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Library/Application\ Support/Adobe/Plug-Ins/CC/File\ Formats/Camera\ Raw.plugin/Contents/MacOS/Camera\ Raw
# Delete Camera Raw
#sudo rm -rf /Library/Application\ Support/Adobe/Plug-Ins/CC/File\ Formats/Camera\ Raw.plugin
# Photoshop and Illustrator specific fix
sudo rm -rf /Applications/Adobe\ Photoshop*/Adobe\ Photoshop*/Contents/Required/Deep_Font
sudo rm -rf /Applications/Adobe\ Illustrator*/Adobe\ Illustrator*/Contents/Required/Plug-ins/Text\ Filters/TextModel.aip
# Fix codesigning complaint (may break activation though)
sudo codesign -fs - /Applications/Adobe*/Adobe*.app
sudo codesign -fs - /Library/Application\ Support/Adobe/Plug-Ins/CC/File\ Formats/Camera\ Raw.plugin
# Generate environment variable plist from base64
echo "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHBsaXN0IFBVQkxJQyAiLS8vQXBwbGUvL0RURCBQTElTVCAxLjAvL0VOIiAiaHR0cDovL3d3dy5hcHBsZS5jb20vRFREcy9Qcm9wZXJ0eUxpc3QtMS4wLmR0ZCI+CjxwbGlzdCB2ZXJzaW9uPSIxLjAiPgo8ZGljdD4KIDxrZXk+TGFiZWw8L2tleT4KIDxzdHJpbmc+bXkuc3RhcnR1cDwvc3RyaW5nPgogPGtleT5Qcm9ncmFtQXJndW1lbnRzPC9rZXk+CiA8YXJyYXk+CiA8c3RyaW5nPnNoPC9zdHJpbmc+CiA8c3RyaW5nPi1jPC9zdHJpbmc+CiA8c3RyaW5nPmxhdW5jaGN0bCBzZXRlbnYgTUtMX0RFQlVHX0NQVV9UWVBFPTQ8L3N0cmluZz4KIDwvYXJyYXk+CiA8a2V5PlJ1bkF0TG9hZDwva2V5PgogPHRydWUvPgo8L2RpY3Q+CjwvcGxpc3Q+" | base64 --decode > onemomentplease.plist
# Upgrade version if necessary and copy to launchdaemons folder
if [[ $cpuname == *"Ryzen"* ]]; then
cat onemomentplease.plist | tr '4' '5' > onemomentplease2.plist
sudo cp onemomentplease2.plist /Library/LaunchDaemons/startupadobepatch.plist
else
sudo cp onemomentplease.plist /Library/LaunchDaemons/startupadobepatch.plist
fi
# Run for current instance
launchctl load /Library/LaunchDaemons/startupadobepatch.plist
launchctl start /Library/LaunchDaemons/startupadobepatch.plist
# Cleanup
rm onemomentplease*.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment