android-emulator-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Android Emulator Skill

Android模拟器Skill

Build, test, and automate Android applications using accessibility-driven navigation and structured data instead of pixel coordinates.
通过无障碍驱动的导航和结构化数据(而非像素坐标)来构建、测试和自动化Android应用。

Quick Start

快速开始

bash
undefined
bash
undefined

1. Launch app

1. 启动应用

python scripts/app_launcher.py --launch com.example.app
python scripts/app_launcher.py --launch com.example.app

2. Map screen to see elements

2. 映射屏幕以查看元素

python scripts/screen_mapper.py
python scripts/screen_mapper.py

3. Tap button

3. 点击按钮

python scripts/navigator.py --find-text "Login" --tap
python scripts/navigator.py --find-text "Login" --tap

4. Enter text

4. 输入文本

python scripts/navigator.py --find-type EditText --enter-text "user@example.com"
python scripts/navigator.py --find-type EditText --enter-text "user@example.com"

5. Run accessibility audit

5. 运行无障碍审计

python scripts/accessibility_audit.py

All scripts support `--help` for detailed options and `--json` for machine-readable output.
python scripts/accessibility_audit.py

所有脚本均支持`--help`参数查看详细选项,以及`--json`参数生成机器可读的输出。

Status: Feature Complete (v0.1.0)

状态:功能完整(v0.1.0)

Completed Components ✓ (20 scripts)

已完成组件 ✓(20个脚本)

Core Utilities (3 modules)

核心工具(3个模块)

  1. common/device_utils.py - ADB command building and device detection
  2. common/screenshot_utils.py - Screenshot capture and processing
  3. common/cache_utils.py - Progressive disclosure cache system
  1. common/device_utils.py - ADB命令构建与设备检测
  2. common/screenshot_utils.py - 截图捕获与处理
  3. common/cache_utils.py - 渐进式披露缓存系统

App Management (1 script)

应用管理(1个脚本)

  1. app_launcher.py - App lifecycle management
    • Launch apps by package name
    • Terminate apps
    • Install/uninstall APKs
    • Deep link navigation
    • List installed packages
    • Check app state
    • Options:
      --launch
      ,
      --terminate
      ,
      --install
      ,
      --uninstall
      ,
      --open-url
      ,
      --list
      ,
      --state
      ,
      --json
  1. app_launcher.py - 应用生命周期管理
    • 通过包名启动应用
    • 终止应用
    • 安装/卸载APK
    • 深度链接导航
    • 列出已安装包
    • 检查应用状态
    • 选项:
      --launch
      ,
      --terminate
      ,
      --install
      ,
      --uninstall
      ,
      --open-url
      ,
      --list
      ,
      --state
      ,
      --json

Device Lifecycle (5 scripts) ✓ COMPLETE

设备生命周期(5个脚本)✓ 已完成

  1. emulator_boot.py - Boot emulators with optional readiness verification
    • Boot by AVD name
    • Wait for device ready with timeout
    • Batch boot operations
    • Headless mode support
    • Options:
      --avd
      ,
      --wait-ready
      ,
      --timeout
      ,
      --headless
      ,
      --list-avds
      ,
      --json
  2. emulator_shutdown.py - Gracefully shutdown emulators
    • Shutdown by serial number
    • Optional verification of shutdown completion
    • Batch shutdown operations
    • Options:
      --serial
      ,
      --verify
      ,
      --timeout
      ,
      --all
      ,
      --json
  3. emulator_create.py ⭐ NEW - Create AVDs dynamically
    • Create by device type and API level
    • List available device definitions
    • List available system images
    • Options:
      --device
      ,
      --api
      ,
      --name
      ,
      --abi
      ,
      --variant
      ,
      --list-devices
      ,
      --list-images
      ,
      --json
  4. emulator_delete.py ⭐ NEW - Delete AVDs permanently
    • Delete by AVD name
    • List available AVDs
    • Options:
      --name
      ,
      --list
      ,
      --json
  5. emulator_erase.py ⭐ NEW - Factory reset AVDs
    • Wipe user data without deleting AVD
    • Preserve AVD configuration
    • Options:
      --name
      ,
      --force
      ,
      --list
      ,
      --json
  1. emulator_boot.py - 启动模拟器,可选就绪验证
    • 通过AVD名称启动
    • 等待设备就绪(带超时)
    • 批量启动操作
    • 无头模式支持
    • 选项:
      --avd
      ,
      --wait-ready
      ,
      --timeout
      ,
      --headless
      ,
      --list-avds
      ,
      --json
  2. emulator_shutdown.py - 优雅关闭模拟器
    • 通过序列号关闭
    • 可选验证关闭完成状态
    • 批量关闭操作
    • 选项:
      --serial
      ,
      --verify
      ,
      --timeout
      ,
      --all
      ,
      --json
  3. emulator_create.py ⭐ 新增 - 动态创建AVD
    • 按设备类型和API级别创建
    • 列出可用设备定义
    • 列出可用系统镜像
    • 选项:
      --device
      ,
      --api
      ,
      --name
      ,
      --abi
      ,
      --variant
      ,
      --list-devices
      ,
      --list-images
      ,
      --json
  4. emulator_delete.py ⭐ 新增 - 永久删除AVD
    • 通过AVD名称删除
    • 列出可用AVD
    • 选项:
      --name
      ,
      --list
      ,
      --json
  5. emulator_erase.py ⭐ 新增 - 恢复AVD出厂设置
    • 清除用户数据但不删除AVD
    • 保留AVD配置
    • 选项:
      --name
      ,
      --force
      ,
      --list
      ,
      --json

Build & Development (2 scripts) ✓ COMPLETE

构建与开发(2个脚本)✓ 已完成

  1. build_and_test.py ⭐ NEW - Gradle build automation
    • Build with minimal token output
    • Clean builds
    • Run tests
    • Parse errors and warnings
    • Options:
      --project
      ,
      --variant
      ,
      --clean
      ,
      --test
      ,
      --verbose
      ,
      --json
  2. log_monitor.py ⭐ NEW - Real-time logcat monitoring
    • Filter by app package
    • Filter by severity (error/warning/info/debug)
    • Smart deduplication
    • Duration-based or follow mode
    • Save logs to file
    • Options:
      --app
      ,
      --serial
      ,
      --severity
      ,
      --follow
      ,
      --duration
      ,
      --output
      ,
      --clear
      ,
      --verbose
      ,
      --json
  1. build_and_test.py ⭐ 新增 - Gradle构建自动化
    • 以最少Token输出进行构建
    • 清理构建
    • 运行测试
    • 解析错误与警告
    • 选项:
      --project
      ,
      --variant
      ,
      --clean
      ,
      --test
      ,
      --verbose
      ,
      --json
  2. log_monitor.py ⭐ 新增 - 实时logcat监控
    • 按应用包过滤
    • 按严重级别过滤(错误/警告/信息/调试)
    • 智能去重
    • 基于时长或跟随模式
    • 将日志保存到文件
    • 选项:
      --app
      ,
      --serial
      ,
      --severity
      ,
      --follow
      ,
      --duration
      ,
      --output
      ,
      --clear
      ,
      --verbose
      ,
      --json

Navigation & Interaction (4 scripts)

导航与交互(4个脚本)

  1. screen_mapper.py - Analyze current screen and list interactive elements
    • Count elements by type
    • List buttons, EditTexts, etc.
    • Token-efficient summaries
    • Options:
      --serial
      ,
      --verbose
      ,
      --json
      ,
      --list
  2. navigator.py - Find and interact with elements semantically
    • Find by text, type, resource ID
    • Tap, enter text, get bounds
    • Fuzzy matching support
    • Options:
      --find-text
      ,
      --find-type
      ,
      --find-id
      ,
      --tap
      ,
      --enter-text
      ,
      --list
      ,
      --serial
      ,
      --json
  3. gesture.py - Perform swipes, scrolls, long press
    • Directional swipes
    • Custom swipe coordinates
    • Scroll and long press
    • Options:
      --swipe
      ,
      --from-edge
      ,
      --duration
      ,
      --long-press
      ,
      --scroll
      ,
      --serial
      ,
      --json
  4. keyboard.py - Text input and hardware buttons
    • Type text
    • Press hardware keys (back, home, enter, etc.)
    • Clear text
    • Options:
      --text
      ,
      --key
      ,
      --button
      ,
      --clear
      ,
      --serial
      ,
      --json
  1. screen_mapper.py - 分析当前屏幕并列出交互元素
    • 按类型统计元素数量
    • 列出按钮、EditText等
    • 高效Token的摘要
    • 选项:
      --serial
      ,
      --verbose
      ,
      --json
      ,
      --list
  2. navigator.py - 语义化查找并与元素交互
    • 按文本、类型、资源ID查找
    • 点击、输入文本、获取边界
    • 模糊匹配支持
    • 选项:
      --find-text
      ,
      --find-type
      ,
      --find-id
      ,
      --tap
      ,
      --enter-text
      ,
      --list
      ,
      --serial
      ,
      --json
  3. gesture.py - 执行滑动、滚动、长按操作
    • 定向滑动
    • 自定义滑动坐标
    • 滚动与长按
    • 选项:
      --swipe
      ,
      --from-edge
      ,
      --duration
      ,
      --long-press
      ,
      --scroll
      ,
      --serial
      ,
      --json
  4. keyboard.py - 文本输入与硬件按键操作
    • 输入文本
    • 按下硬件按键(返回、主页、回车等)
    • 清除文本
    • 选项:
      --text
      ,
      --key
      ,
      --button
      ,
      --clear
      ,
      --serial
      ,
      --json

Testing & Analysis (5 scripts) ✓ COMPLETE

测试与分析(5个脚本)✓ 已完成

  1. accessibility_audit.py ⭐ NEW - WCAG compliance checking
    • Missing content descriptions
    • Touch target size verification
    • EditText hint checking
    • Image accessibility
    • Categorize by severity (critical/warning/info)
    • Save reports (JSON + Markdown)
    • Options:
      --serial
      ,
      --output
      ,
      --verbose
      ,
      --json
  2. visual_diff.py - Compare screenshots for visual changes
    • Pixel-perfect comparison
    • Highlight differences
    • Generate diff images
    • Options:
      --image1
      ,
      --image2
      ,
      --output
      ,
      --threshold
      ,
      --json
  3. test_recorder.py ⭐ NEW - Automatically document test execution
    • Record test steps with screenshots
    • Capture UI hierarchy per step
    • Generate test reports (JSON + Markdown)
    • Inline mode for vision-based testing
    • Options:
      --test-name
      ,
      --output
      ,
      --serial
      ,
      --inline
      ,
      --size
      ,
      --app-name
  4. app_state_capture.py ⭐ NEW - Complete debugging snapshots
    • Capture screenshot + UI hierarchy + logs + app info
    • Create timestamped snapshots
    • All-in-one debugging artifact
    • Options:
      --package
      ,
      --output
      ,
      --serial
      ,
      --logs
      ,
      --no-logs
      ,
      --screenshot-size
      ,
      --json
  1. accessibility_audit.py ⭐ 新增 - WCAG合规性检查
    • 缺失内容描述检查
    • 触摸目标大小验证
    • EditText提示检查
    • 图片无障碍检查
    • 按严重级别分类(严重/警告/信息)
    • 保存报告(JSON + Markdown)
    • 选项:
      --serial
      ,
      --output
      ,
      --verbose
      ,
      --json
  2. visual_diff.py - 对比截图以检测视觉变化
    • 像素级精确对比
    • 高亮显示差异
    • 生成差异图片
    • 选项:
      --image1
      ,
      --image2
      ,
      --output
      ,
      --threshold
      ,
      --json
  3. test_recorder.py ⭐ 新增 - 自动记录测试执行过程
    • 记录测试步骤并附带截图
    • 捕获每一步的UI层级
    • 生成测试报告(JSON + Markdown)
    • 视觉测试内嵌模式
    • 选项:
      --test-name
      ,
      --output
      ,
      --serial
      ,
      --inline
      ,
      --size
      ,
      --app-name
  4. app_state_capture.py ⭐ 新增 - 完整调试快照
    • 捕获截图 + UI层级 + 日志 + 应用信息
    • 创建带时间戳的快照
    • 一站式调试工件
    • 选项:
      --package
      ,
      --output
      ,
      --serial
      ,
      --logs
      ,
      --no-logs
      ,
      --screenshot-size
      ,
      --json

Advanced Testing & Permissions (4 scripts) ✓ COMPLETE

高级测试与权限(4个脚本)✓ 已完成

  1. privacy_manager.py ⭐ NEW - App permission management
    • Grant/revoke permissions
    • List app permissions
    • Support for 20+ permission types
    • Batch operations
    • Options:
      --grant
      ,
      --revoke
      ,
      --list
      ,
      --package
      ,
      --serial
      ,
      --list-permissions
      ,
      --json
  2. clipboard.py ⭐ NEW - Clipboard management
    • Copy text to device clipboard
    • Test paste functionality
    • Options:
      --copy
      ,
      --paste
      ,
      --serial
      ,
      --json
  3. status_bar.py ⭐ NEW - Status bar control
    • Set battery level and charging state
    • Set WiFi/mobile signal strength
    • Set time display (for consistent screenshots)
    • Demo mode support
    • Options:
      --battery
      ,
      --charging
      ,
      --wifi
      ,
      --mobile
      ,
      --time
      ,
      --reset
      ,
      --serial
      ,
      --json
  4. push_notification.py ⭐ NEW - Push notification simulation
    • Send test notifications
    • List notification channels
    • Multiple delivery methods
    • Options:
      --package
      ,
      --title
      ,
      --message
      ,
      --id
      ,
      --data
      ,
      --list-channels
      ,
      --method
      ,
      --serial
      ,
      --json
  1. privacy_manager.py ⭐ 新增 - 应用权限管理
    • 授予/撤销权限
    • 列出应用权限
    • 支持20+种权限类型
    • 批量操作
    • 选项:
      --grant
      ,
      --revoke
      ,
      --list
      ,
      --package
      ,
      --serial
      ,
      --list-permissions
      ,
      --json
  2. clipboard.py ⭐ 新增 - 剪贴板管理
    • 将文本复制到设备剪贴板
    • 测试粘贴功能
    • 选项:
      --copy
      ,
      --paste
      ,
      --serial
      ,
      --json
  3. status_bar.py ⭐ 新增 - 状态栏控制
    • 设置电池电量与充电状态
    • 设置WiFi/移动信号强度
    • 设置时间显示(用于一致的截图)
    • 演示模式支持
    • 选项:
      --battery
      ,
      --charging
      ,
      --wifi
      ,
      --mobile
      ,
      --time
      ,
      --reset
      ,
      --serial
      ,
      --json
  4. push_notification.py ⭐ 新增 - 推送通知模拟
    • 发送测试通知
    • 列出通知渠道
    • 多种投递方式
    • 选项:
      --package
      ,
      --title
      ,
      --message
      ,
      --id
      ,
      --data
      ,
      --list-channels
      ,
      --method
      ,
      --serial
      ,
      --json

Android vs iOS Mapping

Android与iOS工具映射

iOS ToolAndroid EquivalentStatus
xcrun simctladb / avdmanager / emulator✓ Complete
IDBadb shell uiautomator / input✓ Complete
iOS SimulatorAndroid Emulator✓ Complete
xcodebuildGradle wrapper✓ Complete
Accessibility treeUI hierarchy dump✓ Complete
simctl privacypm grant/revoke✓ Complete
xcresultGradle test reports✓ Complete
iOS工具Android对应工具状态
xcrun simctladb / avdmanager / emulator✓ 已完成
IDBadb shell uiautomator / input✓ 已完成
iOS SimulatorAndroid Emulator✓ 已完成
xcodebuildGradle wrapper✓ 已完成
Accessibility treeUI层级转储✓ 已完成
simctl privacypm grant/revoke✓ 已完成
xcresultGradle测试报告✓ 已完成

Script Categories

脚本分类

🚀 Essential (Use Daily)

🚀 必备(日常使用)

  • app_launcher.py - Launch/terminate apps
  • screen_mapper.py - Understand current screen
  • navigator.py - Interact with UI elements
  • gesture.py / keyboard.py - User input
  • app_launcher.py - 启动/终止应用
  • screen_mapper.py - 了解当前屏幕内容
  • navigator.py - 与UI元素交互
  • gesture.py / keyboard.py - 用户输入操作

🔧 Development

🔧 开发工具

  • build_and_test.py - Build projects and run tests
  • log_monitor.py - Debug with filtered logs
  • emulator_boot.py / emulator_shutdown.py - Device management
  • build_and_test.py - 构建项目并运行测试
  • log_monitor.py - 通过过滤日志进行调试
  • emulator_boot.py / emulator_shutdown.py - 设备管理

🧪 Testing

🧪 测试工具

  • accessibility_audit.py - Check accessibility compliance
  • visual_diff.py - Visual regression testing
  • test_recorder.py - Document test execution
  • app_state_capture.py - Debug test failures
  • accessibility_audit.py - 检查无障碍合规性
  • visual_diff.py - 视觉回归测试
  • test_recorder.py - 记录测试执行过程
  • app_state_capture.py - 调试测试失败

⚙️ Advanced

⚙️ 高级工具

  • privacy_manager.py - Test permission flows
  • push_notification.py - Test notification handling
  • clipboard.py / status_bar.py - Fine-grained control
  • emulator_create/delete/erase.py - CI/CD provisioning
  • privacy_manager.py - 测试权限流程
  • push_notification.py - 测试通知处理逻辑
  • clipboard.py / status_bar.py - 细粒度控制
  • emulator_create/delete/erase.py - CI/CD环境配置

Typical Workflows

典型工作流

Manual Testing Flow

手动测试流程

bash
undefined
bash
undefined

1. Launch app

1. 启动应用

python scripts/app_launcher.py --launch com.example.app
python scripts/app_launcher.py --launch com.example.app

2. See what's on screen

2. 查看屏幕内容

python scripts/screen_mapper.py
python scripts/screen_mapper.py

3. Interact

3. 进行交互

python scripts/navigator.py --find-text "Login" --tap python scripts/navigator.py --find-type EditText --index 0 --enter-text "user@test.com" python scripts/keyboard.py --button enter
python scripts/navigator.py --find-text "Login" --tap python scripts/navigator.py --find-type EditText --index 0 --enter-text "user@test.com" python scripts/keyboard.py --button enter

4. Verify

4. 验证

python scripts/screen_mapper.py
undefined
python scripts/screen_mapper.py
undefined

Automated Testing Flow

自动化测试流程

bash
undefined
bash
undefined

1. Start recording

1. 开始录制

recorder = TestRecorder("Login Flow")
recorder = TestRecorder("Login Flow")

2. Execute test steps

2. 执行测试步骤

recorder.step("Launch app", screen_name="Splash")
recorder.step("Launch app", screen_name="Splash")

... interactions ...

... 交互操作 ...

recorder.step("Verify logged in", screen_name="Home")
recorder.step("Verify logged in", screen_name="Home")

3. Finish

3. 完成录制

recorder.finish(passed=True)
undefined
recorder.finish(passed=True)
undefined

CI/CD Flow

CI/CD流程

bash
undefined
bash
undefined

1. Create fresh emulator

1. 创建新模拟器

python scripts/emulator_create.py --device pixel_7 --api 34 --name test-device
python scripts/emulator_create.py --device pixel_7 --api 34 --name test-device

2. Boot emulator

2. 启动模拟器

python scripts/emulator_boot.py --avd test-device --wait-ready
python scripts/emulator_boot.py --avd test-device --wait-ready

3. Build and test

3. 构建并测试

python scripts/build_and_test.py --project . --test
python scripts/build_and_test.py --project . --test

4. Run UI tests

4. 运行UI测试

... your test scripts ...

... 你的测试脚本 ...

5. Cleanup

5. 清理环境

python scripts/emulator_shutdown.py --serial emulator-5554 python scripts/emulator_delete.py --name test-device
undefined
python scripts/emulator_shutdown.py --serial emulator-5554 python scripts/emulator_delete.py --name test-device
undefined

Debugging Flow

调试流程

bash
undefined
bash
undefined

1. Capture complete state

1. 捕获完整状态

python scripts/app_state_capture.py --package com.myapp --output debug-snapshots/
python scripts/app_state_capture.py --package com.myapp --output debug-snapshots/

2. Monitor logs in real-time

2. 实时监控日志

python scripts/log_monitor.py --app com.myapp --severity error,warning --follow
python scripts/log_monitor.py --app com.myapp --severity error,warning --follow

3. Check accessibility issues

3. 检查无障碍问题

python scripts/accessibility_audit.py --output audit-reports/ --verbose
undefined
python scripts/accessibility_audit.py --output audit-reports/ --verbose
undefined

Requirements

环境要求

  • macOS, Linux, or Windows
  • Android SDK with platform-tools and emulator
  • Python 3.8+
  • ADB (Android Debug Bridge)
  • Optional: Gradle for building
  • Optional: Pillow for screenshot resizing
  • macOS、Linux或Windows系统
  • 包含platform-tools和emulator的Android SDK
  • Python 3.8+
  • ADB(Android Debug Bridge)
  • 可选:用于构建的Gradle
  • 可选:用于截图调整的Pillow

Installation

安装步骤

Environment Setup

环境配置

bash
undefined
bash
undefined

1. Install Android SDK (via Android Studio or command line tools)

1. 安装Android SDK(通过Android Studio或命令行工具)

2. Set environment variables

2. 设置环境变量

export ANDROID_HOME=$HOME/Library/Android/sdk # macOS export PATH=$PATH:$ANDROID_HOME/platform-tools export PATH=$PATH:$ANDROID_HOME/emulator
export ANDROID_HOME=$HOME/Library/Android/sdk # macOS系统 export PATH=$PATH:$ANDROID_HOME/platform-tools export PATH=$PATH:$ANDROID_HOME/emulator

3. Verify installation

3. 验证安装

adb version emulator -version
undefined
adb version emulator -version
undefined

As Claude Code Skill

作为Claude Code Skill安装

bash
undefined
bash
undefined

Personal installation

个人安装

git clone <repository-url> ~/.claude/skills/android-emulator-skill
git clone <repository-url> ~/.claude/skills/android-emulator-skill

Project installation

项目级安装

git clone <repository-url> .claude/skills/android-emulator-skill
undefined
git clone <repository-url> .claude/skills/android-emulator-skill
undefined

Documentation

文档说明

  • SKILL.md (this file) - Script reference and quick start
  • README.md - Installation and examples
  • CLAUDE.md - Architecture and implementation details
  • STATUS.md - Project status and roadmap
  • TESTING.md - Testing guide
  • references/ - Deep documentation on specific topics
  • examples/ - Complete automation workflows
  • SKILL.md(本文档)- 脚本参考与快速开始指南
  • README.md - 安装说明与示例
  • CLAUDE.md - 架构与实现细节
  • STATUS.md - 项目状态与路线图
  • TESTING.md - 测试指南
  • references/ - 特定主题的深度文档
  • examples/ - 完整的自动化工作流示例

Key Design Principles

核心设计原则

Semantic Navigation: Find elements by meaning (text, type, ID) not pixel coordinates. Survives UI changes.
Token Efficiency: Concise default output (3-5 lines) with optional verbose and JSON modes for detailed results. 96% reduction vs raw tools.
Accessibility-First: Built on standard accessibility APIs for reliability and compatibility.
Zero Configuration: Works immediately with Android SDK installed. No complex setup required.
Structured Data: Scripts output JSON or formatted text, not raw logs. Easy to parse and integrate.
Cross-Platform: Works on macOS, Linux, and Windows.
Real Devices: Unlike iOS, works with both emulators and real devices.
语义化导航:通过元素含义(文本、类型、ID)查找元素,而非像素坐标。可适应UI变更。
Token高效性:默认输出简洁(3-5行),可选详细模式和JSON模式获取完整结果。相比原生工具减少96%的Token输出。
无障碍优先:基于标准无障碍API构建,确保可靠性与兼容性。
零配置:安装Android SDK后即可使用,无需复杂设置。
结构化数据:脚本输出JSON或格式化文本,而非原始日志,易于解析与集成。
跨平台:支持macOS、Linux和Windows系统。
真实设备支持:与iOS不同,同时支持模拟器和真实设备。

Android-Specific Features

Android专属特性

Real Device Support: Works with both emulators and physical devices connected via USB/WiFi.
Multiple Emulators: Support for running multiple emulators simultaneously with batch operations.
Flexible Architecture: Works with both x86_64 and ARM emulator architectures.
Gradle Integration: Native integration with Android's Gradle build system.
Advanced Logging: Logcat filtering with regex, severity, and app-specific targeting.
Permission Testing: Programmatic grant/revoke of runtime permissions.
Notification Testing: Simulate push notifications for testing handling logic.
真实设备支持:同时支持模拟器和通过USB/WiFi连接的物理设备。
多模拟器支持:支持同时运行多个模拟器,并提供批量操作。
灵活架构:支持x86_64和ARM两种模拟器架构。
Gradle集成:与Android的Gradle构建系统原生集成。
高级日志:支持通过正则表达式、严重级别和应用包进行logcat过滤。
权限测试:可程序化授予/撤销运行时权限。
通知测试:可模拟推送通知以测试处理逻辑。

Feature Parity with iOS Skill

与iOS版本的功能对等性

100% Feature Parity Achieved!
This Android skill now provides equivalent functionality to the iOS Simulator Skill:
Feature CategoryiOSAndroidStatus
App ManagementComplete
Device LifecycleComplete
NavigationComplete
GesturesComplete
Keyboard InputComplete
Build AutomationComplete
Log MonitoringComplete
Accessibility AuditComplete
Visual TestingComplete
Test RecordingComplete
State CaptureComplete
PermissionsComplete
ClipboardComplete
Status BarComplete
Push NotificationsComplete
100%功能对等已实现!
本Android Skill现在提供与iOS模拟器Skill完全对等的功能:
功能类别iOSAndroid状态
应用管理已完成
设备生命周期已完成
导航功能已完成
手势操作已完成
键盘输入已完成
构建自动化已完成
日志监控已完成
无障碍审计已完成
视觉测试已完成
测试录制已完成
状态捕获已完成
权限管理已完成
剪贴板操作已完成
状态栏控制已完成
推送通知已完成

Contributing

贡献指南

New scripts should:
  • Use class-based design for > 50 lines of logic
  • Support --serial and auto-detection
  • Support --json output
  • Provide --help documentation
  • Follow Black and Ruff standards
  • Update this SKILL.md
  • Test with real emulators before submission
新脚本应满足以下要求:
  • 逻辑代码超过50行时使用基于类的设计
  • 支持
    --serial
    参数和自动检测
  • 支持
    --json
    输出
  • 提供
    --help
    文档
  • 遵循Black和Ruff代码规范
  • 更新本SKILL.md文档
  • 在真实模拟器上测试后再提交

Differences from iOS

与iOS版本的差异

Architecture

架构

  • iOS: Uses IDB for UI interaction, xcrun simctl for device management
  • Android: Uses adb for everything, uiautomator for UI interaction
  • iOS:使用IDB进行UI交互,xcrun simctl进行设备管理
  • Android:所有操作均使用adb,通过uiautomator进行UI交互

Element Types

元素类型

  • iOS: Button, TextField, SecureTextField, StaticText, etc.
  • Android: Button, EditText, TextView, ImageView, etc.
  • iOS:Button、TextField、SecureTextField、StaticText等
  • Android:Button、EditText、TextView、ImageView等

Device Management

设备管理

  • iOS: Simulators only (macOS required)
  • Android: Emulators + real devices (cross-platform)
  • iOS:仅支持模拟器(需macOS系统)
  • Android:支持模拟器 + 真实设备(跨平台)

Build System

构建系统

  • iOS: Xcode project files (.xcodeproj)
  • Android: Gradle build files (build.gradle)

Status: Feature complete! All 20 scripts implemented with full feature parity to iOS Simulator Skill.
Use these scripts directly or let Claude Code invoke them automatically when your request matches the skill description.
  • iOS:Xcode项目文件(.xcodeproj)
  • Android:Gradle构建文件(build.gradle)

状态:功能完整!所有20个脚本已实现,与iOS模拟器Skill完全功能对等。
你可以直接使用这些脚本,或当你的请求匹配本Skill描述时,让Claude Code自动调用它们。