1#!/bin/bash 2set -x -e -v 3 4# This script is for fetching and repacking the Android emulator (for 5# Linux), the tools required to produce Android packages. 6 7UPLOAD_DIR=$HOME/project/gecko/android-emulator 8 9mkdir -p $HOME/artifacts $UPLOAD_DIR 10 11# Populate /builds/worker/.mozbuild/android-emulator-linux. 12cd $GECKO_PATH 13./mach python python/mozboot/mozboot/android.py --emulator-only --no-interactive --list-packages 14 15# Remove extra files we don't need 16rm -rfv /builds/worker/.mozbuild/android-sdk-linux/tools 17mkdir /builds/worker/.mozbuild/android-sdk-linux/system-images 18mkdir /builds/worker/.mozbuild/android-sdk-linux/platforms 19find /builds/worker/.mozbuild/android-sdk-linux/emulator/qemu -type f -not -name "*x86*" -print -delete 20 21tar cavf $UPLOAD_DIR/android-emulator-linux.tar.zst -C /builds/worker/.mozbuild android-sdk-linux bundletool.jar 22 23ls -al $UPLOAD_DIR 24