spawn_process
Launch a program or application on a device for dynamic instrumentation and runtime analysis using Frida's capabilities.
Instructions
Spawn a program.
Returns:
Information about the spawned process
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Optional list of arguments for the program. | |
| device_id | No | Optional ID of the device where the program should be spawned. Uses smart selection when omitted. | |
| program | Yes | The program or application identifier to spawn. |
Implementation Reference
- src/frida_mcp/cli.py:362-392 (handler)The spawn_process tool handler, registered via @mcp.tool() decorator. Implements spawning a program on a Frida device using device.spawn(), handling arguments and device resolution. Includes input schema via Pydantic Field descriptions.@mcp.tool() def spawn_process( program: str = Field(description="The program or application identifier to spawn."), args: Optional[List[str]] = Field( default=None, description="Optional list of arguments for the program." ), device_id: Optional[str] = Field( default=None, description="Optional ID of the device where the program should be spawned. Uses smart selection when omitted.", ), ) -> Dict[str, Any]: """Spawn a program. Returns: Information about the spawned process """ try: device = _resolve_device_or_raise(device_id) argv = None if args: argv = list(args) if not argv or argv[0] != program: argv.insert(0, program) pid = device.spawn(program, argv=argv) return {"pid": pid} except Exception as e: raise ValueError(f"Failed to spawn {program}: {str(e)}")