Skip to content

Instantly share code, notes, and snippets.

@jericane1
Forked from naveenkrdy/AdobeAMDFix.md
Last active October 29, 2022 05:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jericane1/20f0504cd20dcc1b4be37f0bf8118096 to your computer and use it in GitHub Desktop.
Save jericane1/20f0504cd20dcc1b4be37f0bf8118096 to your computer and use it in GitHub Desktop.
To fix Adobe products crashes on AMD hackintosh (Version 2021)

Adobe Crash Fix for AMD

Instructions

  1. Install needed Adobe apps from Adobe Creative Cloud.

  2. Patch Adobe Zii

  3. Open Terminal.

  4. Copy-paste the below command to your terminal and run it (enter password if asked).

files_list=(MMXCore FastCore TextModel libiomp5.dylib)
lib_dir="${HOME}/Documents/AdobeLibs"
lib1_file="${lib_dir}/libiomp5.dylib"
lib1_link="https://raw.githubusercontent.com/jericane1/Adobe-AMD-Fix/main/libiomp5.dylib"

for file in $files_list; do
    find /Applications/Adobe* -type f -name $file | while read -r curr_file; do
        name=$(basename $curr_file)
        sw_vers -productVersion | grep "11" >/dev/null 2>&1
        [[ $? ]] && [[ $name =~ ^(MMXCore|FastCore)$ ]] && continue
        echo "found $curr_file"
        sudo -v
        [[ ! -f ${curr_file}.back ]] && sudo cp -f $curr_file ${curr_file}.back || sudo cp -f ${curr_file}.back $curr_file
        if [[ $name == "libiomp5.dylib" ]]; then
            [[ ! -d $lib_dir ]] && mkdir $lib_dir
            [[ ! -f $lib1_file ]] && cd $lib_dir && curl -sO $lib1_link
            adobelib_dir=$(dirname "$curr_file")
            echo -n "replacing " && sudo cp -vf $lib1_file $adobelib_dir
        elif [[ $name == "TextModel" ]]; then
            echo "emptying $curr_file"
            sudo echo -n >$curr_file
        else
            echo "patching $curr_file"
            sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' $curr_file
            sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' $curr_file
        fi
    done
done
  1. Now copy-paste the below command to terminal and run it (enter password if asked).
agent_dir="${HOME}/Library/LaunchAgents"
env_file="${agent_dir}/environment.plist"
lib_dir="${HOME}/Documents/AdobeLibs"
lib2_file="${lib_dir}/libintelfake.dylib"
lib2_link="https://raw.githubusercontent.com/jericane1/Adobe-AMD-Fix/main/libfakeintel.dylib"

sw_vers -productVersion | grep "11" >/dev/null 2>&1
if [[ $? ]]; then
    [[ ! -d $lib_dir ]] && mkdir $lib_dir
    [[ ! -f $lib2_file ]] && cd $lib_dir && curl -sO $lib2_link
    env="launchctl setenv DYLD_INSERT_LIBRARIES $lib2_file"
else
    mkl_value=$(
        sysctl -n machdep.cpu.brand_string | grep FX >/dev/null 2>&1
        echo $(($? != 0 ? 5 : 4))
    )
    env="launchctl setenv MKL_DEBUG_CPU_TYPE $mkl_value"
fi

[[ ! -d $agent_dir ]] && mkdir $agent_dir
cat >$env_file <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>Label</key>
 <string>mkl-debug</string>
 <key>ProgramArguments</key>
 <array>
 <string>sh</string>
 <string>-c</string>
    <string>$env;</string>
 </array>
 <key>RunAtLoad</key>
 <true/>
</dict>
</plist>
EOF

launchctl load ${AGENT} >/dev/null 2>&1
launchctl start ${AGENT} >/dev/null 2>&1
  1. Now copy-paste the below command to terminal and run it (enter password if asked). Need xcode-select —install or Command Line Tools for Xcode.
sudo codesign -fs - /Applications/Adobe*/Adobe*.app
    • For Illustrator, copy-paste the below command to your terminal and run it (enter password if asked) : :
sudo rm -rf /Applications/Adobe\ Illustrator\ 2021/Adobe\ Illustrator\ 2021.app/Contents/Required/Plug-ins/Text\ Filters/TextModel.aip
  • If Photoshop crashes while selecting font, copy-paste the below command to your terminal and run it (enter password if asked) :
sudo find /Applications/Adobe* -name "Deep_Font" -exec rm -r {} +
sudo rm -r /Applications/Adobe\ Photoshop\ 2020/Adobe\ Photoshop\ 2020.app/Contents/Required/Sensei_Models/Deep_Font
sudo rm -r /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Required/Sensei_Models/Deep_Font
  1. Reboot macOS.

Revert Instructions

  • To revert run the following command as required.
    • To revert step-3
files_list=(MMXCore FastCore TextModel libiomp5.dylib)
for file in $files_list; do
    find /Applications/Adobe* -type f -name $file | while read -r curr_file; do
        sudo -v
        [[ -f ${curr_file}.back ]] && echo "Restoring backup $curr_file"&& sudo mv -f ${curr_file}.back $curr_file
    done
done
  • To revert step-4
agent_dir="${HOME}/Library/LaunchAgents"
env_file="${agent_dir}/environment.plist"
if [[ -f $env_file ]]; then
    echo "Deleting $env_file"
    launchctl unload ${env_file} >/dev/null 2>&1
    launchctl stop ${env_file} >/dev/null 2>&1
    rm -rf $env_file
fi
  1. Reboot macOS

Application tested

Update on 02/10/2021

Adobe products Version Works ? M1 ? (armv8) Comments
After Effects 2021 v18.2.1 No patch Works, no additional command lines.
After Effects 2021 v18.4 No patch Works, no additional command lines.
🆕 After Effects 2021 v18.4.1 No patch Works, no additional command lines.
Animate 2021 v21.0.6 No patch Works, but Adobe ID ask login & password.
Animate 2021 v21.0.7 No patch Works, but Adobe ID ask login & password.
🆕 Animate 2021 v21.0.8 & v21.0.9 No patch Works, but Adobe ID ask login & password.
Audition 2021 v14.1 No patch Works, no additional command lines.
Audition 2021 v14.2 No patch Works, no additional command lines.
Audition 2021 v14.4 Apple Sillicon M1 works ; No patch Works, no additional command lines.
Bridge 2021 v11.0.1 + CR 13.1 Works.
Bridge 2021 v11.0.2 + CR 13.2 Zii problem ! On ignition, not start. Maybe it's Zii 6.1.0 rubbish ? With Adobe Creative Cloud, works perfectly.
Bridge 2021 v11.1 + CR 13.3 Works. (Bridge & Camera Raw)
🆕 Bridge 2021 v11.1.1 + CR 13.4 No works, blocking to Adobe !
Character Animator 2020 v4.0 No patch Works.
Character Animator 2021 v4.2 No patch Works.
Character Animator 2021 v4.4 Apple Sillicon M1 works Works.
Dimension v3.4.1 Works.
Dimension v3.4.2 Works.
Dimension v3.4.3 Works.
Dreamweaver 2020 v20.2.1 Works.
Dreamweaver 2021 v21.1 Works.
Illustrator 2021 v25.2.0 Illustrator works well but the Zii 6.x patch (with Big Sur) is really screwing up ... the application crashes right away. The Zii 6.x patch needs updating.
Illustrator 2021 v25.3 Apple Sillicon M1 works Works, no additional command lines.
Illustrator 2021 v25.3.1 Apple Sillicon M1 works Works, no additional command lines.
Illustrator 2021 v25.4 Apple Sillicon M1 works Works, no additional command lines.
🆕 Illustrator 2021 v25.4.1 Apple Sillicon M1 works Works, no additional command lines.
InCopy 2021 v16.1 Works perfectly, no additional command lines.
InCopy 2021 v16.2 Works perfectly, no additional command lines.
InCopy 2021 v16.3.1 Works perfectly, no additional command lines.
🆕 InCopy 2021 v16.4 Works perfectly, no additional command lines.
InDesign Server 2021 v16.2.1 Apple Sillicon M1 works. Not works, need to Adobe ID !
🆕 InDesign Server 2021 v16.4 Apple Sillicon M1 works. Not works, need to Adobe ID !
InDesign 2021 v16.3.1 Works perfectly, no additional command lines.
InDesign 2021 v16.3.2 Works perfectly, no additional command lines.
🆕 InDesign 2021 v16.4 Works perfectly, no additional command lines.
Lightroom Classic v10.1 Works but you absolutely Block Little Snitch or LuLu.
Lightroom Classic v10.1.1 Works you absolutely Block Little Snitch or LuLu.
Lightroom Classic v10.2 ⁉️ Works perfectly, but Camera Raw doesn't work. Perhaps Zii do not work, we do not know ! Block Little Snitch or LuLu.
Lightroom Classic v10.3 ⁉️ Apple Sillicon M1 works Works perfectly, but Camera Raw doesn't work. Perhaps Zii do not work, we do not know ! Block Little Snitch or LuLu..
🆕 Lightroom Classic v10.4 ⁉️ Apple Sillicon M1 works Works perfectly, but Camera Raw doesn't work. Perhaps Zii do not work, we do not know ! Block Little Snitch or LuLu..
Media Encoder 2021 v15.1 No patch Works perfectly, no additional command lines.
Media Encoder 2021 v15.2 No patch Works perfectly, no additional command lines.
Media Encoder 2021 v15.4 Apple Sillicon M1 works ; No patch Works perfectly, no additional command lines.
🆕 Media Encoder 2021 v15.4.1 Apple Sillicon M1 works ; No patch Works perfectly, no additional command lines.
Photoshop 2020 v21.2.3, v21.2.5, v21.2.10 Works.
Photoshop 2021 v22.0, v22.4.2 ⁉️ Apple Sillicon M1 works ; Zii doesn't work. In addition, Intel inevitably works (Catalina, Big Sur, Monterey, etc.) and AMD (Ryzen, Threadripper) is failing at full speed! (nonstop crash) Works ... but it crashes all the time. We need to do more research for a patch. No patch Intel CPU : Works a charm. AMD CPU : Launch properly but crash all times.
🆕 Photoshop 2021 v22.4.3, v22.5, v22.5.1 ⁉️ Apple Sillicon M1 works ; Works, but when brushing or texting, no problem but when filters are put there, it crashes !
Prelude 2020 v9.0.3 Works.
Prelude 2021 v10.0 No patch Works.
Prelude 2021 v10.1 No patch Works.
Premiere Pro 2021 v15.1 No patch Works perfectly, no additional command lines.
Premiere Pro 2021 v15.2 No patch Works perfectly, no additional command lines.
Premiere Pro 2021 v15.4 Apple Sillicon M1 works Works perfectly, no additional command lines.
🆕 Premiere Pro 2021 v15.4.1 Apple Sillicon M1 works Works perfectly, no additional command lines.
Premiere Rush v1.5.54 No patch Works.
Premiere Rush v1.5.58 No patch Works.
Premiere Rush v1.5.61 No patch Works.
Substance 3D Designer v11.2 No patch Works.
Substance 3D Designer v11.2.1 No patch Works.
Substance 3D Painter v7.2 Crash !
Substance 3D Painter v7.2.1 Crash !
Substance 3D Painter v7.2.2 Crash !
🆕 Substance 3D Painter v7.2.3 Crash !
Substance 3D Sampler v3.0 No patch Works.
Substance 3D Sampler v3.0.1 No patch Works.
Substance 3D Stager v1.0, v1.0.1 Problem Zii : Copy the "vcontrol.bundle" in Zii 6.1.3 to the desktop:Zii\ 2021\ 6.1.3.app/Contents/Resources/vcontrol.bundle Then rename it AdobeBIB.framework and replace it in /Applications/Adobe\ Substance\ 3D\ Stager/Adobe\ Substance\ 3D\ Stager.app/Contents/Frameworks/.
XD v41.0.12 Block Little Snitch or LuLu. Works, no additional command lines.
XD v41.1.12 Block Little Snitch or LuLu. Works, no additional command lines.
XD v42.0.22 Apple Sillicon M1 works ; Block Little Snitch or LuLu. Works, no additional command lines.
🆕 XD v44.0.12 Apple Sillicon M1 works ; Block Little Snitch or LuLu. Works, no additional command lines.

Maybe the others need to be well controlled to be sure. Comments should help me! Thank you !

Notes

  • If you re-install any Adobe app then you will need redo the STEP-4 again.
@stockhuman
Copy link

Hey, just want to let you know that the following version of Substance Painter works well by patching libtbbmalloc as follows:

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00\x00\x00\x59\xC3|\x90\x90\x90\x90\x56\xE8\x0A\x00\x00\x00\x59\xC3|sg' /{your Substance Install ...}/libtbbmalloc.dylib

Screen Shot 2022-03-26 at 3 04 16 PM

@inseyven
Copy link

inseyven commented May 8, 2022

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00\x00\x00\x59\xC3|\x90\x90\x90\x90\x56\xE8\x0A\x00\x00\x00\x59\xC3|sg' /Applications/Adobe\ Substance\ 3D\ Painter.app/Contents/Frameworks/libtbbmalloc.dylib

This is the fix for Substance Painter if it's installed in Applications folder. (7.4.2)

@inseyven
Copy link

inseyven commented May 9, 2022

Hey, just want to let you know that the following version of Substance Painter works well by patching libtbbmalloc as follows:

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00\x00\x00\x59\xC3|\x90\x90\x90\x90\x56\xE8\x0A\x00\x00\x00\x59\xC3|sg' /{your Substance Install ...}/libtbbmalloc.dylib

Screen Shot 2022-03-26 at 3 04 16 PM

Mine is crashing when I try to bake materials. Any possible fix?

@jericane1
Copy link
Author

For inseyven,

It has changed a lot with Intel MKL Library via AMD Ryzen.
You have to compile in python3 AMDFriend: https://github.com/NyaomiDEV/AMDFriend
Then in the Terminal do: sudo amdfriend --in-place --sign --directories /Applications/Adobe\ Substance\ 3D\ Painter.app

jericane1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment