Solve MacOS:xxx.app is damaged and can't be opened,you should move it to the waste paper

by CokernutX Team2020-12-26 14:40:40

Three Common Errors:

1. xxx.app is damaged and can’t be opened. You should move it to the Trash
2. App can’t be opened because it is from an unidentified developer
3. App can’t be opened because Apple cannot check it for malicious software.

Why?

This's the problem of Mac OS enabling new security mechanism. Apple is only allowed to install apps from its own [AppStore] by default. If you want to install third-party apps, you need to check the [App Store and identified developers] option in [System Preferences >> Security & privacy >> General]. The identified developers need to buy Apple's enterprise certificate to sign the application, and then submit it to apple for approval. This is very unrealistic for cracking the application, because cracking the application will certainly modify the application's file, resulting in the signature invalidation and running display [damaged]. The solution is to turn on the [Anywhere] option, but MacOS hides this setting by default, and the user needs to manually execute command line code through the terminal to turn it on.

How to turn on Anywhere option?

First, open the System Preferences >> Security & privacy >> General tab to check whether Anywhere options have been enabled. If it is not enabled, first click the small yellow lock icon in the lower left corner to unlock it, and then select Anywhere.

If there is no such option, we open the terminal and enter the following command:sudo spctl --master-disable

Then press the return key on the keyboard, enter the password, and then press the Enter key to finish.
After entering the command enter, you will see a key icon behind the password. Enter your own computer unlock password behind the key icon (the password you entered will not be displayed when entering. It feels like you can't enter anything, and you don't have to worry about it. Press enter after entering the correct unlock password by feeling.)

OK, now go back to System Preferences >> Security & privacy > general, and you will find that AnyWhere option has been selected.

Generally, after executing the command, it will be selected by default. If it is not selected, just unlock it and select it!

At this point, the application can run normally.
However, some applications still can't opened. This is because Apple further shrinks the permission of the application without signature. At this time, it needs to execute command line code through the terminal to bypass the application signature authentication

How to bypass notarized signature?

Open the terminal and enter the following command:
sudo xattr -rd com.apple.quarantine /Applications/ xxxxxx.app
Change the top xxxxxx.app to your app name, such as Folx.app:
sudo xattr -rd com.apple.quarantine /Applications/ Folx.app
Or copy the following command and paste it to the terminal
sudo xattr -rd com.apple.quarantine
Open the finder, click the application on the left, drag the application into the terminal, and then press the return key on the keyboard, enter the password, and then press the Enter key to finish.
Note that there must be a space after the quarantine

OK, let's see if we can open the app!If not, you need to sign the application locally!

How to resign the App by yourself?

1. Install command line tools.Open the terminal tool and enter the following command:
xcode-select --install

2. After the installation window pops up, choose to continue the installation. The installation process takes a few minutes, please wait patiently. If the prompt "Can’t install the software because it is not currently available from the Software Update server" is prompted during installation, please follow this tutorial: click me to check

Open the terminal tool, input and execute the following command to sign the application:
Sudo codesign -- force -- deep -- Sign - (application path)
Application path: open the finder, click the application in the left navigation bar, find the relevant application, drag it behind the terminal command - and then press enter. Note that there is a space behind the last one.

Under normal circumstances, only one line prompt is successful,like this:
replacing existing signature

In case of the following error:
replacing existing signature
resource fork, finder information, or similar detritus not allowed
First, execute on the terminal:
Xattr - Cr /file location (drag the application in directly)
Then execute the following command again: Codesign -- force -- deep -- Sign - /file location (drag the application in directly)
By this point, 95% of the applications are working properly. If not, please continue to look down.

If the above operation can not be solved, then you need to turn off SIP system integrity protection! put things right once and for all!
How to turn off system integrity protection of MacOS(SIP)