Skip to main content
Glama

adb_get_system_info

Retrieve Android device system information including hardware and software details for debugging and management purposes.

Instructions

Get system information from the device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNoDevice ID (optional)

Implementation Reference

  • Core handler function that runs multiple ADB shell commands to gather device system information including Android version, manufacturer, model, kernel, uptime, memory, and CPU info.
    async getSystemInfo(deviceId?: string) { try { const connected = await this.adbClient.isDeviceConnected(deviceId); if (!connected) { return { success: false, error: 'Device not connected', message: 'Cannot get system info - device is not connected' }; } const commands = { androidVersion: 'getprop ro.build.version.release', apiLevel: 'getprop ro.build.version.sdk', manufacturer: 'getprop ro.product.manufacturer', model: 'getprop ro.product.model', brand: 'getprop ro.product.brand', device: 'getprop ro.product.device', buildId: 'getprop ro.build.id', kernel: 'uname -r', uptime: 'uptime', meminfo: 'cat /proc/meminfo | head -5', cpuinfo: 'cat /proc/cpuinfo | grep "model name" | head -1' }; const systemInfo: Record<string, string> = {}; for (const [key, cmd] of Object.entries(commands)) { const result = await this.adbClient.executeCommand(`shell ${cmd}`, deviceId); systemInfo[key] = result.success ? result.output.trim() : 'N/A'; } return { success: true, data: { ...systemInfo, deviceId: deviceId || this.adbClient.getDefaultDevice() }, message: 'System information retrieved successfully' }; } catch (error: any) { return { success: false, error: error.message, message: 'Failed to get system info' }; } }
  • src/index.ts:373-386 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining the tool name, description, and input schema (optional deviceId).
    { name: 'adb_get_system_info', description: 'Get system information from the device', inputSchema: { type: 'object', properties: { deviceId: { type: 'string', description: 'Device ID (optional)', }, }, required: [], }, },
  • Dispatch handler in the CallToolRequestSchema switch statement that invokes the ShellTools.getSystemInfo method.
    case 'adb_get_system_info': return await this.handleToolCall(this.shellTools.getSystemInfo(args?.deviceId as string));

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