adb_get_device_info
Retrieve detailed device information from Android devices connected via ADB, including specifications and status, for device management and automation tasks.
Instructions
Get detailed information about a specific device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | No | Device ID (optional, uses default device if not specified) |
Implementation Reference
- src/tools/device.ts:23-38 (handler)The handler function that implements the core logic of the 'adb_get_device_info' tool by calling AdbClient.getDeviceInfo and formatting the response.async getDeviceInfo(deviceId?: string) { try { const deviceInfo = await this.adbClient.getDeviceInfo(deviceId); return { success: true, data: deviceInfo, message: `Device info retrieved for ${deviceInfo.id}` }; } catch (error: any) { return { success: false, error: error.message, message: 'Failed to get device info' }; } }
- src/index.ts:60-73 (schema)The input schema definition for the 'adb_get_device_info' tool, registered in the ListTools response.{ name: 'adb_get_device_info', description: 'Get detailed information about a specific device', inputSchema: { type: 'object', properties: { deviceId: { type: 'string', description: 'Device ID (optional, uses default device if not specified)', }, }, required: [], }, },
- src/index.ts:435-436 (registration)The switch case that registers and dispatches calls to the 'adb_get_device_info' handler in the CallToolRequest handler.case 'adb_get_device_info': return await this.handleToolCall(this.deviceTools.getDeviceInfo(args?.deviceId as string));