mirror of
https://github.com/HQarroum/docker-android.git
synced 2026-07-15 06:47:07 +02:00
Add virtual framebuffer
This commit is contained in:
@@ -21,6 +21,8 @@ RUN apt update -y && \
|
|||||||
openjdk-11-jdk \
|
openjdk-11-jdk \
|
||||||
ca-certificates-java \
|
ca-certificates-java \
|
||||||
virt-manager \
|
virt-manager \
|
||||||
|
libvulkan1 \
|
||||||
|
xvfb \
|
||||||
libgl1-mesa-glx \
|
libgl1-mesa-glx \
|
||||||
libgl1-mesa-dri \
|
libgl1-mesa-dri \
|
||||||
iproute2 && \
|
iproute2 && \
|
||||||
@@ -46,6 +48,7 @@ ENV ANDROID_SDK_ROOT=/opt/android \
|
|||||||
ARCHITECTURE=$ARCHITECTURE \
|
ARCHITECTURE=$ARCHITECTURE \
|
||||||
ABI=${IMG_TYPE}/${ARCHITECTURE} \
|
ABI=${IMG_TYPE}/${ARCHITECTURE} \
|
||||||
QTWEBENGINE_DISABLE_SANDBOX=1 \
|
QTWEBENGINE_DISABLE_SANDBOX=1 \
|
||||||
|
DISPLAY=:99 \
|
||||||
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL=10
|
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL=10
|
||||||
|
|
||||||
# Exporting environment variables for keeping in the path
|
# Exporting environment variables for keeping in the path
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ echo "Creating the Android Virtual Emulator ..."
|
|||||||
echo "Using package '$PACKAGE_PATH', ABI '$ABI' and device '$DEVICE_ID' for creating the emulator"
|
echo "Using package '$PACKAGE_PATH', ABI '$ABI' and device '$DEVICE_ID' for creating the emulator"
|
||||||
echo no | avdmanager create avd -n android --abi "$ABI" -k "$PACKAGE_PATH" --device "$DEVICE_ID"
|
echo no | avdmanager create avd -n android --abi "$ABI" -k "$PACKAGE_PATH" --device "$DEVICE_ID"
|
||||||
|
|
||||||
|
Xvfb "$DISPLAY" -screen 0 1920x1080x16 -nolisten tcp &
|
||||||
|
|
||||||
# Asynchronously write updates on the standard output
|
# Asynchronously write updates on the standard output
|
||||||
# about the state of the boot sequence.
|
# about the state of the boot sequence.
|
||||||
#cat ~/.android/avd/android.avd/config.ini
|
#cat ~/.android/avd/android.avd/config.ini
|
||||||
@@ -33,8 +35,9 @@ wait_for_boot &
|
|||||||
# Start the emulator with no audio, no GUI, and no snapshots.
|
# Start the emulator with no audio, no GUI, and no snapshots.
|
||||||
echo "Starting the emulator ..."
|
echo "Starting the emulator ..."
|
||||||
emulator \
|
emulator \
|
||||||
|
-verbose \
|
||||||
-avd android \
|
-avd android \
|
||||||
-gpu swiftshader_indirect \
|
-gpu host \
|
||||||
-noaudio \
|
-noaudio \
|
||||||
-no-boot-anim \
|
-no-boot-anim \
|
||||||
-no-window \
|
-no-window \
|
||||||
|
|||||||
Reference in New Issue
Block a user