get_process_by_name
Locate running processes on mobile or desktop systems by name using Frida's dynamic instrumentation for analysis and reverse engineering tasks.
Instructions
Find a process by name.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | No | Optional ID of the device to search the process on. Uses smart selection when omitted. | |
| name | Yes | The name (or part of the name) of the process to find. Case-insensitive. |
Implementation Reference
- src/frida_mcp/cli.py:323-339 (handler)The handler function implementing the 'get_process_by_name' tool. It uses Frida to resolve a device, enumerate processes, and return the first matching process by partial case-insensitive name match, or an error if not found.@mcp.tool() def get_process_by_name( name: str = Field( description="The name (or part of the name) of the process to find. Case-insensitive." ), device_id: Optional[str] = Field( default=None, description="Optional ID of the device to search the process on. Uses smart selection when omitted.", ), ) -> dict: """Find a process by name.""" device = _resolve_device_or_raise(device_id) for proc in device.enumerate_processes(): if name.lower() in proc.name.lower(): return {"pid": proc.pid, "name": proc.name, "found": True} return {"found": False, "error": f"Process '{name}' not found"}