Skip to main content

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

Metadata

Release files for aapt-mcp-server 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aapt-mcp-server 1.0.0
File Size Uploaded
aapt_mcp_server-1.0.0.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aapt-mcp-server 1.0.0
File Interpreter ABI Platform
aapt_mcp_server-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 kB

Release files / aapt_mcp_server-1.0.0.tar.gz

Download URL aapt_mcp_server-1.0.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
61de91c666b92910fd8b3cf55c21604ce345874c2a7d9b2f908c631f2f402d47
BLAKE2b-256 checksum
How to use checksums
61eae8452de0691abec64f53ee121b850f8ab0c701483d8170189952badcb9d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release files / aapt_mcp_server-1.0.0-py3-none-any.whl

Download URL aapt_mcp_server-1.0.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44046ca5341f509cd3c7760b2f2e1dea15b1416188a66f3e4ccf3204f7699d52
BLAKE2b-256 checksum
How to use checksums
68f6b211552207720a756c22ff78b4c77ffde1ba945e304f3acd2e9cdec69808
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page