From b8b166df62093fd599771d004b8dc53882c96337 Mon Sep 17 00:00:00 2001 From: Philipp Ucke <64527676+pucke-uninow@users.noreply.github.com> Date: Fri, 24 Feb 2023 16:22:05 +0100 Subject: [PATCH 1/2] docs: add code snipped to enable kvm group permissions https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 325e58ee6..105978815 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,15 @@ Default `emulator-options`: `-no-window -gpu swiftshader_indirect -no-snapshot - The short answer is yes but on Github-hosted Linux runners it's expected to be a much worse experience (on some newer API levels it might not work at all) than running it on macOS, because of the current lack of hardware acceleration support. You can get it running much faster on self-hosted Linux runners but only if the underlying instances support KVM (which most don't). Things might be better on the newer Larger runners but they are still in Beta. It is possible to use this Action with hardware accelerated Linux VMs hosted by a third-party runner provider. -For a longer answer please refer to [this issue](https://github.com/ReactiveCircus/android-emulator-runner/issues/46). +When using Githubs Larger runners, Actions users will need to add the runner user to the KVM user group: +``` +- 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 +``` +You will then be able to make use of hardware acceleration. ## Who is using Android Emulator Runner? From c34b2cd8a01acfda24a60f5e90a9b0a7f2ff2bb7 Mon Sep 17 00:00:00 2001 From: Philipp Ucke <64527676+pucke-uninow@users.noreply.github.com> Date: Fri, 24 Feb 2023 16:28:39 +0100 Subject: [PATCH 2/2] docs: re-add linked issue --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 105978815..0a5a54590 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,8 @@ Default `emulator-options`: `-no-window -gpu swiftshader_indirect -no-snapshot - The short answer is yes but on Github-hosted Linux runners it's expected to be a much worse experience (on some newer API levels it might not work at all) than running it on macOS, because of the current lack of hardware acceleration support. You can get it running much faster on self-hosted Linux runners but only if the underlying instances support KVM (which most don't). Things might be better on the newer Larger runners but they are still in Beta. It is possible to use this Action with hardware accelerated Linux VMs hosted by a third-party runner provider. +- For a longer answer please refer to [this issue](https://github.com/ReactiveCircus/android-emulator-runner/issues/46). + When using Githubs Larger runners, Actions users will need to add the runner user to the KVM user group: ``` - name: Enable KVM group perms @@ -183,6 +185,7 @@ When using Githubs Larger runners, Actions users will need to add the runner use ``` You will then be able to make use of hardware acceleration. + ## Who is using Android Emulator Runner? These are some of the open-source projects using (or used) **Android Emulator Runner**: