Adobe Crash Fix for AMD Hackintosh 修复AMD黑苹果的Adobe系列应用

Instructions 指南

  1. Install needed adobe apps from adobe creative cloud. 安装好Adobe系列app

  2. Open Terminal. 打开终端

  3. Copy-paste the below command to your terminal and run it (enter password when asked). 复制粘贴以下代码到终端并回车执行,如果要密码就相应提供下

files_list=(MMXCore FastCore TextModel libiomp5.dylib)
lib_dir="{HOME}/Documents/AdobeLibs" lib1_file="{lib_dir}/libiomp5.dylib"
lib1_link="https://gitee.com/cloudyangel/Misc/raw/master/Libs/libiomp5.dylib"

for file in files_list; do     find /Applications/Adobe* -type f -namefile | while read -r curr_file; do
        name=(basenamecurr_file)
        sw_vers -productVersion | grep "11" >/dev/null 2>&1
        [[ ? == 0 ]] && [[name =~ ^(MMXCore|FastCore)]] && continue         echo "foundcurr_file"
        sudo -v
        [[ ! -f {curr_file}.back ]] && sudo cp -fcurr_file {curr_file}.back || sudo cp -f{curr_file}.back curr_file         if [[name == "libiomp5.dylib" ]]; then
            [[ ! -d lib_dir ]] && mkdirlib_dir
            [[ ! -f lib1_file ]] && cdlib_dir && curl -sO lib1_link             adobelib_dir=(dirname "curr_file")             echo -n "replacing " && sudo cp -vflib1_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 </code></pre>  <ol> <li>Now copy-paste the below command to terminal and run it (enter password if asked). 复制粘贴下面的命令行到终端中运行</li> </ol>  <pre><code class="language-bash">agent_dir="{HOME}/Library/LaunchAgents"
env_file="{agent_dir}/environment.plist" lib_dir="{HOME}/Documents/AdobeLibs"
lib2_file="{lib_dir}/libfakeintel.dylib" lib2_link="https://gitee.com/cloudyangel/Misc/raw/master/Libs/libfakeintel.dylib"  sw_vers -productVersion | grep "11" >/dev/null 2>&1 if [[? == 0 ]]; then
    [[ ! -d lib_dir ]] && mkdirlib_dir
    [[ ! -f lib2_file ]] && cdlib_dir && curl -sO lib2_link     env="launchctl setenv DYLD_INSERT_LIBRARIESlib2_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_TYPEmkl_value"
fi

[[ ! -d agent_dir ]] && mkdiragent_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. 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 -namefile | while read -r curr_file; do
        sudo -v
        [[ -f {curr_file}.back ]] && echo "Restoring backupcurr_file"&& sudo mv -f {curr_file}.backcurr_file
    done
done
  • To revert step-4 恢复第二批命令行
agent_dir="{HOME}/Library/LaunchAgents" env_file="{agent_dir}/environment.plist"
if [[ -f env_file ]]; then     echo "Deletingenv_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 重启

发表回复