Registry / devops / frida-tools

frida-tools

JSON →
library14.9.0pypypi✓ verified 86d ago

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-tools
INSTALL
IMPORT
SIG · FRIDA-TOOLS
F
frida-tools
devopspythonv14.9.0
Install
6.8s avg
Import
225ms
Disk
138MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v14.9.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
installs and imports cleanly · install 6.8s · import 0.225s · 142MB
138MB installed
● package 138MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

frida
import frida
frida-tools provides CLI utilities, but its Python API relies on the 'frida' package for direct scripting.

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.

import frida def on_message(message, data): print(f"[on_message] message: {message}, data: {data}") try: # Attach to a running process, replace 'cat' with a valid process name or PID on your system # For remote devices, use frida.get_usb_device().attach('process_name') or frida.get_device_manager().get_device('id').attach('process_name') session = frida.attach('cat') # Example: a simple running process # Create a JavaScript script to inject script = session.create_script(""" rpc.exports.enumerateModules = () => { return Process.enumerateModules(); }; """) # Set up message handler script.on('message', on_message) # Load the script into the target process script.load() # Call an exported RPC method from Python modules = script.exports_sync.enumerate_modules() print([m['name'] for m in modules]) # Keep the script running (or detach when done) input('[*] Press Enter to detach from process\n') session.detach() except frida.ProcessNotFoundError: print("Error: Process 'cat' not found. Please ensure 'cat' or another process is running.") except Exception as e: print(f"An error occurred: {e}")
frida --version
Debug
Known issues
breakingFrida 17 (released May 2025) introduced significant breaking changes in its JavaScript API, affecting static Module and Memory methods, and legacy enumeration APIs. For example, `Module.findBaseAddress()` and `Memory.readU32(ptr)` were removed.
fix
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.
affects: frida >= 17.0.0 (and frida-tools relying on it)
gotchaMismatch between `frida-tools` and `frida-server` versions on target devices can lead to unexpected behavior or failures. While `frida-tools` is installed on your host, `frida-server` runs on the target device.
fix
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.
affects: All versions
gotchaOn Windows, the `frida` and `frida-tools` CLI commands might not be found in the system PATH after installation, leading to 'command not found' errors.
fix
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.
affects: All versions on Windows
gotchaWhen attaching to a process by name using `frida.attach('process_name')`, a `ValueError: ambiguous name` error can occur if multiple processes share the same name.
fix
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)`.
affects: All versions
Errors
Common errors & fixes
SystemError: attach_to_process PTRACE_ATTACH failed: 1
This error typically indicates insufficient permissions to attach to the target process, often due to security mechanisms (e.g., SELinux policies, Samsung Knox, Google Play Protect) or `ptrace` restrictions.
fix
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).
ImportError: dynamic module does not define init function (init_frida)
This error usually arises when trying to use `frida` Python bindings compiled for one Python major version (e.g., Python 2.x) with a different major version (e.g., Python 3.x), or vice versa.
fix
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.
Failed to enumerate applications: unable to perform ptrace pokedata: I/O error
Often seen on Android devices, this indicates an issue with Frida's ability to interact with processes due to stringent security mechanisms like SELinux or other kernel-level protections.
fix
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`.
frida: command not found
The `frida-tools` CLI executables are not in your system's PATH environment variable.
fix
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.
Upgrade
Version history
14.9.0latest on PyPI · released Jun 1, 2026
Audit
Dependencies
fridarequiredCore dynamic instrumentation library that frida-tools builds upon.
coloramarequiredUsed for colored terminal output.
prompt-toolkitrequiredProvides an interactive command-line interface.
pygmentsrequiredUsed for syntax highlighting.
websocketsrequiredEnables WebSocket communication, likely for connecting to frida-server.
Agent activity
48 hits · last 30 days
node
48
Resources
frida-tools — pip install frida-tools · libregistry