spawn_and_inject
Automatically kill, relaunch, and inject Frida code into an Android app at startup to hook early lifecycle methods.
Instructions
Kill app, relaunch, connect, and inject script in one step. Use this when you need to hook early initialization (e.g. onCreate, static initializers). Equivalent to: kill_app -> launch_app -> connect -> execute.
Args: package: The app package name (e.g. com.taobao.taobao). script: Frida JavaScript code to inject at startup. Use send() to return data. script_file: Path to a .js file to inject. Use this for large scripts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | ||
| script | No | ||
| script_file | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |