Android & Wear OS Testing Guide

SkillDev tools

Workflows and ADB commands for testing Android and Wear OS applications. Covers system state simulation (Doze mode, battery levels, network failover, Bluetooth proxy), location and sensor spoofing, health permissions, UI automation guidelines, and Wear OS surfaces (tiles, complications, watch faces). Use when testing Android or Wear OS apps, simulating edge cases, debugging device connectivity, or automating UI test procedures.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Android & Wear OS Testing Guide skill

What this skill tells your AI

The instructions your AI receives, as published by ithinkihaveacat/dotfiles in skills/android-testing/SKILL.md and read by ahel’s review.

This skill provides comprehensive workflows, guidelines, and ADB commands to test Android applications reliably across mobile phones and Wear OS devices. It focuses on triggering system state changes, validating real-time synchronization, implementing robust UI automation, and simulating complex edge cases (Doze mode, data layer disconnection, and Fused Location spoofing limits).

Procedural Workflows & Testing Recipes

1. Power & Doze Mode Simulation

Test how applications handle background execution, power constraints, and Doze mode transitions:

# Force device into Doze (Idle) mode
adb shell dumpsys deviceidle force-idle

# Exit Doze mode
adb shell dumpsys deviceidle unforce

# Simulate low battery level (5%)
adb shell dumpsys battery unplug
adb shell dumpsys battery set level 5

# Reset battery state to default hardware behavior
adb shell dumpsys battery reset

2. Connectivity & Network Edge Cases

Simulate network isolation and diagnose Bluetooth proxy / Wi-Fi fallback:

# Isolate device (disable Bluetooth and Wi-Fi simultaneously)
adb shell svc bluetooth disable
adb shell svc wifi disable

# Restore connectivity
adb shell svc bluetooth enable
adb shell svc wifi enable

# Direct Wi-Fi credential injection (bypasses stale watch credentials)
adb shell 'cmd wifi connect-network "<SSID>" wpa2 <PASSWORD>'

[!NOTE] Wear OS Wi-Fi Delay: Wear OS delays activating Wi-Fi for 45–60 seconds after Bluetooth disconnection to conserve power. Wait at least 60 seconds before evaluating Wi-Fi fallback.

3. Headless Emulator Setup & Tutorial Bypass

Bootstrap fresh or headless emulators to ensure tests run without blocking overlays or keyguard locks:

# Wake up and dismiss keyguard
adb shell input keyevent KEYCODE_WAKEUP
adb shell wm dismiss-keyguard

# Dismiss charging animation overlay (if present)
adb shell dumpsys battery unplug

# Bypass Wear OS tutorial and initial setup overlays
adb shell am broadcast -a com.google.android.clockwork.action.TEST_MODE
adb shell am broadcast -a com.google.android.clockwork.action.TUTORIAL_SKIP

4. Wear OS Surface Interaction

Trigger debug broadcasts to update or inspect Wear OS Tiles and Complications:

# Add a Tile component to the carousel
adb shell am broadcast -a com.google.android.wearable.app.DEBUG_SURFACE \
  --es operation add-tile --ecn component "<PACKAGE>/<TILE_SERVICE>" --ei type 0

# Switch active Tile by index
adb shell am broadcast -a com.google.android.wearable.app.DEBUG_SYSUI \
  --es operation show-tile --ei index 0

# Trigger a Complication update
adb shell am broadcast -a com.google.android.wearable.app.DEBUG_SYSUI \
  --es operation complication_update --ei complication_id <ID>

How to Approach Testing

  1. Review Requirements: Identify the specific device form factor, API level (API 30–36+), and subsystem under test.
  2. Apply Capabilities: Use standard ADB commands or workspace device automation tools to simulate state changes.
  3. Consult References: Load the dedicated reference documents below for in-depth guidelines, sensor schemas, and platform quirks.

Reference Material

  • UI Automation Guidelines — "Behave Like a Real User" and "Visual Timeline" policies for robust, non-flaky UI test automation.
  • System States & Connectivity — Bluetooth proxy bandwidth limits, Wi-Fi failovers, Doze mode, and battery simulation.
  • Location & Sensors — Fused Location Provider rules, Mock Location App requirements, Wear Health Services synthetic data, and One-Handed Gestures (Double-Pinch) simulation.
  • Permissions & OS Behavior — Foreground Service types, API 30–36 changes, and Wear OS granular health permissions.
  • Wear Surfaces — Interacting with Tiles, Watch Faces, and Complications via DEBUG_SURFACE/DEBUG_SYSUI; includes headless setup and GMS capability sync workarounds.
  • Testability Patterns — App-side debug receivers, data seeding, OOBE race conditions, and standby buckets.

Signals

GitHub stars
48
Forks
10
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
android-testing-ithinkihaveacat
Source
github.com/ithinkihaveacat/dotfiles