Android Builder
June 9, 2026 Β· View on GitHub
AI-operable Android Runtime Layer. Universal build, test, install, and diagnostic driver for Android apps.
Features
- π Auto Detection: Package name, main Activity, Gradle, ADB
- π± Device Management: USB/WiFi auto connection
- π Smart Wireless: Auto-detect device WiFi IP, check same LAN, get debug port
- π One-Click Smoke Test: build β test β install β launch + crash detection
- π©Ί Doctor: Environment diagnosis + crash analysis
- πΈ Screenshot: Auto capture device screen
- ποΈ UI Dump: Export UI hierarchy for AI analysis
- π JSON Output: Machine-readable output for automation
- βοΈ Interactive Setup: Guided first-time configuration
Quick Start
# Clone
git clone https://github.com/AnonyJcy/android-builder.git
# Enter your Android project
cd /path/to/your/android/project
# Initialize config
bash /path/to/android-builder/driver.sh init
# Run smoke test
bash /path/to/android-builder/driver.sh smoke
Commands
Basic
| Command | Description |
|---|---|
init | Initialize project config |
build | Build debug APK |
test | Run unit tests |
install | Auto build + install APK |
launch | Launch app on device |
logcat | View app logs |
clean | Clean build |
smoke | Full smoke test with crash detection |
connect | Check/connect wireless device |
devices | List connected devices |
Diagnostic
| Command | Description |
|---|---|
doctor | Environment diagnosis + crash analysis |
screenshot | Take device screenshot |
ui-dump | Export UI hierarchy (XML) |
inspect | Screenshot + UI dump (for AI analysis) |
Options
| Option | Description |
|---|---|
--json | JSON output (for: devices, doctor, smoke) |
Examples
# Environment check
bash driver.sh doctor
# JSON output for automation
bash driver.sh doctor --json
bash driver.sh devices --json
# Take screenshot
bash driver.sh screenshot
bash driver.sh screenshot my_capture
# Export UI structure
bash driver.sh ui-dump
# Full inspection (screenshot + UI dump)
bash driver.sh inspect
# Enhanced smoke test
bash driver.sh smoke
bash driver.sh smoke --json
Doctor Output
[OK] Java detected: 21
[OK] ADB detected: adb
[OK] Device connected
[OK] Device WiFi IP: 192.168.1.100
[OK] No recent crashes found
JSON:
{
"java": true,
"adb": true,
"gradle": true,
"device_connected": true,
"wifi_ip": "192.168.1.100",
"has_crash": false
}
Smoke Test Flow
- Build β Compile APK
- Test β Run unit tests
- Check APK β Verify artifact
- Install β Install to device
- Launch β Start app
- Wait β Stabilize
- Activity Check β Detect foreground
- Crash Check β Detect runtime crashes
- Screenshot β Auto capture
Prerequisites
- JDK 17+
- Android SDK
- ADB (Download)