Skip to content

fix(ci): upgrade android-actions/setup-android from v2 to v3#169

Merged
ErikBjare merged 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix/update-setup-android-v3
Jul 1, 2026
Merged

fix(ci): upgrade android-actions/setup-android from v2 to v3#169
ErikBjare merged 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix/update-setup-android-v3

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Summary

  • Upgrades all 4 instances of android-actions/setup-android@v2 to @v3 in .github/workflows/build.yml

Root Cause

The build-apk job (running on Ubicloud Ubuntu 24.04 runners) has been failing since ~10:30 UTC today at the "Set up Android SDK" step with errors about unaccepted Google SDK licenses (GoogleTV and Android XR):

Warning: License for package Android SDK Platform 34 not accepted.
Warning: License for package Google TV for Android (Google TV system image 34) not accepted.
Warning: License for package Android XR (Android XR Emulator system image Baklava) not accepted.

@v3 of android-actions/setup-android properly handles the acceptance of new SDK component licenses that were added since @v2.

The test job wasn't failing because it runs on ubuntu-22.04 which has Android SDK pre-installed with the old licenses pre-accepted.

Test Plan

  • CI passes on all 4 jobs: build-apk, build-aab, test, test-e2e

v2 fails to accept new Android SDK license agreements (GoogleTV and XR
emulator licenses) on Ubicloud runners that lack pre-accepted licenses.
v3 handles license acceptance more robustly via piped input.

Fixes the Build apk/aab job failure on master.
@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a broken build-apk CI job by upgrading android-actions/setup-android from v2 to v3 across all four jobs, resolving unaccepted Google SDK license errors (GoogleTV and Android XR) introduced by new SDK components that v2 no longer handles. The test-e2e job additionally gains an explicit ANDROID_AVD_HOME setup to ensure avdmanager and the emulator binary agree on the AVD directory after v3 stopped exporting the deprecated ANDROID_SDK_HOME variable.

  • All four workflow jobs (build-rust, build-apk/build-aab matrix, test, test-e2e) are updated from @v2 to @v3.
  • The test-e2e emulator creation step explicitly pins ANDROID_AVD_HOME=$HOME/.android/avd (the default location) and persists it via GITHUB_ENV for downstream steps, preserving compatibility with the new action version.

Confidence Score: 5/5

Safe to merge — the change is a targeted action version bump with a well-understood behavioral difference addressed by the added ANDROID_AVD_HOME setup.

All four version bumps are mechanical and address a concrete, actively failing CI step. The only non-trivial change — explicit ANDROID_AVD_HOME pinning in the emulator step — correctly accounts for v3 dropping ANDROID_SDK_HOME, uses the standard default path, and persists the variable properly via GITHUB_ENV for downstream steps. No logic is altered in any build or test path.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/build.yml Upgrades all 4 android-actions/setup-android references from v2 to v3, and adds explicit ANDROID_AVD_HOME pinning in the test-e2e emulator setup step to compensate for v3 no longer exporting the deprecated ANDROID_SDK_HOME variable.

Reviews (2): Last reviewed commit: "fix(ci): pin ANDROID_AVD_HOME for setup-..." | Re-trigger Greptile

android-actions/setup-android@v3 no longer sets ANDROID_SDK_HOME (deprecated
by Google), which caused avdmanager to write the AVD to a location the emulator
binary couldn't find. Explicitly set ANDROID_AVD_HOME=$HOME/.android/avd before
running avdmanager and persist it to GITHUB_ENV for the Start emulator step.
Also adds ls verification so future failures show the AVD directory state.
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Previous CI run failed on Start Android emulator with:

ERROR | Unknown AVD name [Pixel_API_27_AOSP]
ERROR | HOME is defined but there is no file Pixel_API_27_AOSP.ini in $HOME/.android/avd

Root cause: android-actions/setup-android@v3 no longer exports ANDROID_SDK_HOME (deprecated by Google). Without it, avdmanager and the emulator binary (v36.6.11.0) may disagree on the AVD search path.

Fix (ee36f8c): explicitly set ANDROID_AVD_HOME=$HOME/.android/avd before avdmanager create avd and persist it to GITHUB_ENV so the Start Android emulator step picks it up. Also added ls verification so future failures immediately show the AVD directory state rather than timing out for 30 minutes.

New CI run queued: https://github.com/ActivityWatch/aw-android/actions/runs/28541646552

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

@greptileai review

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

CI is now fully green: all 4 jobs passing including E2E tests on Pixel_API_27_AOSP emulator ✓. Greptile score 5/5 on the latest commit. Ready for merge.

@ErikBjare ErikBjare merged commit e9e3615 into ActivityWatch:master Jul 1, 2026
8 checks passed
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.

2 participants