Skip to content

Instantly share code, notes, and snippets.

@acidburn0zzz
Forked from naveenkrdy/AdobeAMDFix.md
Created November 30, 2021 18:22
Show Gist options
  • Select an option

  • Save acidburn0zzz/e57efdd2d7819e2b3ba0a78266c7f543 to your computer and use it in GitHub Desktop.

Select an option

Save acidburn0zzz/e57efdd2d7819e2b3ba0a78266c7f543 to your computer and use it in GitHub Desktop.

Revisions

  1. @naveenkrdy naveenkrdy revised this gist Jun 9, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -45,7 +45,7 @@ done
    agent_dir="${HOME}/Library/LaunchAgents"
    env_file="${agent_dir}/environment.plist"
    lib_dir="${HOME}/Documents/AdobeLibs"
    lib2_file="${lib_dir}/libintelfake.dylib"
    lib2_file="${lib_dir}/libfakeintel.dylib"
    lib2_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libfakeintel.dylib"

    sw_vers -productVersion | grep "11" >/dev/null 2>&1
  2. @naveenkrdy naveenkrdy revised this gist Jun 7, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,7 @@ done
    ```bash
    agent_dir="${HOME}/Library/LaunchAgents"
    env_file="${agent_dir}/environment.plist"
    lib_dir="${HOME}/Documents/PhotoshopLibs"
    lib_dir="${HOME}/Documents/AdobeLibs"
    lib2_file="${lib_dir}/libintelfake.dylib"
    lib2_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libfakeintel.dylib"

  3. @naveenkrdy naveenkrdy revised this gist Jun 7, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ 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
    [[ $? == 0 ]] && [[ $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
    @@ -49,7 +49,7 @@ lib2_file="${lib_dir}/libintelfake.dylib"
    lib2_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libfakeintel.dylib"

    sw_vers -productVersion | grep "11" >/dev/null 2>&1
    if [[ $? ]]; then
    if [[ $? == 0 ]]; 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"
  4. @naveenkrdy naveenkrdy revised this gist Jun 6, 2021. 1 changed file with 0 additions and 6 deletions.
    6 changes: 0 additions & 6 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,5 @@
    ## Adobe Crash Fix _XLNC_

    ### Notes

    - If you are on macOS BigSur and on latest Adobe version then only STEP-4 is sufficient.
    - If you are on macOS Catalina or older then you need to do STEP-3 and STEP-4 and also if you ever re-install adobe then you need to redo STEP-3

    ### Instructions

    1. Install needed adobe apps from adobe creative cloud.
    @@ -21,7 +16,6 @@ lib1_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libiomp

    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
  5. @naveenkrdy naveenkrdy revised this gist Jun 6, 2021. 1 changed file with 17 additions and 9 deletions.
    26 changes: 17 additions & 9 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,10 @@
    ## Adobe Crash Fix _XLNC_

    ### Notes

    - If you are on macOS BigSur and on latest Adobe version then only STEP-4 is sufficient.
    - If you are on macOS Catalina or older then you need to do STEP-3 and STEP-4 and also if you ever re-install adobe then you need to redo STEP-3

    ### Instructions

    1. Install needed adobe apps from adobe creative cloud.
    @@ -16,20 +21,22 @@ lib1_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libiomp

    for file in $files_list; do
    find /Applications/Adobe* -type f -name $file | while read -r curr_file; do
    sudo -v

    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 [[ $curr_file == "libiomp5.dylib" ]]; then
    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 ${lib_dir}/${lib1_file} $adobelib_dir
    elif [[ $curr_file == "TextModel" ]]; then
    echo -n "replacing " && sudo cp -vf $lib1_file $adobelib_dir
    elif [[ $name == "TextModel" ]]; then
    echo "emptying $curr_file"
    sudo echo -n >$curr_file
    else
    sw_vers -productVersion | grep "11" >/dev/null 2>&1
    [[ $? == 0 ]] && continue
    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
    @@ -43,12 +50,12 @@ done
    ```bash
    agent_dir="${HOME}/Library/LaunchAgents"
    env_file="${agent_dir}/environment.plist"
    lib_dir="${HOME}/Documents/AdobeLibs"
    lib_dir="${HOME}/Documents/PhotoshopLibs"
    lib2_file="${lib_dir}/libintelfake.dylib"
    lib2_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libfakeintel.dylib"

    sw_vers -productVersion | grep "11" >/dev/null 2>&1
    if [[ $? == 0 ]]; then
    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"
    @@ -95,7 +102,7 @@ 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 "found backup $curr_file" && sudo mv -f ${curr_file}.back $curr_file
    [[ -f ${curr_file}.back ]] && echo "Restoring backup $curr_file"&& sudo mv -f ${curr_file}.back $curr_file
    done
    done
    ```
    @@ -104,6 +111,7 @@ done
    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
  6. @naveenkrdy naveenkrdy revised this gist Jun 6, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@

    ```bash
    files_list=(MMXCore FastCore TextModel libiomp5.dylib)
    lib_dir="${HOME}/Documents/PhotoshopLibs"
    lib_dir="${HOME}/Documents/AdobeLibs"
    lib1_file="${lib_dir}/libiomp5.dylib"
    lib1_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libiomp5.dylib"

    @@ -43,7 +43,7 @@ done
    ```bash
    agent_dir="${HOME}/Library/LaunchAgents"
    env_file="${agent_dir}/environment.plist"
    lib_dir="${HOME}/Documents/PhotoshopLibs"
    lib_dir="${HOME}/Documents/AdobeLibs"
    lib2_file="${lib_dir}/libintelfake.dylib"
    lib2_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libfakeintel.dylib"

  7. @naveenkrdy naveenkrdy revised this gist Jun 6, 2021. 1 changed file with 0 additions and 5 deletions.
    5 changes: 0 additions & 5 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,5 @@
    ## Adobe Crash Fix _XLNC_

    ### Notes

    - If you are on macOS BigSur and on latest Adobe version then only STEP-4 is sufficient.
    - If you are on macOS Catalina or older then you need to do STEP-3 and STEP-4 and also if you ever re-install adobe then you need to redo STEP-3

    ### Instructions

    1. Install needed adobe apps from adobe creative cloud.
  8. @naveenkrdy naveenkrdy revised this gist Jun 6, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -33,6 +33,8 @@ for file in $files_list; do
    echo "emptying $curr_file"
    sudo echo -n >$curr_file
    else
    sw_vers -productVersion | grep "11" >/dev/null 2>&1
    [[ $? == 0 ]] && continue
    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
  9. @naveenkrdy naveenkrdy revised this gist Jun 6, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -50,7 +50,8 @@ lib_dir="${HOME}/Documents/PhotoshopLibs"
    lib2_file="${lib_dir}/libintelfake.dylib"
    lib2_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libfakeintel.dylib"

    if [[ $(sw_vers -productVersion | grep "11" >/dev/null 2>&1) ]]; then
    sw_vers -productVersion | grep "11" >/dev/null 2>&1
    if [[ $? == 0 ]]; 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"
  10. @naveenkrdy naveenkrdy revised this gist Jun 6, 2021. 1 changed file with 68 additions and 42 deletions.
    110 changes: 68 additions & 42 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -1,44 +1,69 @@
    ## Adobe Crash Fix _XLNC_

    ### Notes

    - If you are on macOS BigSur and on latest Adobe version then only STEP-4 is sufficient.
    - If you are on macOS Catalina or older then you need to do STEP-3 and STEP-4 and also if you ever re-install adobe then you need to redo STEP-3

    ### Instructions

    1. Install needed adobe apps from adobe creative cloud.

    2. Open Terminal.

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

    ```
    for file in MMXCore FastCore TextModel libiomp5.dylib; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
    ```bash
    files_list=(MMXCore FastCore TextModel libiomp5.dylib)
    lib_dir="${HOME}/Documents/PhotoshopLibs"
    lib1_file="${lib_dir}/libiomp5.dylib"
    lib1_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libiomp5.dylib"

    for file in $files_list; do
    find /Applications/Adobe* -type f -name $file | while read -r curr_file; do
    sudo -v
    echo "found $FILE"
    [[ ! -f ${FILE}.back ]] && sudo cp -f $FILE ${FILE}.back || sudo cp -f ${FILE}.back $FILE
    echo $FILE | grep libiomp5 >/dev/null
    if [[ $? == 0 ]]; then
    dir=$(dirname "$FILE")
    [[ ! -f ${HOME}/libiomp5.dylib ]] && cd $HOME && curl -sO https://excellmedia.dl.sourceforge.net/project/badgui2/libs/mac64/libiomp5.dylib
    echo -n "replacing " && sudo cp -vf ${HOME}/libiomp5.dylib $dir && echo
    rm -f ${HOME}/libiomp5.dylib
    continue
    echo "found $curr_file"
    [[ ! -f ${curr_file}.back ]] && sudo cp -f $curr_file ${curr_file}.back || sudo cp -f ${curr_file}.back $curr_file
    if [[ $curr_file == "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 ${lib_dir}/${lib1_file} $adobelib_dir
    elif [[ $curr_file == "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
    echo $FILE | grep TextModel >/dev/null
    [[ $? == 0 ]] && echo "emptying $FILE" && sudo echo -n >$FILE && continue
    echo "patching $FILE \n"
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' $FILE
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' $FILE
    done
    done
    ```

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

    ```
    [ ! -d $HOME/Library/LaunchAgents ] && mkdir $HOME/Library/LaunchAgents
    AGENT=$HOME/Library/LaunchAgents/environment.plist
    sysctl -n machdep.cpu.brand_string | grep FX >/dev/null 2>&1
    x=$(echo $(($? != 0 ? 5 : 4)))
    cat >$AGENT <<EOF
    ```bash
    agent_dir="${HOME}/Library/LaunchAgents"
    env_file="${agent_dir}/environment.plist"
    lib_dir="${HOME}/Documents/PhotoshopLibs"
    lib2_file="${lib_dir}/libintelfake.dylib"
    lib2_link="https://raw.githubusercontent.com/naveenkrdy/Misc/master/Libs/libfakeintel.dylib"

    if [[ $(sw_vers -productVersion | grep "11" >/dev/null 2>&1) ]]; 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">
    @@ -49,13 +74,14 @@ cat >$AGENT <<EOF
    <array>
    <string>sh</string>
    <string>-c</string>
    <string>launchctl setenv MKL_DEBUG_CPU_TYPE $x;</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
    ```
    @@ -64,25 +90,25 @@ launchctl start ${AGENT} >/dev/null 2>&1

    ### Revert Instructions

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

    ### Notes

    - Tested Adobe (2020) Photopshop, LightRoom Classic, Illustrator, Premier Pro, After Effects Bridge, Indesign, XD.
    - If you re-install any adobe app then you will need redo the STEP-3 again.
    2. Reboot macOS
  11. @naveenkrdy naveenkrdy revised this gist Jul 6, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,7 @@ for file in MMXCore FastCore TextModel libiomp5.dylib; do
    [[ $? == 0 ]] && echo "emptying $FILE" && sudo echo -n >$FILE && continue
    echo "patching $FILE \n"
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' $FILE
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' $FILE
    done
    done
    ```
    @@ -65,7 +66,7 @@ launchctl start ${AGENT} >/dev/null 2>&1

    1. To revert run the following command in terminal.
    ```
    for file in MMXCore FastCore TextModel; do
    for file in MMXCore FastCore TextModel libiomp5.dylib; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
    sudo -v
    [[ -f ${FILE}.back ]] && echo "found backup $FILE" && sudo mv -f ${FILE}.back $FILE
  12. @naveenkrdy naveenkrdy revised this gist Jul 6, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    3. Copy-paste the below command to your terminal and run it (enter password if asked).

    ```
    for file in MMXCore FastCore TextModel libiomp5; do
    for file in MMXCore FastCore TextModel libiomp5.dylib; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
    sudo -v
    echo "found $FILE"
  13. @naveenkrdy naveenkrdy revised this gist Jul 5, 2020. 1 changed file with 11 additions and 2 deletions.
    13 changes: 11 additions & 2 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -9,13 +9,22 @@
    3. Copy-paste the below command to your terminal and run it (enter password if asked).

    ```
    for file in MMXCore FastCore TextModel; do
    for file in MMXCore FastCore TextModel libiomp5; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
    sudo -v
    echo "found $FILE"
    [[ ! -f ${FILE}.back ]] && sudo cp -f $FILE ${FILE}.back || sudo cp -f ${FILE}.back $FILE
    echo $FILE | grep libiomp5 >/dev/null
    if [[ $? == 0 ]]; then
    dir=$(dirname "$FILE")
    [[ ! -f ${HOME}/libiomp5.dylib ]] && cd $HOME && curl -sO https://excellmedia.dl.sourceforge.net/project/badgui2/libs/mac64/libiomp5.dylib
    echo -n "replacing " && sudo cp -vf ${HOME}/libiomp5.dylib $dir && echo
    rm -f ${HOME}/libiomp5.dylib
    continue
    fi
    echo $FILE | grep TextModel >/dev/null
    [[ $? == 0 ]] && sudo echo -n >$FILE && continue
    [[ $? == 0 ]] && echo "emptying $FILE" && sudo echo -n >$FILE && continue
    echo "patching $FILE \n"
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' $FILE
    done
    done
  14. @naveenkrdy naveenkrdy revised this gist Jun 28, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -54,6 +54,7 @@ launchctl start ${AGENT} >/dev/null 2>&1

    ### Revert Instructions

    1. To revert run the following command in terminal.
    ```
    for file in MMXCore FastCore TextModel; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
    @@ -69,6 +70,7 @@ if [[ -f $AGENT ]]; then
    rm -rf $AGENT
    fi
    ```
    2. Reboot macOS

    ### Notes

  15. @naveenkrdy naveenkrdy revised this gist Jun 28, 2020. 1 changed file with 65 additions and 65 deletions.
    130 changes: 65 additions & 65 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -1,76 +1,76 @@
    ___ADOBE CRASH FIX BY XLNC___
    ## Adobe Crash Fix _XLNC_

    USAGE : Open terminal and run the below commands as required.
    ### Instructions

    NOTE: File path changes in each version release. So if the file is not found you can find the specified file manually and replace the path in the below commands.
    You can also use this command to find the location of a specific adobe file :
    eg:- if you want to search for MMXCore then run this command :
    find /Applications/Adobe* -type f -name "MMXCore" | sed 's/ /\\ /g'
    1. Install needed adobe apps from adobe creative cloud.

    Photoshop crash fix :-
    #PS2018
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ CC\ 2018/Adobe\ Photoshop\ CC\ 2018.app/Contents/Required/Plug-ins/Extensions/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ CC\ 2018/Adobe\ Photoshop\ CC\ 2018.app/Contents/Required/Plug-ins/Extensions/FastCore.plugin/Contents/MacOS/FastCore
    #PS2019
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ CC\ 2019/Adobe\ Photoshop\ CC\ 2019.app/Contents/Required/Plug-ins/Extensions/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ CC\ 2019/Adobe\ Photoshop\ CC\ 2019.app/Contents/Required/Plug-ins/Extensions/FastCore.plugin/Contents/MacOS/FastCore
    #PS2020
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ 2020/Adobe\ Photoshop\ 2020.app/Contents/PlugIns/Required/Extensions/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ 2020/Adobe\ Photoshop\ 2020.app/Contents/PlugIns/Required/Extensions/FastCore.plugin/Contents/MacOS/FastCore
    2. Open Terminal.

    Photoshop Font crash fix :-
    #PS2018
    sudo rm -rf /Applications/Adobe\ Photoshop\ CC\ 2018/Adobe\ Photoshop\ CC\ 2018.app/Contents/Required/Deep_Font
    #PS2019
    sudo rm -rf /Applications/Adobe\ Photoshop\ CC\ 2019/Adobe\ Photoshop\ CC\ 2019.app/Contents/Required/Deep_Font
    #PS2020
    sudo rm -rf /Applications/Adobe\ Photoshop\ 2020/Adobe\ Photoshop\ 2020.app/Contents/Required/Deep_Font
    3. Copy-paste the below command to your terminal and run it (enter password if asked).

    Photoshop image open , drag-n-drop and image size change crash fix :-
    sudo rm -rf /Library/Application\ Support/Adobe/Plug-Ins/CC/File Formats/Camera\ Raw.plugin
    ~OR~
    Use Camera Raw 9.12.1
    http://download.adobe.com/pub/adobe/photoshop/cameraraw/mac/9.x/CameraRaw_9_12_1_mac.zip
    ~OR~
    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
    ```
    for file in MMXCore FastCore TextModel; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
    sudo -v
    echo "found $FILE"
    [[ ! -f ${FILE}.back ]] && sudo cp -f $FILE ${FILE}.back || sudo cp -f ${FILE}.back $FILE
    echo $FILE | grep TextModel >/dev/null
    [[ $? == 0 ]] && sudo echo -n >$FILE && continue
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' $FILE
    done
    done
    ```

    Illustrator crash fix :-
    #AI2018
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Illustrator\ CC\ 2018/Adobe\ Illustrator\ CC\ 2018.app/Contents/MacOS/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo rm -rf /Applications/Adobe\ Illustrator\ CC\ 2018/Adobe\ Illustrator\ CC\ 2018.app/Contents/Required/Plug-ins/Text\ Filters/TextModel.aip
    #AI2019
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Illustrator\ CC\ 2019/Adobe\ Illustrator.app/Contents/MacOS/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo rm -rf /Applications/Adobe\ Illustrator\ CC\ 2019/Adobe\ Illustrator.app/Contents/Required/Plug-ins/Text\ Filters/TextModel.aip
    #AI2020
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Illustrator\ 2020/Adobe\ Illustrator.app/Contents/MacOS/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo rm -rf /Applications/Adobe\ Illustrator\ 2020/Adobe\ Illustrator.app/Contents/Required/Plug-ins/Text\ Filters/TextModel.aip
    4. Now copy-paste the below command to terminal and run it (enter password if asked).

    #InDesign crash fix:-
    Run the app binary with MKL_DEBUG_CPU_TYPE=5 flag from terminal.
    Example:
    MKL_DEBUG_CPU_TYPE=5 /Applications/Adobe\ InDesign\ 2020/Adobe\ InDesign\ 2020.app/Contents/MacOS/Adobe\ InDesign\ 2020
    NOTE:
    For FX and lower CPU's , you will need to use MKL_DEBUG_CPU_TYPE=4 flag.
    ```
    [ ! -d $HOME/Library/LaunchAgents ] && mkdir $HOME/Library/LaunchAgents
    AGENT=$HOME/Library/LaunchAgents/environment.plist
    sysctl -n machdep.cpu.brand_string | grep FX >/dev/null 2>&1
    x=$(echo $(($? != 0 ? 5 : 4)))
    cat >$AGENT <<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>launchctl setenv MKL_DEBUG_CPU_TYPE $x;</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>
    EOF
    launchctl load ${AGENT} >/dev/null 2>&1
    launchctl start ${AGENT} >/dev/null 2>&1
    ```

    Bridge crash fix :-
    #BR2018
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Bridge\ CC\ 2018/Adobe\ Bridge\ CC\ 2018.app/Contents/Plug-ins/MMXCore.plugin/Contents/MacOS/MMXCore
    #BR2019
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Bridge\ CC\ 2019/Adobe\ Bridge\ 2019.app/Contents/Plug-Ins/MMXCore.plugin/Contents/MacOS/MMXCore
    #BR2020
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Bridge\ 2020/Adobe\ Bridge\ 2020.app/Contents/Plug-Ins/MMXCore.plugin/Contents/MacOS/MMXCore
    5. Reboot macOS.

    After Effects crash fix :-
    sudo rm -rf /Library/Application\ Support/Adobe/Plug-Ins/CC/File Formats/Camera\ Raw.plugin
    ~OR~
    Use Camera Raw 9.12.1
    http://download.adobe.com/pub/adobe/photoshop/cameraraw/mac/9.x/CameraRaw_9_12_1_mac.zip
    ~OR~
    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
    ### Revert Instructions

    Lightroom Classic crash fix :-
    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
    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
    ```
    for file in MMXCore FastCore TextModel; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
    sudo -v
    [[ -f ${FILE}.back ]] && echo "found backup $FILE" && sudo mv -f ${FILE}.back $FILE
    done
    done
    AGENT=$HOME/Library/LaunchAgents/environment.plist
    if [[ -f $AGENT ]]; then
    launchctl unload ${AGENT} >/dev/null 2>&1
    launchctl stop ${AGENT} >/dev/null 2>&1
    rm -rf $AGENT
    fi
    ```

    ### Notes

    - Tested Adobe (2020) Photopshop, LightRoom Classic, Illustrator, Premier Pro, After Effects Bridge, Indesign, XD.
    - If you re-install any adobe app then you will need redo the STEP-3 again.
  16. @naveenkrdy naveenkrdy created this gist Jun 28, 2020.
    76 changes: 76 additions & 0 deletions AdobeAMDFix.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,76 @@
    ___ADOBE CRASH FIX BY XLNC___

    USAGE : Open terminal and run the below commands as required.

    NOTE: File path changes in each version release. So if the file is not found you can find the specified file manually and replace the path in the below commands.
    You can also use this command to find the location of a specific adobe file :
    eg:- if you want to search for MMXCore then run this command :
    find /Applications/Adobe* -type f -name "MMXCore" | sed 's/ /\\ /g'

    Photoshop crash fix :-
    #PS2018
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ CC\ 2018/Adobe\ Photoshop\ CC\ 2018.app/Contents/Required/Plug-ins/Extensions/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ CC\ 2018/Adobe\ Photoshop\ CC\ 2018.app/Contents/Required/Plug-ins/Extensions/FastCore.plugin/Contents/MacOS/FastCore
    #PS2019
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ CC\ 2019/Adobe\ Photoshop\ CC\ 2019.app/Contents/Required/Plug-ins/Extensions/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ CC\ 2019/Adobe\ Photoshop\ CC\ 2019.app/Contents/Required/Plug-ins/Extensions/FastCore.plugin/Contents/MacOS/FastCore
    #PS2020
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ 2020/Adobe\ Photoshop\ 2020.app/Contents/PlugIns/Required/Extensions/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Photoshop\ 2020/Adobe\ Photoshop\ 2020.app/Contents/PlugIns/Required/Extensions/FastCore.plugin/Contents/MacOS/FastCore

    Photoshop Font crash fix :-
    #PS2018
    sudo rm -rf /Applications/Adobe\ Photoshop\ CC\ 2018/Adobe\ Photoshop\ CC\ 2018.app/Contents/Required/Deep_Font
    #PS2019
    sudo rm -rf /Applications/Adobe\ Photoshop\ CC\ 2019/Adobe\ Photoshop\ CC\ 2019.app/Contents/Required/Deep_Font
    #PS2020
    sudo rm -rf /Applications/Adobe\ Photoshop\ 2020/Adobe\ Photoshop\ 2020.app/Contents/Required/Deep_Font

    Photoshop image open , drag-n-drop and image size change crash fix :-
    sudo rm -rf /Library/Application\ Support/Adobe/Plug-Ins/CC/File Formats/Camera\ Raw.plugin
    ~OR~
    Use Camera Raw 9.12.1
    http://download.adobe.com/pub/adobe/photoshop/cameraraw/mac/9.x/CameraRaw_9_12_1_mac.zip
    ~OR~
    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

    Illustrator crash fix :-
    #AI2018
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x5A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Illustrator\ CC\ 2018/Adobe\ Illustrator\ CC\ 2018.app/Contents/MacOS/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo rm -rf /Applications/Adobe\ Illustrator\ CC\ 2018/Adobe\ Illustrator\ CC\ 2018.app/Contents/Required/Plug-ins/Text\ Filters/TextModel.aip
    #AI2019
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Illustrator\ CC\ 2019/Adobe\ Illustrator.app/Contents/MacOS/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo rm -rf /Applications/Adobe\ Illustrator\ CC\ 2019/Adobe\ Illustrator.app/Contents/Required/Plug-ins/Text\ Filters/TextModel.aip
    #AI2020
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Illustrator\ 2020/Adobe\ Illustrator.app/Contents/MacOS/MMXCore.plugin/Contents/MacOS/MMXCore
    sudo rm -rf /Applications/Adobe\ Illustrator\ 2020/Adobe\ Illustrator.app/Contents/Required/Plug-ins/Text\ Filters/TextModel.aip

    #InDesign crash fix:-
    Run the app binary with MKL_DEBUG_CPU_TYPE=5 flag from terminal.
    Example:
    MKL_DEBUG_CPU_TYPE=5 /Applications/Adobe\ InDesign\ 2020/Adobe\ InDesign\ 2020.app/Contents/MacOS/Adobe\ InDesign\ 2020
    NOTE:
    For FX and lower CPU's , you will need to use MKL_DEBUG_CPU_TYPE=4 flag.

    Bridge crash fix :-
    #BR2018
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Bridge\ CC\ 2018/Adobe\ Bridge\ CC\ 2018.app/Contents/Plug-ins/MMXCore.plugin/Contents/MacOS/MMXCore
    #BR2019
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Bridge\ CC\ 2019/Adobe\ Bridge\ 2019.app/Contents/Plug-Ins/MMXCore.plugin/Contents/MacOS/MMXCore
    #BR2020
    sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Bridge\ 2020/Adobe\ Bridge\ 2020.app/Contents/Plug-Ins/MMXCore.plugin/Contents/MacOS/MMXCore

    After Effects crash fix :-
    sudo rm -rf /Library/Application\ Support/Adobe/Plug-Ins/CC/File Formats/Camera\ Raw.plugin
    ~OR~
    Use Camera Raw 9.12.1
    http://download.adobe.com/pub/adobe/photoshop/cameraraw/mac/9.x/CameraRaw_9_12_1_mac.zip
    ~OR~
    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

    Lightroom Classic crash fix :-
    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
    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