From b7abd561f561af451ec717746e198a8686d10868 Mon Sep 17 00:00:00 2001 From: Aditya Wasan Date: Tue, 17 Aug 2021 04:14:43 +0530 Subject: Add `KeyPair` and `KeyManager` to manage keys in the app (#1487) Co-authored-by: Harsh Shandilya --- scripts/boot-emulator.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 scripts/boot-emulator.sh (limited to 'scripts/boot-emulator.sh') diff --git a/scripts/boot-emulator.sh b/scripts/boot-emulator.sh new file mode 100755 index 00000000..abd73efa --- /dev/null +++ b/scripts/boot-emulator.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Boots an emulator that exactly matches the one in our CI. It is recommended +# to use this as the target device for android tests. + +set -euo pipefail + +[ -n "${ANDROID_SDK_ROOT:-}" ] || { + echo "ANDROID_SDK_ROOT must be set to use this script" + exit + 1 +} +[ -n "${ANDROID_API_LEVEL:-}" ] || { echo "ANDROID_API_LEVEL not defined; defaulting to 30"; } + +API_LEVEL="${ANDROID_API_LEVEL:-30}" + +echo no | "${ANDROID_SDK_ROOT}"/cmdline-tools/latest/bin/avdmanager create avd \ + --force \ + -n "Pixel_XL_API_${API_LEVEL}" \ + --abi 'google_apis/x86' \ + --package "system-images;android-${API_LEVEL};google_apis;x86" \ + --device 'pixel_xl' + +"${ANDROID_SDK_ROOT}"/emulator/emulator \ + -avd "Pixel_XL_API_${API_LEVEL}" \ + -no-window \ + -gpu swiftshader_indirect \ + -noaudio \ + -no-boot-anim -- cgit v1.2.3