Skip to main content

Automation of Android Project Building with LLMs

Project description

buildAnaDroid

⚡ Clone, build, and generate debugging APKs for Android projects using LLM-powered automation.

buildAnaDroid is a Python package that leverages Large Language Models (LLMs) to automatically clone any Android project hosted on GitHub, configure it, and build the debugging .apk file. This enables faster evaluation, performance testing, reverse engineering, or security analysis of Android applications. The building process happens in an isolated Docker container.

🚀 Features

  • 🔗 Clone any Android GitHub repository.
  • ⚙️ Auto-configure Gradle build for debugging.
  • 🤖 LLM-guided build troubleshooting and error recovery.
  • 📦 Outputs ready-to-install debugging APK.
  • 🧪 Supports workflows for performance evaluation and static/dynamic analysis.

📦 Installation

pip install build-anadroid

📦 Dev Container Setup

To setup in a VSCode Dev Container:

  1. Install the Dev Containers extension.
  2. Clone this repository.
  3. Open the repository in VSCode, and it will prompt you to reopen in the dev container. Alternatively, use a command to open the current folder in a dev container.

✅ Requirements

  • Python 3.10+
  • Git installed and accessible from terminal
  • OpenAI API key (or other LLM provider) for LLM access.

⚙️ LLM Configuration

buildAnaDroid uses an LLM backend for build assistance. To use it:

  1. Obtain your API key from OpenAI or compatible provider.
  2. Set your API key as a token file:
"your-api-key-here"
"your-base-url-here"
"your-llm-model-here"

Base url and LLM model are optional. If not provided, buildAnaDroid will use OpenAI's gpt-4.1-mini-2025-04-14. For example, if you put 'https://generativelanguage.googleapis.com/v1beta/openai/' as your base url, buildAnaDroid will access Google AI's gemini-2.0-flash-lite. If you want to use other providers, you have to provide the base url and the LLM model in openai_token.txt.

🖥️ Usage

CLI Usage

build-anadroid build https://github.com/user/project # Run on a single repository
build-anadroid build repos.txt # Run on a list of repositories from a file
build-anadroid clean # Clean test results

Advanced Options for Builds

  • -n, --num: Specify cycle limit (max. number of commands to execute)
  • -c, --conv: Enable conversation mode
  • -k, --keep-container: Keep container after build (Removes container by default)

🛠️ Troubleshooting

If the build fails, buildAnaDroid will attempt to:

  1. Analyze the error output.
  2. Query the LLM for common solutions.
  3. Retry the build with suggested fixes.

Note: Some complex/outdated builds may still require manual intervention.

🏗️ Roadmap

  • Support Python usage
  • Integration with emulator for automated APK testing

🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss.

📜 License

MIT License. See LICENSE for details.

🙏 Acknowledgments

  • OpenAI for LLM API
  • ExecutionAgent

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

build_anadroid-0.1.0.tar.gz (48.7 kB view details)

Uploaded Source

Built Distribution

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

build_anadroid-0.1.0-py3-none-any.whl (58.3 kB view details)

Uploaded Python 3

File details

Details for the file build_anadroid-0.1.0.tar.gz.

File metadata

  • Download URL: build_anadroid-0.1.0.tar.gz
  • Upload date:
  • Size: 48.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for build_anadroid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7460243cd2b83dd9cc904c134145774516685e560d84d71faa4855d405001327
MD5 bedd76cdb13e5c70105a8ec2ffdee970
BLAKE2b-256 016eb52d29ec62cc12a917c1ba47f17373ad6f3da7f60e4536474200dffddbb1

See more details on using hashes here.

File details

Details for the file build_anadroid-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: build_anadroid-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 58.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for build_anadroid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87673398594dc9eaf56d99ee265099e2ef3a8d260d032ec34411afdd2bfc397b
MD5 f8ae828417ff013e0fabc078addc7e1d
BLAKE2b-256 f188143ae7134446420c93faef27a257770b7b37b0395e11ecbed31c19fc0803

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