Skip to main content
Glama

get_app_info

Retrieve detailed information about installed Android applications, including version, permissions, and activity data, for development and testing purposes.

Instructions

Get detailed information about an installed app

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYes
device_serialNo

Implementation Reference

  • The main handler function for the 'get_app_info' tool. It is decorated with @mcp.tool(), which registers it as an MCP tool. The function extracts app information like version, install times, and target SDK from 'dumpsys package' output using regex.
    @mcp.tool() def get_app_info(package_name: str, device_serial: str | None = None) -> dict: """Get detailed information about an installed app""" dump = run_adb(["shell", "dumpsys", "package", package_name], device_serial) info = {"package": package_name} # Extract version version_match = re.search(r'versionName=(\S+)', dump) if version_match: info['version_name'] = version_match.group(1) version_code_match = re.search(r'versionCode=(\d+)', dump) if version_code_match: info['version_code'] = version_code_match.group(1) # First install time install_match = re.search(r'firstInstallTime=(.+)', dump) if install_match: info['first_install'] = install_match.group(1).strip() # Last update time update_match = re.search(r'lastUpdateTime=(.+)', dump) if update_match: info['last_update'] = update_match.group(1).strip() # Target SDK sdk_match = re.search(r'targetSdk=(\d+)', dump) if sdk_match: info['target_sdk'] = sdk_match.group(1) return info

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/rahulkr/r_adb_mcp_server'

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