API 37 was the only red job in the matrix, and the last two fixes each
corrected a real problem only to reveal the next one. This is the cause of
the third failure.
The emulator raises an undersized guest to 2560M on its own, but only for API
levels it recognises, and it does not recognise "37.0". Comparing the two CI
logs from the same emulator binary (37.1.11.0) shows the asymmetry directly:
the API 36 job logs "Increasing RAM size to 2560MB" and the API 37 job has no
such line. So four levels were quietly running at 2560M while API 37 ran at
the pixel_6 default of 1536M, lost system_server partway through installing
the 82 MB APK, and surfaced it as "Can't find service: package".
2560M is not a guess at a sufficient value -- it is the value the other four
levels already pass at, so this makes the matrix uniform rather than
introducing a fifth configuration.
Verified that the setting actually lands: the action appends hw.ramSize to a
config.ini that already has one from the profile, so the fix only works if the
later key wins. Appending a distinctive 3072M to an API 36 AVD produced
MemTotal 3047924 kB and suppressed the automatic bump, confirming it does.
This failure cannot be reproduced locally -- API 37 will not boot on a
workstation under either GPU mode, aborting surfaceflinger in the goldfish
mapper under -gpu host and segfaulting the emulator under swiftshader_indirect
-- so the job now reports guest memory on every run and dumps OOM kills and
native crashes on failure. That makes the next run conclusive either way
instead of producing another bare "Can't find service: package".
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>