home / skills / willsigmon / sigstack / android-emulator-qa

android-emulator-qa skill

/plugins/testing/skills/android-emulator-qa

This skill automates Android emulator QA and visual checks using adb and Claude Vision to capture screenshots and verify UI consistency.

npx playbooks add skill willsigmon/sigstack --skill android-emulator-qa

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.1 KB
---
name: Android Emulator QA
description: Android Emulator automation - screenshot capture, UI testing, visual QA for Android apps
allowed-tools: Read, Edit, Bash
model: sonnet
---

# Android Emulator QA Expert

Automate Android testing and visual QA using the Emulator.

## For Vibe Coders
Use ADB commands and Claude Vision to QA Android apps without writing test code.

## ADB Basics

### Device Connection
```bash
# List connected devices/emulators
adb devices

# Connect to specific emulator
adb -s emulator-5554 shell
```

### Screenshot
```bash
# Capture screenshot
adb exec-out screencap -p > android-screen.png

# With device selection
adb -s emulator-5554 exec-out screencap -p > screen.png
```

### Screen Recording
```bash
# Start recording (max 3 minutes)
adb shell screenrecord /sdcard/recording.mp4

# Stop with Ctrl+C, then pull file
adb pull /sdcard/recording.mp4 ./recording.mp4
```

## Emulator Commands

### Launch Emulator
```bash
# List available AVDs
emulator -list-avds

# Launch specific AVD
emulator -avd Pixel_7_API_34 &
```

### Quick Boot
```bash
# Cold boot (fresh start)
emulator -avd Pixel_7_API_34 -no-snapshot-load

# Quick boot (resume state)
emulator -avd Pixel_7_API_34
```

## Automated QA Flow

### Multi-Device Testing
```bash
#!/bin/bash
# qa-android-devices.sh

devices=("Pixel_4_API_34" "Pixel_7_API_34" "Pixel_Tablet_API_34")

for device in "${devices[@]}"; do
  echo "Testing on $device..."

  # Launch emulator
  emulator -avd "$device" -no-window &
  sleep 30  # Wait for boot

  # Install app
  adb install -r app/build/outputs/apk/debug/app-debug.apk

  # Launch app
  adb shell am start -n com.example.app/.MainActivity

  sleep 3

  # Screenshot
  adb exec-out screencap -p > "qa-${device}.png"

  # Kill emulator
  adb emu kill
done

echo "Screenshots ready for review!"
```

### Dark Theme Toggle
```bash
# Enable dark theme
adb shell "cmd uimode night yes"
sleep 2
adb exec-out screencap -p > dark-mode.png

# Enable light theme
adb shell "cmd uimode night no"
sleep 2
adb exec-out screencap -p > light-mode.png
```

### Font Scale Testing
```bash
# Large font
adb shell settings put system font_scale 1.3
sleep 2
adb exec-out screencap -p > large-font.png

# Default
adb shell settings put system font_scale 1.0
```

## Deep Linking

```bash
# Open specific activity via intent
adb shell am start -a android.intent.action.VIEW \
  -d "myapp://settings" com.example.app
sleep 2
adb exec-out screencap -p > settings.png
```

## App Interaction

### Tap/Click
```bash
# Tap at coordinates (x, y)
adb shell input tap 540 1200
```

### Swipe
```bash
# Swipe down (scroll)
adb shell input swipe 540 1000 540 200 300
```

### Text Input
```bash
adb shell input text "Hello%sWorld"  # %s = space
```

## Common Checks for Claude Vision
- [ ] Material Design compliance
- [ ] Edge-to-edge display
- [ ] Navigation bar handling
- [ ] Tablet layouts
- [ ] RTL language support
- [ ] Dark theme colors

## Integration with Claude

Drag screenshots into Claude and ask:
- "Is this following Material Design guidelines?"
- "Check for Android-specific UI issues"
- "Compare phone vs tablet layout"

Use when: Android visual testing, emulator automation, multi-device QA

Overview

This skill automates Android Emulator QA using ADB and emulator commands to capture screenshots, run UI interactions, and perform visual checks. It focuses on quick boot, multi-device flows, theme and font-scale scenarios, and generating assets for visual review. The skill pairs automated captures with image-based inspection to find UI regressions and platform-specific issues.

How this skill works

Scripts launch AVDs, install the test APK, drive the app with input commands (tap, swipe, intent launches), and capture screenshots or recordings via adb exec-out screencap and screenrecord. You can iterate across device profiles, toggle UI modes (dark/light, font scale), and pull artifacts for automated or human review. Captures are intended for downstream visual QA tools or Claude Vision-style inspection to validate Material Design, layout, and platform behavior.

When to use it

  • Run automated visual checks across multiple emulator profiles before a release.
  • Validate dark mode, large-font, and RTL layout behavior without writing complex test code.
  • Quickly reproduce UI issues reported by users using emulator snapshots and deep links.
  • Generate consistent screenshots for design review or visual regression tools.
  • Integrate with image-based AI inspection to catch Material Design or Android-specific issues.

Best practices

  • Start emulators with -no-window for headless CI runs and add sufficient boot sleep before actions.
  • Use device lists and loops to ensure consistent app install/start and artifact naming per AVD.
  • Toggle system settings (uimode, font_scale) programmatically to cover accessibility and theme variants.
  • Pull recordings and screenshots promptly after capture; kill emulators cleanly to avoid stale states.
  • Keep adb commands deterministic (fixed coordinates, known activity names) and use deep links for navigation where possible.

Example use cases

  • CI job that launches three AVDs, installs the debug APK, captures screenshots, and uploads them for visual diffing.
  • Manual QA flow: toggle dark/light and large-font, capture each state, and drop images into a vision tool for design compliance checks.
  • Reproduce a user bug by launching an intent to the specific activity, capturing the screen, and sharing the artifact with developers.
  • Tablet vs phone layout comparison: run the same scenario on phone and tablet AVDs and inspect differences in layout and navigation.

FAQ

How long should I wait after launching an emulator before interacting?

Wait until adb devices shows the emulator as 'device' and add a conservative sleep (30s) for initial boot; adjust for CI performance.

Can I run these flows headless in CI?

Yes. Use emulator -no-window, run adb commands in scripts, and pull screenshots/recordings to the CI runner for analysis.