Skip to content

Add automatic Android emulator startup and headless execution#720

Merged
sazid merged 1 commit into
devfrom
android-headless-emulator-and-auto-launch-emulator
Jul 22, 2026
Merged

Add automatic Android emulator startup and headless execution#720
sazid merged 1 commit into
devfrom
android-headless-emulator-and-auto-launch-emulator

Conversation

@mdshakib007

Copy link
Copy Markdown
Collaborator

Summary

  • Automatically reuse an existing Android emulator or launch an available AVD
  • Add Android Headless execution using the emulator's no-window mode
  • Share emulator lifecycle handling between UI launches and test execution
  • Wait for ADB, Android boot, package manager, and System UI stability
  • Detect System UI ANRs, capture diagnostics, safely select Wait, and retry with a cold boot when necessary
  • Preserve emulator data by never automatically wiping an AVD
  • Validate Appium and UiAutomator2 before installation instead of blindly reinstalling
  • Improve Android SDK discovery, device selection, logging, and missing-tool errors
  • Avoid secondary screenshot errors when no mobile driver exists
  • Add emulator, Appium installer, device discovery, and screenshot regression tests

Testing

  • Full Node test suite: 118 passed
  • Focused Android/Appium suite: 22 passed

@mdshakib007 mdshakib007 self-assigned this Jul 21, 2026
@riz-hossain

Copy link
Copy Markdown
Contributor

🔎 ZeuZ PR Review

Open the full report in ZeuZ: Review findings and apply suggestions

Overview Value
Agents ✅ 4 completed
Suggestions 💡 5

Agent breakdown

→ General Review

Status: ✅ Completed
Suggestions: 2 suggestions

I found one high-impact correctness issue in the new emulator startup path, plus a smaller robustness concern around runtime parameter parsing.

→ Security Review

Status: ✅ Completed
Suggestions: 0 suggestions

No security issues found in the PR diff. The changes improve emulator handling and remove several shell-string adb invocations without introducing an obvious auth, injection, or secret-handling regression.

→ Performance Review

Status: ✅ Completed
Suggestions: 1 suggestion

One performance concern: the new Android auto-launch path does extra device/emulator discovery work on every launch, which is avoidable in a hot path.

→ Testing Review

Status: ✅ Completed
Suggestions: 2 suggestions

The PR adds substantial Android auto-launch/emulator-selection logic, but the new launch and device-resolution paths do not appear to have direct regression coverage. Existing emulator-manager tests cover helpers, but not the integration points in BuiltInFunctions.py or the new mobile_execution wiring.

Open ZeuZ to inspect full findings, continue an agent conversation, or apply safe patch suggestions.

@sazid
sazid merged commit 4b3290e into dev Jul 22, 2026
7 checks passed
@sazid
sazid deleted the android-headless-emulator-and-auto-launch-emulator branch July 22, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants