Due to some inappropriate activities involving the social media app WeChat, the app has been banned on our school-issued computers, resulting in this:
After rounds of debugging, trials and errors, I figured out the identifier the system uses to detect this app. For more details on how this works, see How it Works.
-
Download the latest release here.
-
Ensure that you have WeChat installed and ready in the
Applications
folder. Do NOT open it. You may use the provided copy of WeChat. It is directly downloaded from the official website, and might not be up to date. -
Run
MagicWeChat
. You might need to right-click and selectOpen
to bypass Gatekeeper. SelectOpen
when prompted. -
Enter your password as required. This is necessary for force resigning the app after modification.
This workflow does NOT connect to the internet or attempt to store any data. You may disconnect the Internet or use a firewall to ensure this.
-
Allow up to 10 seconds after entering the password, as re-signing the app may take some time.
-
Finally, a popup window will inform you that the process has been completed. Right-click and open
WeChat
to bypass Gatekeeper. -
Use as usual. Note that you will not be able to update the app directly. If an update is desired, you will need to reinstall the app and repeat this process.
Please support us by starring
this repository. Your support is hight appreciated! 🌟
-
Observation: For most restricted apps, changing their
name
s would typically solve the problem. However, this doesn't work for WeChat. The system uses other identifier(s) to detect this app. -
Observation: Changing an application's name does not affect the displayed name in
Activity Monitor
. Therefore, the name displayed is decided by the name of theexecutable file
, which might be one of the targeted identifiers.- Note that we cannot just change the executable name. Doing so will prevent the program from locating the executable, thus breaking it.
- Therefore, we look into
Contents/Info.plist
, where we noticeCFBundleDisplayName
andCFBundleExecutable
attributes, which are both set to "WeChat". - Changing both these attributes in accordance with the executable name should work.
-
Observation: Two error pops up after the operation:
-
The application "WeChat" cannot be opened.
-
WeChat is restricted!
-
The first error indicates that after modification, the app needs to be re-signed.
-
The second error tells us that the system is still able to detect this app!
-
-
Observation: In
Info.plist
, another attribute that stands out isCFBundleIdentifier
. This is the only other attribute that is unique for an application.-
We change
CFBundleIdentifier
, and re-sign the app. -
Voilà! Now the system cannot detect the app, and we can use it with no issues by bypassing Gatekeeper (right click -> open).
-
We decide to make this workflow into an app to make the process (and updating the app) easier. And that's the origin of this project.