adb-device-testing
Use when testing Android apps on ADB-connected devices/emulators - UI automation, screenshots, location spoofing, navigation, app management. Triggers on ADB, emulator, Android testing, location mock, UI test, screenshot walkthrough.
Best use case
adb-device-testing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when testing Android apps on ADB-connected devices/emulators - UI automation, screenshots, location spoofing, navigation, app management. Triggers on ADB, emulator, Android testing, location mock, UI test, screenshot walkthrough.
Teams using adb-device-testing 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/adb-device-testing/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How adb-device-testing Compares
| Feature / Agent | adb-device-testing | 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?
Use when testing Android apps on ADB-connected devices/emulators - UI automation, screenshots, location spoofing, navigation, app management. Triggers on ADB, emulator, Android testing, location mock, UI test, screenshot walkthrough.
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.
Related Guides
SKILL.md Source
# ADB Device Testing ## Quick Reference ### Screenshots (Multimodal) ```bash adb exec-out screencap -p > /tmp/screen.png ``` Then use Read tool to VIEW the image. ### Location Spoofing (Emulator Only) ```bash # longitude, latitude adb emu geo fix -74.006 40.7128 # NYC adb emu geo fix 2.3522 48.8566 # Paris ``` IMPORTANT: for getting proper component location always use Element Discovery (uiautomator) ### Navigation | Action | Command | |--------|---------| | Tap | `adb shell input tap <x> <y>` | | Scroll up | `adb shell input swipe 500 1500 500 500 300` | | Scroll down | `adb shell input swipe 500 500 500 1500 300` | | Back | `adb shell input keyevent KEYCODE_BACK` | | Home | `adb shell input keyevent KEYCODE_HOME` | | Text | `adb shell input text "hello"` | | Long press | `adb shell input swipe 500 500 500 500 1000` | ### Element Discovery (uiautomator) ```bash adb shell uiautomator dump /sdcard/ui.xml adb pull /sdcard/ui.xml /tmp/ui.xml # Parse bounds="[x1,y1][x2,y2]" → tap center ``` ### App Management ```bash adb install -r app.apk adb shell am start -n <package>/<activity> adb shell am force-stop <package> adb shell pm clear <package> ``` ## Testing Workflow Copy this checklist: ``` Progress: - [ ] Verify device connected (adb devices) - [ ] Setup: install app, clear state, set location - [ ] Screenshot initial state - [ ] Execute test actions (tap/swipe) - [ ] Wait after each action (sleep 0.5-1) - [ ] Screenshot and verify each step - [ ] Report results with evidence ``` ### Step-by-Step **1. Verify Connection** ```bash adb devices -l ``` No devices? Check USB debugging enabled, emulator running. **2. Setup** ```bash adb install -r /path/to/app.apk adb shell pm clear <package> adb emu geo fix <lon> <lat> # emulator only adb shell am start -n <package>/<activity> sleep 2 ``` **3. Test Loop** ```bash # Screenshot adb exec-out screencap -p > /tmp/screen_01.png # View screenshot with Read tool to analyze UI # Identify tap coordinates from UI or uiautomator dump adb shell input tap <x> <y> sleep 1 # Screenshot to verify adb exec-out screencap -p > /tmp/screen_02.png ``` **4. Element Finding** ```bash adb shell uiautomator dump /sdcard/ui.xml adb pull /sdcard/ui.xml /tmp/ui.xml # Grep for element: bounds="[100,200][300,400]" # Tap center: (100+300)/2=200, (200+400)/2=300 adb shell input tap 200 300 ``` ## Critical Rules 1. **Always wait** after UI actions before screenshots (`sleep 0.5-1`) 2. **View screenshots** with Read tool - don't just capture 3. **Use absolute paths** for screenshot files 4. **Location spoofing = emulator only** - physical devices need mock apps 5. **Parse uiautomator XML** for precise element coordinates ## Advanced Features **Device info:** ```bash adb shell wm size # resolution adb shell getprop ro.product.model ``` **Logs:** ```bash adb logcat -d | grep <package> ``` **Screen recording:** ```bash adb shell screenrecord /sdcard/demo.mp4 # Ctrl+C to stop adb pull /sdcard/demo.mp4 /tmp/ ``` **For complex testing scenarios**: See [ADVANCED.md](ADVANCED.md)
Related Skills
add-backend-testing
Add backend integration testing with Vitest to an existing app. Sets up isolated test database schema and writes tests for tRPC routers.
act-local-testing
Use when testing GitHub Actions workflows locally with act. Covers act CLI usage, Docker configuration, debugging workflows, and troubleshooting common issues when running workflows on your local machine.
accessibility-testing
WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification. Use when ensuring legal compliance (ADA, Section 508), testing for disabilities, or building accessible applications for 1 billion disabled users globally.
acceptance-testing
Plan and (when feasible) implement or execute user acceptance tests (UAT) / end-to-end acceptance scenarios. Converts requirements or user stories into acceptance criteria, test cases, test data, and a sign-off checklist; suggests automation (Playwright/Cypress for web, golden/snapshot tests for CLIs/APIs). Use when validating user-visible behavior for a release, or mapping requirements to acceptance coverage.
acc-testing-knowledge
Testing knowledge base for PHP 8.5 projects. Provides testing pyramid, AAA pattern, naming conventions, isolation principles, DDD testing guidelines, and PHPUnit patterns.
ab-testing
Use when designing experiments for subject lines, offers, cadences, or journeys.
ab-testing-statistician
Expert in statistical analysis for blind A/B and ABX audio testing. Validates randomization, calculates statistical significance, and ensures proper experimental design. Use when implementing A/B test features or analyzing test results.
ab-testing-analyzer
全面的AB测试分析工具,支持实验设计、统计检验、用户分群分析和可视化报告生成。用于分析产品改版、营销活动、功能优化等AB测试结果,提供统计显著性检验和深度洞察。
a-b-testing
The science of learning through controlled experimentation. A/B testing isn't about picking winners—it's about building a culture of validated learning and reducing the cost of being wrong. This skill covers experiment design, statistical rigor, feature flagging, analysis, and building experimentation into product development. The best experimenters know that every test, positive or negative, teaches something valuable. Use when "a/b test, experiment, hypothesis, statistical significance, sample size, feature flag, variant, control, treatment, p-value, conversion rate, test winner, split test, experimentation, testing, statistics, feature-flags, hypothesis, growth, optimization, learning, validation" mentioned.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Build Your Testing Skill
Create your agent-tdd skill in one prompt, then learn to improve it throughout the chapter
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.