From d15db908b8a23dd601f16958b0828d4a1f50fd3b Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 17:45:05 +0100 Subject: [PATCH] get rid of emulator and adb port in start-android.sh --- scripts/start-android.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 808558cc8..3f9d250b5 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -15,10 +15,6 @@ NDK_VERSION=${ANDROID_NDK:-"27.2.12479018"} AVD_EMULATOR_NAME="sentry_android_${ARCH}" IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} NDK_PACKAGE=${NDK_IMAGE:-"ndk;${NDK_VERSION}"} -adb start-server - -echo "List installed images..." -$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list # Create an Android Virtual Device echo "Create Test AVDs with..." @@ -27,8 +23,6 @@ echo "API_LEVEL = $API_LEVEL" echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME" echo "IMAGE = $IMAGE" echo "NDK_PACKAGE = $NDK_PACKAGE" -echo "ADB_SERVER_PORT = $ADB_SERVER_PORT" -echo "EMULATOR_PORT = $EMULATOR_PORT" echo "Install image and NDK..." yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses @@ -46,15 +40,15 @@ $ANDROID_HOME/emulator/emulator -accel-check # Start emulator in background echo "Starting emulator..." -nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot -port "$EMULATOR_PORT" > /dev/null 2>&1 & +nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot > /dev/null 2>&1 & # For debugging emulator start issues: # echo "Starting emulator blocking..." -# $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot -port "$EMULATOR_PORT" +# $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot echo "Wait for emulator availability..." -$ANDROID_HOME/platform-tools/adb -s "emulator-$EMULATOR_PORT" wait-for-device shell 'ls' +$ANDROID_HOME/platform-tools/adb wait-for-device shell 'ls' echo "Verify emulator devices are running..." -$ANDROID_HOME/platform-tools/adb -s "emulator-$EMULATOR_PORT" devices +$ANDROID_HOME/platform-tools/adb devices echo "Emulator started."