mirror of
https://github.com/HQarroum/docker-android.git
synced 2026-07-30 03:12:18 +00: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 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 \
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user