From 6889f636501d06a9e36d4693b41d667633ad49f1 Mon Sep 17 00:00:00 2001 From: Halim Qarroum Date: Mon, 13 Mar 2023 15:44:52 +0000 Subject: [PATCH] Refactoring the GPU acceleration implementation --- Dockerfile | 2 +- scripts/start-emulator.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf7c81e..ad0ef32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ ARG IMG_TYPE=google_apis ARG ARCHITECTURE=x86_64 ARG CMD_LINE_VERSION=9477386_latest ARG DEVICE_ID=pixel -ARG GPU_ACCELERATED=false +ARG GPU_ACCELERATED=true # Environment variables. ENV ANDROID_SDK_ROOT=/opt/android \ diff --git a/scripts/start-emulator.sh b/scripts/start-emulator.sh index 9658860..f4be0c2 100644 --- a/scripts/start-emulator.sh +++ b/scripts/start-emulator.sh @@ -28,9 +28,9 @@ echo no | avdmanager create avd -f -n android --abi "$ABI" -k "$PACKAGE_PATH" -- # If GPU acceleration is enabled, we create a virtual framebuffer # to be used by the emulator when running with GPU acceleration. if [ "$GPU_ACCELERATED" == "true" ]; then - echo "Running with GPU acceleration enabled" - export DISPLAY=":0.0" - export GPU_MODE="host" + echo "Running with GPU acceleration enabled"; + export DISPLAY=":0.0"; + export GPU_MODE="host"; Xvfb "$DISPLAY" -screen 0 1920x1080x16 -nolisten tcp &; else export GPU_MODE="auto"