android-deploy-usb
Build and deploy Android app to connected device via USB. Fast deployment (~2-5 seconds) using Gradle and ADB. Use when deploying, installing, or building Android apps to physical devices.
Best use case
android-deploy-usb is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Build and deploy Android app to connected device via USB. Fast deployment (~2-5 seconds) using Gradle and ADB. Use when deploying, installing, or building Android apps to physical devices.
Teams using android-deploy-usb should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/android-deploy-usb/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How android-deploy-usb Compares
| Feature / Agent | android-deploy-usb | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Build and deploy Android app to connected device via USB. Fast deployment (~2-5 seconds) using Gradle and ADB. Use when deploying, installing, or building Android apps to physical devices.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Android USB Deploy ## Overview Builds an Android app using Gradle and installs it directly to a USB-connected Android device via ADB (Android Debug Bridge). This is the fastest way to test on real hardware during development. ## When to Use Invoke this skill when the user: - Asks to "deploy to Android" - Wants to "install the app on device" - Says "build and deploy Android" - Mentions testing on physical Android device - Wants to "push to device" ## Prerequisites - Android device connected via USB - **USB Debugging enabled** (Settings → System → Developer options → USB debugging) - **Developer Mode enabled** (Settings → About Phone → tap Build number 7 times) - ADB installed (`brew install android-platform-tools` on macOS) - Device authorized for debugging (RSA key accepted) - **JAVA_HOME** must be set: `export JAVA_HOME="/opt/homebrew/opt/openjdk"` ## Instructions 1. Navigate to the Android app directory (look for build.gradle.kts): ```bash cd path/to/android/app ``` 2. Set JAVA_HOME environment variable: ```bash export JAVA_HOME="/opt/homebrew/opt/openjdk" ``` 3. Run the install-device.sh script: ```bash ./install-device.sh ``` 4. The script will: - Check if device is connected via `adb devices` - Build the APK with `./gradlew assembleDebug` - Install with `adb install -r app/build/outputs/apk/debug/app-debug.apk` - Launch the app with `adb shell am start` 5. Inform the user: - Initial build may take longer (~10-30 seconds) - Subsequent builds are faster (~2-5 seconds) - App will launch automatically on device - Check device screen to see the app running ## Expected Output ``` 📱 Installing NoobTest to connected device... ✅ Found device: ABC123XYZ 🔨 Building... ✅ Build complete 📲 Installing... ✅ Installation complete 🚀 Launching app... 🎉 App installed and launched! ``` ## How It Works The deployment process: 1. **Check device**: `adb devices` confirms connection 2. **Build APK**: `./gradlew assembleDebug` compiles the app 3. **Install**: `adb install -r` (replace existing installation) 4. **Launch**: `adb shell am start -n com.miso.noobtest/.MainActivity` ## Common Issues **"no devices found"**: - Enable USB debugging in Developer Options - Accept RSA authorization prompt on device - Try: `adb kill-server && adb start-server` - Check USB cable supports data (not just charging) **"Unable to locate a Java Runtime"**: - Set JAVA_HOME: `export JAVA_HOME="/opt/homebrew/opt/openjdk"` - Verify: `echo $JAVA_HOME` - Install OpenJDK if missing: `brew install openjdk` **"INSTALL_FAILED_UPDATE_INCOMPATIBLE"**: - App signatures don't match existing installation - Uninstall first: `adb uninstall com.miso.noobtest` - Try installation again **"device unauthorized"**: - Check device screen for RSA key authorization prompt - Accept the authorization - Replug device and try again **"adb: command not found"**: - Install Android platform tools: `brew install android-platform-tools` ## Build Speed - **First build**: ~10-30 seconds (downloads dependencies) - **Incremental builds**: ~2-5 seconds - Much faster than iOS due to Gradle's incremental compilation ## Package Name The script is configured for the specific app's package name (e.g., `com.miso.noobtest` for Firefly/NoobTest). Different apps have different package names configured in build.gradle.kts. ## Gradle Note Always set `JAVA_HOME` before running Gradle commands. This is a critical requirement on macOS with Homebrew-installed Java.
Related Skills
arc-terraform-deployment
Deploy ARC (Actions Runner Controller) infrastructure using Terraform on Rackspace Spot. Handles CRD registration, ArgoCD installation, and namespace management. Use when deploying or troubleshooting ARC infrastructure.
app-store-deployment
Publishes mobile applications to iOS App Store and Google Play with code signing, versioning, and CI/CD automation. Use when preparing app releases, configuring signing certificates, or setting up automated deployment pipelines.
ansible-deployment
Automates server configuration and multi-server deployments. Use when writing Ansible playbooks, setting up SSH auth, or checking deployment diffs.
android-screen-capture
Start Android screen mirroring using scrcpy. Displays device screen in real-time on Mac with optional console logs. Use when viewing Android screen, mirroring device, or monitoring app with logs.
android-playstore-setup
Complete Play Store setup - orchestrates scanning, privacy policy, version management, Fastlane, and workflows (Internal track only)
android-playstore-pipeline
Complete end-to-end Android Play Store deployment pipeline setup in one command
android-fastlane-setup
Setup Fastlane for Play Store deployment with supply and screengrab
android-espresso-dependencies
Add Espresso and AndroidX Test dependencies to Android project
android-ci-tests
Setup GitHub Actions workflow for running Android tests in CI
aks-deployment
Deploying and debugging Toygres on AKS (Azure Kubernetes Service). Use when deploying, debugging pods, viewing logs, troubleshooting SSL, or managing Kubernetes resources.
aks-deployment-troubleshooter
Diagnose and fix Kubernetes deployment failures, especially ImagePullBackOff, CrashLoopBackOff, and architecture mismatches. Battle-tested from 4-hour AKS debugging session with 10+ failure modes resolved.
agentuity-cli-cloud-machine-deployments
List deployments running on a specific organization managed machine. Requires authentication. Use for Agentuity cloud platform operations