adb-device-workflow

Automate Android device connection and debug APK installation via ADB.

51|6|Updated Mar 10, 2019
One-click install
npx skills add https://github.com/AniTrend/anitrend-v2 --skill adb-device-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adb-device-workflow
Source: https://github.com/AniTrend/anitrend-v2/tree/main/.agents/skills/adb-device-workflow
Command: npx skills add https://github.com/AniTrend/anitrend-v2 --skill adb-device-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you reliably connect to an Android device and diagnose why a debug APK fails to install or launch, reducing time spent on guesswork.

Core Features & Use Cases

  • Device connectivity verification (USB/Wireless): Detects no-device, unauthorized, offline, and reconnect scenarios before deployment.
  • Deterministic debug installation flow: Installs via Gradle first, with a targeted adb fallback that supports flavor/package variations.
  • Process and log validation for failures: Launches, confirms the app PID, resolves the correct installed package, and captures focused logcat output.
  • Recovery branches for common install issues: Handles INSTALL_FAILED_UPDATE_INCOMPATIBLE, signature/stale state via uninstall/pm clear, and offline recovery.
  • Escalation to deeper runtime investigation: Points to a more advanced workflow when basic logcat is insufficient.

Quick Start

Use the adb-device-workflow skill to deploy and validate your AniTrend debug build on the connected USB device by following the ADB device detection, Gradle install, launch, PID check, and scoped logcat capture steps.

Frequently Asked Questions about adb-device-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I troubleshoot an Android debug APK that fails to install or launch?

Recover offline or unauthorized ADB devices by checking adb server health, enumerating targets to detect connection states, and applying targeted reconnection steps before attempting debug build installation.

How do I capture logcat output for startup crashes using a specific app PID?

Capture PID-scoped logcat output for startup crashes by launching the app, confirming the active process ID, resolving the installed package name, and filtering logs to that process for focused diagnostics.

Can I deploy a debug build over wireless ADB instead of USB?

Deploy debug builds over wireless ADB by verifying device connectivity across both USB and wireless targets, enumerating available devices, and proceeding with the standard Gradle-first installation and validation flow.

What is the best way to resolve INSTALL_FAILED_UPDATE_INCOMPATIBLE during adb deployment?

Resolve INSTALL_FAILED_UPDATE_INCOMPATIBLE errors during adb deployment by executing recovery branches that clear stale state, uninstall the conflicting package, and retry the debug build installation.

When should I escalate beyond basic logcat for Android runtime investigation?

Escalate to deeper runtime investigation when basic PID-scoped logcat captures are insufficient to diagnose startup crashes or deployment failures, requiring more advanced analysis of the Android runtime environment.