mirror of
https://github.com/HQarroum/docker-android.git
synced 2026-07-15 06:47:07 +02:00
Adding the ability to dynamically specify the Android device
This commit is contained in:
@@ -34,12 +34,14 @@ ARG API_LEVEL=33
|
|||||||
ARG IMG_TYPE=google_apis
|
ARG IMG_TYPE=google_apis
|
||||||
ARG ARCHITECTURE=x86_64
|
ARG ARCHITECTURE=x86_64
|
||||||
ARG CMD_LINE_VERSION=9477386_latest
|
ARG CMD_LINE_VERSION=9477386_latest
|
||||||
|
ARG DEVICE_ID=pixel
|
||||||
|
|
||||||
# Environment variables.
|
# Environment variables.
|
||||||
ENV ANDROID_SDK_ROOT=/opt/android \
|
ENV ANDROID_SDK_ROOT=/opt/android \
|
||||||
ANDROID_PLATFORM_VERSION="platforms;android-$API_LEVEL" \
|
ANDROID_PLATFORM_VERSION="platforms;android-$API_LEVEL" \
|
||||||
PACKAGE_PATH="system-images;android-${API_LEVEL};${IMG_TYPE};${ARCHITECTURE}" \
|
PACKAGE_PATH="system-images;android-${API_LEVEL};${IMG_TYPE};${ARCHITECTURE}" \
|
||||||
API_LEVEL=$API_LEVEL \
|
API_LEVEL=$API_LEVEL \
|
||||||
|
DEVICE_ID=$DEVICE_ID \
|
||||||
ARCHITECTURE=$ARCHITECTURE \
|
ARCHITECTURE=$ARCHITECTURE \
|
||||||
ABI=${IMG_TYPE}/${ARCHITECTURE} \
|
ABI=${IMG_TYPE}/${ARCHITECTURE} \
|
||||||
QTWEBENGINE_DISABLE_SANDBOX=1 \
|
QTWEBENGINE_DISABLE_SANDBOX=1 \
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ export USER=root
|
|||||||
|
|
||||||
# Creating the Android Virtual Emulator.
|
# Creating the Android Virtual Emulator.
|
||||||
echo "Creating the Android Virtual Emulator ..."
|
echo "Creating the Android Virtual Emulator ..."
|
||||||
echo "Using '$PACKAGE_PATH' and '$ABI' 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 "pixel"
|
echo no | avdmanager create avd -n android --abi "$ABI" -k "$PACKAGE_PATH" --device "$DEVICE_ID"
|
||||||
|
|
||||||
# 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user