Skip to main content
Glama

adb_uninstall_app

Remove specific Android apps from devices by specifying the package name using Android Debug Bridge functionality. Manage app installations remotely with optional device ID targeting.

Instructions

Uninstall an app from the device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNoDevice ID (optional)
packageNameYesPackage name of the app to uninstall

Implementation Reference

  • The core handler function in AppTools class that performs the ADB uninstall operation by executing the 'uninstall' command via adbClient.
    async uninstallApp(packageName: string, deviceId?: string) { try { const connected = await this.adbClient.isDeviceConnected(deviceId); if (!connected) { return { success: false, error: 'Device not connected', message: 'Cannot uninstall app - device is not connected' }; } const command = `uninstall ${packageName}`; const result = await this.adbClient.executeCommand(command, deviceId); if (!result.success || result.output.includes('Failure')) { return { success: false, error: result.error || result.output, message: 'Failed to uninstall app' }; } return { success: true, data: { packageName, deviceId: deviceId || this.adbClient.getDefaultDevice() }, message: `App ${packageName} uninstalled successfully` }; } catch (error: any) { return { success: false, error: error.message, message: 'Failed to uninstall app' }; }
  • The input schema definition for the adb_uninstall_app tool, specifying packageName as required and deviceId as optional.
    name: 'adb_uninstall_app', description: 'Uninstall an app from the device', inputSchema: { type: 'object', properties: { packageName: { type: 'string', description: 'Package name of the app to uninstall', }, deviceId: { type: 'string', description: 'Device ID (optional)', }, }, required: ['packageName'], },
  • src/index.ts:455-456 (registration)
    The switch case in the CallToolRequest handler that dispatches to the appTools.uninstallApp method.
    case 'adb_uninstall_app': return await this.handleToolCall(this.appTools.uninstallApp(args?.packageName as string, args?.deviceId as string));
  • src/index.ts:39-39 (registration)
    Instantiation of the AppTools class instance used for app-related tools including uninstall.
    this.appTools = new AppTools(this.adbClient);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/richard0913/adb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server