frida-tools provides a set of command-line interface (CLI) utilities for Frida, a dynamic instrumentation toolkit. It allows developers, reverse-engineers, and security researchers to inject JavaScript into native applications on various platforms (Windows, macOS, GNU/Linux, iOS, Android, QNX) to observe and reprogram running programs. The library is actively maintained, with the current version being 14.8.1, and typically follows the release cycle of its core dependency, 'frida'.
pip install frida-toolsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use the underlying 'frida' Python binding (which 'frida-tools' uses) to attach to a running process, inject a JavaScript agent, call an RPC method, and process messages. Replace 'cat' with an actual running process on your system or a connected device for a successful execution. For mobile devices, ensure 'frida-server' is running on the device and specify the correct device and process.
Migrate your JavaScript agents to use `Process.findModuleByName().base` for module base addresses and instance methods like `ptr.readU32()` for memory operations. Runtime bridges (Java, ObjC, Swift) are also no longer bundled directly with Frida's GumJS runtime but are baked into `frida-tools` REPL and `frida-trace` agents.
Always ensure that the `frida-server` version deployed on your target device (e.g., Android, iOS) matches the `frida` Python package version installed on your host system. Download the correct `frida-server` binary from Frida's GitHub releases page.
Manually add the Python 'Scripts' directory (e.g., `C:\Users\<username>\AppData\Local\Packages\PythonSoftwareFoundation.Python.<version>_qbz5n2kfra8p0\LocalCache\local-packages\Python<version>\Scripts`) to your system's PATH environment variable.
Instead of the process name, use the Process ID (PID) which is unique. You can find the PID using `frida-ps -U` for USB devices or `frida-ps -a` for all processes. Example: `session = frida.attach(12345)`.
Try running the command with elevated privileges (e.g., `sudo sysctl kernel.yama.ptrace_scope=0` on Linux, ensure Frida is properly signed on macOS, or disable security mechanisms like Magisk Hide/Knox on Android and reboot).
Ensure you are using the correct Python interpreter for the installed `frida` package. If you have multiple Python versions, verify your `pip` installation target and `PYTHONPATH`. It is recommended to use Python 3.7+ with recent Frida versions.
Attempt to disable relevant security mechanisms (e.g., Samsung Knox) via `adb shell` commands and reboot the device. For example: `adb shell pm disable-user --user 0 com.samsung.android.knox.attestation`.
On Linux/macOS, ensure your user's `~/.local/bin` is in PATH. On Windows, manually add the Python 'Scripts' directory to your system's PATH. Restart your terminal after modifying PATH.