Skip to content

chore(android): standardize emulator images on API 36 - #469

Merged
Charles Hudson (phobetron) merged 1 commit into
mainfrom
chore/android-api-36-emulators
Aug 25, 2026
Merged

chore(android): standardize emulator images on API 36#469
Charles Hudson (phobetron) merged 1 commit into
mainfrom
chore/android-api-36-emulators

Conversation

@phobetron

Copy link
Copy Markdown
Collaborator

Summary

  • align native Android Maestro CI and local emulator configuration on API 36
  • standardize local Android tooling on the Pixel_7_API_36 AVD with a host-compatible image architecture
  • prevent React Native setup from installing both x86_64 and ARM64 system images on Apple Silicon
  • update the Android implementation documentation and maintenance instructions

Validation

  • bash syntax validation for all changed shell scripts
  • native Android runner help execution
  • pnpm format:check
  • git diff --check
  • React Native implementation install and typecheck through the pre-push hook
  • React Native unit-test script through the pre-push hook (intentionally skipped by the implementation)
  • confirmed that the API 36 x86_64 AOSP ATD system image used by CI is available

Not run

  • Android Maestro and React Native Detox E2E suites were not run locally; CI will exercise both API 36 emulator paths.

@bito-code-review

bito-code-review Bot commented Aug 25, 2026

Copy link
Copy Markdown

Code Review Agent Run #c23071

Actionable Suggestions - 0
Review Details
  • Files reviewed - 6 · Commit Range: 38a1fbc..38a1fbc
    • .github/workflows/main-pipeline.yaml
    • implementations/android-sdk/AGENTS.md
    • implementations/android-sdk/scripts/README.md
    • implementations/android-sdk/scripts/bootstrap.sh
    • implementations/android-sdk/scripts/run-e2e.sh
    • implementations/react-native-sdk/scripts/setup-android-e2e.sh
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at jared.jolton@contentful.com.

Documentation & Help

AI Code Review powered by Bito Logo

@phobetron
Charles Hudson (phobetron) force-pushed the chore/android-api-36-emulators branch from 38a1fbc to f11f4fc Compare August 25, 2026 14:30
@bito-code-review

bito-code-review Bot commented Aug 25, 2026

Copy link
Copy Markdown

Impact Analysis by Bito

Cross-Repository Impact Analysis
What Changed Impact of Change Suggested Review Actions
The CI Android emulator API level changed from 35 to 36. - No cross-repo consumers found for API_LEVEL: The configuration key is changed in the repository's GitHub Actions workflow; organization-wide indexed search found no external references. - Run the Android Maestro job with API level 36 and verify the requested AOSP ATD image is available.
- Confirm all Android dependencies and Maestro flows remain compatible with API 36.
The default local E2E AVD was renamed from pixel_7_api35_e2e to Pixel_7_API_36. - No cross-repo consumers found for pixel_7_api35_e2e: The old AVD name is removed from documentation and runner defaults; indexed organization-wide searches found no external references. - Verify that existing developer machines either recreate the new AVD or continue to work when EMULATOR_AVD explicitly points to an older AVD.
- Test bootstrap.sh and run-e2e.sh with both an existing Pixel_7_API_36 AVD and a missing AVD.
Android 35 system-image references were replaced by host-architecture-aware Android 36 images. - No cross-repo consumers found for system-images;android-35;google_apis;arm64-v8a: The removed Android 35 ARM64 image identifier is not referenced by indexed repositories.
- No cross-repo consumers found for system-images;android-35;google_apis: The removed Android 35 Google APIs image prefix is not referenced by indexed repositories.
- Run setup and E2E scripts on Linux x86_64, Intel macOS, and Apple Silicon macOS.
- Verify sdkmanager failure handling does not allow execution to continue without the required Android 36 image.
EMULATOR_AVD is now supported by bootstrap.sh and defaults to Pixel_7_API_36. - No cross-repo consumers found for EMULATOR_AVD: No indexed external repository references this environment variable. - Test an explicitly supplied EMULATOR_AVD value containing spaces or an unavailable AVD name.
- Confirm bootstrap.sh and run-e2e.sh use the same default and do not accidentally create duplicate AVDs.
The root clean script now invokes pnpm run before applying workspace filters. - No cross-repo consumers found for the previous clean command: The old command string is not referenced by indexed external repositories. - Run pnpm clean from a clean checkout and verify every intended lib and package clean script executes.
- Verify the command works with pnpm's current workspace configuration and does not interpret filters as arguments to pnpm run incorrectly.
Code Paths Analyzed

Impact:
The change aligns local Android development and CI Maestro execution on Android API 36 while selecting a system-image architecture based on the host. It also changes the root workspace clean command syntax.

Flow:
GitHub Actions environment API_LEVEL=36 → emulator-runner provisions Pixel 7 API 36 → APKs are installed → ci-maestro-run.sh executes flows. Locally, bootstrap.sh or run-e2e.sh reads EMULATOR_AVD → checks or creates an AVD → installs the host-compatible Android 36 image → launches the emulator → builds and runs Maestro.

Direct Changes (Diff Files):
• .github/workflows/main-pipeline.yaml [1026-1033] — Changes the CI Android emulator API level from 35 to 36 while retaining the Pixel 7 profile and x86_64 architecture.
• implementations/android-sdk/AGENTS.md [15-27] — Updates Android E2E runner guidance to reference Pixel_7_API_36.
• implementations/android-sdk/scripts/README.md [25-42, 90-101] — Documents Android 36 Google APIs images, host-compatible architecture selection, the new AVD name, and updated EMULATOR_AVD defaults.
• implementations/android-sdk/scripts/bootstrap.sh [4-16, 29-30, 103-157] — Adds EMULATOR_AVD configuration, requires the named AVD instead of selecting the first available AVD, and creates an Android 36 host-compatible image.
• implementations/android-sdk/scripts/run-e2e.sh [28-30, 75-85, 115-125, 280-301] — Updates local E2E defaults and setup instructions to use Android 36 and dynamically select x86_64 or arm64-v8a.
• implementations/react-native-sdk/scripts/setup-android-e2e.sh [460-503] — Changes SDK package setup to install one architecture-appropriate Android system image rather than separately adding an ARM image on Apple Silicon.
• package.json [8-12] — Changes the root clean script invocation from direct pnpm filtering to pnpm run with filters.

Repository Impact:
Android SDK provisioning: SDK installation and AVD creation now depend on Android 36 packages and host architecture detection.
Android Maestro E2E execution: The runner requires or launches a differently named AVD and may encounter different API-level behavior.
CI emulator infrastructure: The emulator-runner job now requests API level 36 with an x86_64 AOSP ATD image.
Workspace maintenance scripts: The root clean command's pnpm invocation changed and could affect package cleanup behavior.

Cross-Repository Dependencies:
External repository consumers: Indexed searches for the removed AVD name, removed Android 35 image identifiers, EMULATOR_AVD, API_LEVEL, and the old clean command found no external references.

Database/Caching Impact:
• None

API Contract Violations:
• The local operational contract for the default EMULATOR_AVD changes from pixel_7_api35_e2e to Pixel_7_API_36; scripts or documentation outside the searched repository may need updates.
• The CI emulator contract changes from Android API 35 to API 36. Existing assumptions about platform behavior, image availability, or test results should be validated.
• The clean script syntax change should be validated because pnpm run filter handling may differ from direct pnpm command filtering.

Infrastructure Dependencies:
• GitHub Actions emulator-runner must provide API 36, profile pixel_7, target aosp_atd, and x86_64 support.
• Local Android SDK installations require system-images;android-36;google_apis;x86_64 or system-images;android-36;google_apis;arm64-v8a.
• avdmanager and sdkmanager must be available under ANDROID_HOME/cmdline-tools/latest/bin.
• Existing cached AVDs using the old name are no longer selected by default.

Additional Insights:
Portability: Architecture selection is improved for arm64 hosts, but the detection checks for the literal uname value arm64; environments reporting a different ARM identifier may still select x86_64.
Failure handling: bootstrap.sh continues to suppress sdkmanager installation errors with || true, so a missing Android 36 image may only fail later during AVD creation or emulator startup.

Testing Recommendations

Frontend Impact:
None.

Service Integration:
• Run the complete Android Maestro CI job with API_LEVEL=36, ARCH=x86_64, TARGET=aosp_atd, and PROFILE=pixel_7.
• Run both Compose and Views APK flows using Pixel_7_API_36 and verify installation, mock-server connectivity, adb reverse, and Maestro retries.
• Execute bootstrap.sh on a machine with no AVD and verify it installs the correct image, creates Pixel_7_API_36, boots it, and completes the build.

Data Serialization:
None.

Privacy Compliance:
None.

Backward Compatibility:
• Run run-e2e.sh with EMULATOR_AVD set to an existing custom AVD and confirm the explicit override remains honored.
• Verify stale local AVDs named pixel_7_api35_e2e are not silently selected when EMULATOR_AVD is unset.
• Run pnpm clean from the repository root and confirm all intended ./lib/* and ./packages/** clean scripts execute successfully.

OAuth Functionality:
• None

Cross-Service Communication:
• Verify the API 36 emulator can reach the mock API through adb reverse on MOCK_SERVER_PORT=8000.
• Test emulator startup recovery and adb reconnection after a failed or stale emulator process.
• Validate that the x86_64 CI image and arm64-v8a local image expose equivalent behavior for the Maestro flows.

Reliability Testing:
• None

Additional Insights:
• Run setup scripts on Linux x86_64, Intel macOS, and Apple Silicon macOS to exercise both architecture branches.
• Add a failure-path test or manual check for sdkmanager failing to install system-images;android-36;google_apis;<arch>; the script should fail clearly before attempting to run tests.
• Use shellcheck and a dry-run or mocked sdkmanager/avdmanager test to validate quoting of EMULATOR_AVD and system_image_arch.
• Confirm Android API 36 platform and image packages are available in the configured SDK repositories before relying on the CI migration.

Analysis based on known dependency patterns and edges. Actual impact may vary.

@bito-code-review

Copy link
Copy Markdown

✅ Review Settings Overridden

Status: Overridden Successfully

Guidelines:

  • Accepted:

    • General : Review Posture, Repo Truth And Boundaries, Domain Invariants

    • Language : typescript= TypeScript Review Evidence

Note: Extra guidelines beyond 3 general purpose guidelines and 1 language specific guideline per language are not processed. Guidelines are fetched from the source branch.

@bito-code-review bito-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #7e476f

Actionable Suggestions - 1
  • .github/workflows/main-pipeline.yaml - 1
Review Details
  • Files reviewed - 7 · Commit Range: f11f4fc..f11f4fc
    • .github/workflows/main-pipeline.yaml
    • implementations/android-sdk/AGENTS.md
    • implementations/android-sdk/scripts/README.md
    • implementations/android-sdk/scripts/bootstrap.sh
    • implementations/android-sdk/scripts/run-e2e.sh
    • implementations/react-native-sdk/scripts/setup-android-e2e.sh
    • package.json
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at jared.jolton@contentful.com.

Documentation & Help

AI Code Review powered by Bito Logo

Comment thread .github/workflows/main-pipeline.yaml
@phobetron

Copy link
Copy Markdown
Collaborator Author

/resolve

@phobetron
Charles Hudson (phobetron) merged commit 76c901c into main Aug 25, 2026
42 checks passed
@phobetron
Charles Hudson (phobetron) deleted the chore/android-api-36-emulators branch August 25, 2026 14:52
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.

1 participant