Symptom
connected-tests has been failing on master since ~Sep 1 without any related change (last green: run 33282696905 on Aug 30; first failure: run 31692873970 Aug 13, then recurring). Errors in the failed runs:
Unable to connect to adb daemon on port: 5037 (boot wait loop, exit code 1 spam)
- Mid-suite device death:
adb exit code 224, cmd: Failure calling service settings: Broken pipe (32)
- The
Save logcat output step logs adb: command not found on some runs
Root cause (found in the emulator's own log)
ProbeKVM: This user doesn't have permissions to use KVM (/dev/kvm).
[command] .../emulator -port 5554 -avd test ... -accel off &
A recent GitHub runner image update appears to have dropped the runner user's access to /dev/kvm. ReactiveCircus/android-emulator-runner then silently falls back to -accel off, i.e. full software x86 emulation: boots take 15+ minutes or never complete, and the device dies mid-suite.
Fix
Add the KVM udev snippet from the action's README ("Running hardware accelerated emulators on Linux runners") before the emulator step:
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
Optionally also android-actions/setup-android@v3 before the adb logcat step, so adb is guaranteed on PATH (fixes the command-not-found there too).
Verification
We maintained a fork of this repo and hit identical failures independently. After adding exactly this step, connected-tests went green on consecutive runs in ~7m40s each (was: 19-minute failures). Full diagnosis trail: satwareAG-ironMike/CleanArchitectureForAndroid PR #3 (merged).
Happy to send this as a PR if useful - just say the word.
Symptom
connected-testshas been failing onmastersince ~Sep 1 without any related change (last green: run 33282696905 on Aug 30; first failure: run 31692873970 Aug 13, then recurring). Errors in the failed runs:Unable to connect to adb daemon on port: 5037(boot wait loop, exit code 1 spam)adbexit code 224,cmd: Failure calling service settings: Broken pipe (32)Save logcat outputstep logsadb: command not foundon some runsRoot cause (found in the emulator's own log)
A recent GitHub runner image update appears to have dropped the
runneruser's access to/dev/kvm.ReactiveCircus/android-emulator-runnerthen silently falls back to-accel off, i.e. full software x86 emulation: boots take 15+ minutes or never complete, and the device dies mid-suite.Fix
Add the KVM udev snippet from the action's README ("Running hardware accelerated emulators on Linux runners") before the emulator step:
Optionally also
android-actions/setup-android@v3before theadb logcatstep, soadbis guaranteed on PATH (fixes the command-not-found there too).Verification
We maintained a fork of this repo and hit identical failures independently. After adding exactly this step,
connected-testswent green on consecutive runs in ~7m40s each (was: 19-minute failures). Full diagnosis trail: satwareAG-ironMike/CleanArchitectureForAndroid PR #3 (merged).Happy to send this as a PR if useful - just say the word.