Improve emulator lifecycle reliability (boot/cpu/animation exception handling)

Open
#65 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
android, csharp

Research direction

Start in Emulator.cs with WaitForBootComplete, WaitForCpuLoadBelow, and DisableAnimations, then review the existing retry behavior in FindRunningEmulatorSerialByAvdName. Run the current tests and add coverage for DisableAnimations and launcher waiting in WaitForBootComplete. Done means transient ADB failures are handled as described and the unused System.Data import is removed.

Written by the indexing model from the issue text.

Description

Ref: PR #63

The following improvements were identified during review of PR #63 to improve reliability and handle transient ADB failures:

  1. WaitForBootComplete: The adb.Shell calls inside the polling loop (lines ~355) can throw SdkToolFailedExitException if adb exits non-zero. These should be wrapped in a try-catch block to allow retrying, similar to FindRunningEmulatorSerialByAvdName.
  2. WaitForCpuLoadBelow: The adb.Shell call (line ~401) should also be wrapped in try-catch to handle transient failures.
  3. DisableAnimations: The adb.Shell calls (line ~429) should be best-effort and wrapped in try-catch.
  4. Test Coverage: Add tests for DisableAnimations and the new launcher waiting logic in WaitForBootComplete.
  5. Cleanup: Remove unused using System.Data; in Emulator.cs.
Dominant language
C#
Stars
78
Forks
18
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Redth/AndroidSdk.Tools

All issues in Redth/AndroidSdk.Tools

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.