adb-app
Install, uninstall, launch, stop, clear data, or list Android applications on connected devices through ADB commands.
Instructions
Manage applications.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| apkPath | No | APK path | |
| packageName | No | ||
| limit | No | Default: 20, max: 100 | |
| filter | No | Filter by name (case-insensitive) | |
| offset | No | Pagination offset |
Implementation Reference
- src/tools/adb-app.ts:120-134 (handler)Main handler function for the 'adb-app' tool. It delegates to specific operation functions (install, uninstall, etc.) based on the input.
export async function handleAdbAppTool( input: AdbAppInput, context: ServerContext ): Promise<Record<string, unknown>> { const device = await context.deviceState.ensureDevice(context.adb); const handler = operations[input.operation]; if (!handler) { throw new ReplicantError( ErrorCode.INVALID_OPERATION, `Unknown operation: ${input.operation}`, "Valid operations: install, uninstall, launch, stop, clear-data, list", ); } return handler(input, device.id, context); } - src/tools/adb-app.ts:5-12 (schema)Input schema definition for the 'adb-app' tool using Zod.
export const adbAppInputSchema = z.object({ operation: z.enum(["install", "uninstall", "launch", "stop", "clear-data", "list"]), apkPath: z.string().optional(), packageName: z.string().optional(), limit: z.number().min(1).max(100).optional(), filter: z.string().optional(), offset: z.number().min(0).optional(), }); - src/tools/adb-app.ts:136-169 (registration)Tool definition object for 'adb-app', used for registration.
export const adbAppToolDefinition = { name: "adb-app", description: "Manage applications.", inputSchema: { type: "object", properties: { operation: { type: "string", enum: ["install", "uninstall", "launch", "stop", "clear-data", "list"], }, apkPath: { type: "string", description: "APK path" }, packageName: { type: "string" }, limit: { type: "number", description: "Default: 20, max: 100", }, filter: { type: "string", description: "Filter by name (case-insensitive)", }, offset: { type: "number", description: "Pagination offset", }, }, required: ["operation"], }, annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false, }, };