Adding the ability to dynamically specify the Android device

This commit is contained in:
Halim Qarroum
2023-03-05 01:08:33 +00:00
parent e9d2a6de7a
commit 087f36c833
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -34,12 +34,14 @@ ARG API_LEVEL=33
ARG IMG_TYPE=google_apis
ARG ARCHITECTURE=x86_64
ARG CMD_LINE_VERSION=9477386_latest
ARG DEVICE_ID=pixel
# Environment variables.
ENV ANDROID_SDK_ROOT=/opt/android \
ANDROID_PLATFORM_VERSION="platforms;android-$API_LEVEL" \
PACKAGE_PATH="system-images;android-${API_LEVEL};${IMG_TYPE};${ARCHITECTURE}" \
API_LEVEL=$API_LEVEL \
DEVICE_ID=$DEVICE_ID \
ARCHITECTURE=$ARCHITECTURE \
ABI=${IMG_TYPE}/${ARCHITECTURE} \
QTWEBENGINE_DISABLE_SANDBOX=1 \
+2 -2
View File
@@ -22,8 +22,8 @@ export USER=root
# Creating the Android Virtual Emulator.
echo "Creating the Android Virtual Emulator ..."
echo "Using '$PACKAGE_PATH' and '$ABI' for creating the emulator"
echo no | avdmanager create avd -n android --abi "${ABI}" -k "$PACKAGE_PATH" --device "pixel"
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"
# Asynchronously write updates on the standard output
# about the state of the boot sequence.