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:
- Install the Dev Containers extension.
- Clone this repository.
- 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:
- Obtain your API key from OpenAI or compatible provider.
- Set your API key as a .env file:
API_KEY=<your-api-key-here>
BASE_URL=<your-base-url-here>
LLM_MODEL=<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/' 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 .env.
🖥️ 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 build local_path --local # Run with a local repository
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 (API works with conversation models)-k,--keep-container: Keep container after build (buildAnaDroid removes container by default)-l,--local: Build from a local repository (Provide local path instead of Github link)
Python Usage
import buildAnaDroid
# You must load environment variables separately for Python usage
source = "https://github.com/user/project"
buildAnaDroid.process_repository(repo_source=source)
# args:
# repo_source: str, num: int=40, conversation: bool=False, keep_container:bool=False, user_retry:bool=False, local_path:bool=False
🛠️ Troubleshooting
If the build fails, buildAnaDroid will attempt to:
- Analyze the error output.
- Query the LLM for common solutions.
- Retry the build with suggested fixes.
❗ Note: Some complex/outdated builds may still require manual intervention.
🏗️ Roadmap
- 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
Metadata
Release files for build-anadroid 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| build_anadroid-0.6.2.tar.gz | 106.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| build_anadroid-0.6.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 223.4 kB
Release files / build_anadroid-0.6.2.tar.gz
| Download URL | build_anadroid-0.6.2.tar.gz |
|---|---|
| Size | 106.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eefc952dc3e2a6429b260a1e4f9a64e09c9f7fae853d1657945e0da3cafc624e
|
|
BLAKE2b-256 checksum How to use checksums |
9063bc9bffbc30b86f8dc8323fcf85d95ac43283d1f9b6b88db825e04291eb9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.10
|
Release files / build_anadroid-0.6.2-py3-none-any.whl
| Download URL | build_anadroid-0.6.2-py3-none-any.whl |
|---|---|
| Size | 116.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0a9e8e8578afd4e8b58da9e3d1b6b7d6c8531102e2f32430fd07b925e23768d
|
|
BLAKE2b-256 checksum How to use checksums |
699d4b99806b5113487119741c42e7ca63732c0b304abf811b32f4b4c4394ad1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.10
|