Skip to main content
Glama

open_app

Launch installed Android applications by specifying their package name to automate app management tasks on connected devices.

Instructions

Launch an Android application by its package name (e.g. com.google.android.youtube). The app must be installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYesAndroid package name (e.g. com.google.android.youtube)
device_idNoDevice serial number

Implementation Reference

  • The actual implementation of the openApp function that uses ADB monkey to launch an application by package name.
    export async function openApp(packageName: string, deviceId?: string): Promise<string> {
      const resolved = await deviceManager.resolveDeviceId(deviceId);
      validatePackageName(packageName);
    
      // Use monkey to launch the app (works even without knowing the main activity)
      await adbShell([
        'monkey', '-p', packageName,
        '-c', 'android.intent.category.LAUNCHER',
        '1',
      ], resolved);
    
      deviceManager.touchSession(resolved);
      log.info('App opened', { packageName, deviceId: resolved });
      return packageName;
    }

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/divineDev-dotcom/android_mcp'

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