Skip to content

yamsergey/dta

Repository files navigation

Development Tools for Android (DTA)

Work is in progress, bugs expected, nothing has been finalised.

Maven Central Snyk Security

A terminal-first toolkit that gives AI assistants direct access to Android devices through the Model Context Protocol. Your coding agent can see the screen, read network traffic, mock responses, and interact with the app — without opening Android Studio.

A bit of an overview of use cases

Quick Start

Install CLI

brew tap yamsergey/packages
brew install dta-cli

Requirements: Java 21+

Add Sidekick to your app (debug builds only)

dependencies {
    debugImplementation 'io.github.yamsergey:dta-sidekick:0.9.27'
}

Sidekick auto-initializes via AndroidX Startup — no code changes needed. It starts recording HTTP, WebSocket, and Chrome Custom Tab traffic the moment your app launches.

Connect your AI assistant

Cursor

Add dta-mcp to Cursor

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "dta": {
      "command": "dta-cli",
      "args": ["mcp"]
    }
  }
}

What Can Your Agent Do?

Screen Analysis

DTA returns the real UI hierarchy — actual view classes, bounds, positions, layout parameters, and Compose-specific data. Unlike adb shell uiautomator dump which gives a semantic accessibility tree, your agent gets the full picture including content inside WebViews and Chrome Custom Tabs.

Network Analysis

Sidekick auto-records from app launch — HTTP requests, WebSocket connections, Chrome Custom Tab traffic. No "start recording" button, no missed requests. Your agent can query the full history at any point.

Mocking

Create mock rules for HTTP and WebSocket from captured data or from scratch. Plug in custom adapters for programmatic control over mock responses:

val httpAdapter = HttpMockAdapter { transaction, proposedResponse ->
    proposedResponse.withBody("""{"message": "custom response"}""")
}

Sidekick.configure(
    SidekickConfig.builder()
        .httpMockAdapter(httpAdapter)
        .build()
)

Verification

The agent can tap, swipe, input text, and press keys — then check the screen state and network traffic to confirm behavior. A full inspect-mock-interact-verify loop.

Inspector Web Interface

dta-cli inspector-web

Open http://localhost:8080 for visual inspection:

  • Layout Inspector — UI hierarchy with element selection and filtering
  • Network Inspector — captured HTTP requests and responses
  • WebSocket Inspector — WebSocket connections and messages

The inspector enables bi-directional communication between developer and agent — select elements with a click instead of describing them in words.

Modules

Module Description
dta-cli Unified CLI interface (includes mcp and inspector-web commands)
dta-sidekick Runtime inspection library (Android AAR)
tools-android Core Gradle Tooling API integration
workspace-kotlin workspace.json converter for Kotlin Language Server

CLI Reference

dta-cli --help
dta-cli <command> --help

License

Apache License 2.0 — see LICENSE.txt

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors