1. Cleaning Up Previous Installation Traces
If you've attempted to install Frida before and encountered issues, residual cache files and symbolic links might interfere with new installaitons. These remnants must be removed first. (Standard pip installations typically deploy x86_64 versions, which create corresponding symbolic links that won't work on ARM architecture.)
Clear pip cache:
pip cache purge
Remove symbolic links:
cd ~
sudo rm -rf .frida
Delete any remaining package files:
# Navigate to your Python site-packages directory and remove all Frida-related packages
# Example site-packages path:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
2. Installation Using Egg Files
For Frida vertions below 15, PyPI provides egg files compatible with ARM architecture.
This example demonstrates installation with Python 3.8 and Frida 15.1.27.
Download the egg file:
https://files.pythonhosted.org/packages/82/80/c3479f69267697f9391bde1515ef7f97a57ca15198e34fc146805cff0ac1/frida-15.1.27-py3.8-macosx-11.0-arm64.egg
Install the egg file:
easy_install-3.8 -i http://mirrors.aliyun.com/pypi/simple/ frida-15.1.27-py3.8-macosx-11.0-arm64.egg
# Using a domestic mirror source is recommended to speed up installation
# After execution, Frida 15.1.27 will be successfully installed
Install frida-tools:
# Find the frida-tools version compatible with your Frida version
# For Frida 15.1.27, the matching version is frida-tools==10.6.2
pip install frida-tools==10.6.2
3. Installation Using Wheel Files
For Frida versions 16 and above, PyPI provides wheel files with macOS ARM64 support.
This example demonstrates installation with Python 3.7 and Frida 16.4.2.
Download the wheel file:
https://files.pythonhosted.org/packages/87/65/13e974750fcdbed8a1d5329e4032504a05c19c009f6e727a8f926fee03b2/frida-16.4.2-cp37-abi3-macosx_11_0_arm64.whl
Verify wheel installation:
# Check if wheel is already installed
pip list | grep wheel
# Install wheel if it's not present
pip install wheel
Install Frida:
pip install [path-to-downloaded-frida-whl-file]
Install the compatible frida-tools version:
Locate the frida-tools version that corresponds to your Frida version and enstall it using pip.
Note: When installing via egg or wheel files, ensure compatibility with your Python version. The supported Python version is indicated directly in the filename of the installation package.