From bd0b11971dd3b34df1241ae230553efc5d40ad8d Mon Sep 17 00:00:00 2001 From: Sergey Minaev Date: Fri, 6 Dec 2019 12:47:45 +0300 Subject: [PATCH] Downgrade Android emulator to avoid headless mode bug. Signed-off-by: Sergey Minaev --- libindy/ci/setup.android.env.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/libindy/ci/setup.android.env.sh b/libindy/ci/setup.android.env.sh index 3fc79658d6..c1afa0576b 100644 --- a/libindy/ci/setup.android.env.sh +++ b/libindy/ci/setup.android.env.sh @@ -54,12 +54,19 @@ create_avd(){ yes | sdkmanager --licenses - echo "yes" | - sdkmanager --no_https \ - "emulator" \ - "platform-tools" \ - "platforms;android-24" \ - "system-images;android-24;default;${ABI}" + if [ ! -d "emulator" ] ; then + echo "yes" | + sdkmanager --no_https \ + "emulator" \ + "platform-tools" \ + "platforms;android-24" \ + "system-images;android-24;default;${ABI}" + + # TODO hack to downgrade Android Emulator. Should be removed as soon as headless mode will be fixed. + curl -o emu.zip https://dl.google.com/android/repository/emulator-linux-5889189.zip + mv emulator emulator_backup + unzip emu.zip + fi echo "${BLUE}Creating android emulator${RESET}"