Skip to main content
Glama

get_apktool_yml

Extract and retrieve apktool.yml configuration details from a decoded APK project for streamlined Android reverse engineering and analysis.

Instructions

Get apktool.yml information from a decoded APK project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_apktool_yml' MCP tool. It validates the input project directory, checks for the existence of 'apktool.yml', reads its content if present, and returns structured metadata including the file content, path, size, and encoding. Includes comprehensive error handling.
    async def get_apktool_yml(project_dir: str) -> Dict:
        """
        Get apktool.yml information from a decoded APK project with validation.
        
        Args:
            project_dir: Path to APKTool project directory
            
        Returns:
            Dictionary with apktool.yml content, metadata, and validation results
        """
        # Input validation
        path_validation = ValidationUtils.validate_path(project_dir, must_exist=True)
        if not path_validation["valid"]:
            return {"success": False, "error": path_validation["error"]}
        
        yml_path = os.path.join(project_dir, "apktool.yml")
        if not os.path.exists(yml_path):
            return {
                "success": False,
                "error": f"apktool.yml not found in {project_dir}",
                "expected_path": yml_path
            }
        
        try:
            with open(yml_path, 'r', encoding="utf-8") as f:
                content = f.read()
                        
            result = {
                "success": True,
                "content": content,
                "path": yml_path,
                "size": os.path.getsize(yml_path),
                "encoding": "utf-8"
            }
             
            return result
            
        except Exception as e:
            logger.error(f"Error reading apktool.yml: {str(e)}")
            return {
                "success": False,
                "error": f"Failed to read apktool.yml: {str(e)}",
                "path": yml_path
            }

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

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/zinja-coder/apktool-mcp-server'

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