Last active
January 30, 2022 11:50
-
-
Save andersu/7cbd560e744637e0aac71761c429141f to your computer and use it in GitHub Desktop.
Create emulator for snapshot testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -d "$ANDROID_HOME" ] ; then | |
echo "Cannot find \$ANDROID_HOME." | |
exit | |
fi | |
if [ ! -d "$ANDROID_HOME/cmdline-tools" ]; then | |
echo "Cannot find Android SDK Command-line Tools. Install them via SDK Manager > SDK Tools." | |
exit | |
fi | |
if [[ $(uname -m) == 'arm64' ]]; then | |
ARCHITECTURE='arm64-v8a' | |
else | |
ARCHITECTURE=$(uname -m) | |
fi | |
echo "Creating emulator with architecture: $ARCHITECTURE" | |
"$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager" "--verbose" "create" "avd" "--force" "--name" "snappy" "--device" "pixel" "--package" "system-images;android-30;google_apis;$ARCHITECTURE" "--tag" "google_apis" "--abi" "$ARCHITECTURE" "--sdcard" "512M" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment