Skip to main content

An MCP server that provides APK analysis capabilities using the Android Asset Packaging Tool (aapt)

Project description

AAPT-MCP

A tool for analyzing Android APK files using the Android Asset Packaging Tool (AAPT) with MCP integration.

Description

AAPT-MCP is a tool that leverages the Android Asset Packaging Tool (AAPT) to analyze APK files and provide detailed insights about their contents, size, and structure. It uses MCP (Model Control Protocol) to process and analyze the APK data through an LLM (Large Language Model).

Features

  • APK content listing using AAPT
  • Detailed size analysis of APK contents
  • Categorization of files by type (resources, native libraries, dex files, etc.)
  • Identification of largest files and directories
  • Optimization recommendations
  • Potential issues detection

Prerequisites

  • Python 3.7+
  • Android SDK (for AAPT tool)
  • MCP server

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/aapt-mcp.git
cd aapt-mcp
  1. Install dependencies:
pip install -r requirements.txt
  1. Ensure AAPT is in your system PATH:
    • AAPT is part of the Android SDK build tools
    • Add the Android SDK build tools directory to your system PATH

Usage

  1. Run the MCP server:
python main.py
  1. The tool provides two main functions:
    • aapt_tool: Lists contents of an APK file
    • analyze_table: Analyzes the APK contents and provides detailed insights

Output Format

The analysis provides:

  • Total APK Size
  • Size Breakdown by category
  • Top 5 Largest Files
  • Optimization Recommendations
  • Potential Issues

Example

from mcp.server.fastmcp import FastMCP

# Initialize the tool
aapt = FastMCP("aapt-mcp")

# Analyze an APK
result = aapt.analyze_table("path/to/your.apk")

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Android Asset Packaging Tool (AAPT)
  • MCP Framework

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aapt_mcp_server-1.0.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aapt_mcp_server-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file aapt_mcp_server-1.0.0.tar.gz.

File metadata

  • Download URL: aapt_mcp_server-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for aapt_mcp_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 61de91c666b92910fd8b3cf55c21604ce345874c2a7d9b2f908c631f2f402d47
MD5 89530fbe17d23e25b97f66ed8b90bf5a
BLAKE2b-256 61eae8452de0691abec64f53ee121b850f8ab0c701483d8170189952badcb9d9

See more details on using hashes here.

File details

Details for the file aapt_mcp_server-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aapt_mcp_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44046ca5341f509cd3c7760b2f2e1dea15b1416188a66f3e4ccf3204f7699d52
MD5 1e02c3b4f33f8edb8052566d9df4cb2a
BLAKE2b-256 68f6b211552207720a756c22ff78b4c77ffde1ba945e304f3acd2e9cdec69808

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page