interceptor_frida_apps
List running Android applications on a device using Frida for network traffic analysis and debugging. Requires frida-server to be active on the target device.
Instructions
List running apps on an Android device via Frida. Requires frida-server running on the device.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | Yes | ADB device serial |
Implementation Reference
- src/tools/interceptors.ts:633-660 (handler)Tool registration for 'interceptor_frida_apps' in src/tools/interceptors.ts.
server.tool( "interceptor_frida_apps", "List running apps on an Android device via Frida. Requires frida-server running on the device.", { serial: z.string().describe("ADB device serial"), }, async ({ serial }) => { try { const frida = interceptorManager.get("android-frida") as AndroidFridaInterceptor | undefined; if (!frida) { return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: "Android Frida interceptor not registered." }) }] }; } const activable = await frida.isActivable(); if (!activable) { return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: "frida-js not installed or ADB not found." }) }] }; } const apps = await frida.listApps(serial); return { content: [{ type: "text", text: JSON.stringify({ status: "success", apps }), }], }; } catch (e) { return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: errorToString(e) }) }] }; } }, ); - src/interceptors/android-frida.ts:69-92 (handler)Actual implementation of 'listApps' method in the AndroidFridaInterceptor class.
/** List running apps on device. Exposed via tool, not part of Interceptor interface. */ async listApps(serial: string): Promise<Array<{ pid: number; name: string }>> { await this.ensureFridaTunnel(serial); const fridaJs = await import("frida-js"); let connection; try { connection = await fridaJs.connect({ host: `127.0.0.1:${FRIDA_PORT}` }); } catch (e) { throw new Error(`Failed to connect to frida-server at 127.0.0.1:${FRIDA_PORT}: ${stringifyError(e)}. Is frida-server running on the device?`); } try { const processes = await connection.enumerateProcesses(); return processes .filter((p) => p.pid > 0) .map((p) => ({ pid: p.pid, name: p.name })); } catch (e) { throw new Error(`Failed to enumerate processes: ${stringifyError(e)}`); } finally { await connection.disconnect().catch(() => {}); } }