Apktool MCP Server

modify_smali_file

Edit and update the content of a specific smali file within an APKTool project. Specify the class name, new content, and optional backup creation to customize Android application behavior.

Instructions

Modify the content of a specific smali file.

Args: project_dir: Path to the APKTool project directory class_name: Full class name (e.g., com.example.MyClass) new_content: New content for the smali file create_backup: Whether to create a backup of the original file

Returns: Dictionary with operation results

Input Schema

NameRequiredDescriptionDefault
class_nameYes
create_backupNo
new_contentYes
project_dirYes

Input Schema (JSON Schema)

{ "properties": { "class_name": { "title": "Class Name", "type": "string" }, "create_backup": { "default": true, "title": "Create Backup", "type": "boolean" }, "new_content": { "title": "New Content", "type": "string" }, "project_dir": { "title": "Project Dir", "type": "string" } }, "required": [ "project_dir", "class_name", "new_content" ], "title": "modify_smali_fileArguments", "type": "object" }
ID: jtugu4w3w9