repack-android-emulator-linux.sh (1097B)
1 #!/bin/bash 2 set -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 7 mkdir -p $UPLOAD_DIR 8 9 # Populate /builds/worker/.mozbuild/android-emulator-linux. 10 cd $GECKO_PATH 11 ./mach python python/mozboot/mozboot/android.py --emulator-only --no-interactive --list-packages 12 13 # Remove extra files we don't need 14 rm -rfv /builds/worker/.mozbuild/android-sdk-linux/tools 15 mkdir /builds/worker/.mozbuild/android-sdk-linux/system-images 16 mkdir /builds/worker/.mozbuild/android-sdk-linux/platforms 17 find /builds/worker/.mozbuild/android-sdk-linux/emulator/qemu -type f -not -name "*x86*" -print -delete 18 19 # Bug 2007619: override platform-tools to a known working version 20 curl --fail -L https://dl.google.com/android/repository/platform-tools_r36.0.0-linux.zip > /tmp/platform-tools.zip 21 cd /builds/worker/.mozbuild/android-sdk-linux 22 rm -rf platform-tools 23 unzip /tmp/platform-tools.zip 24 cd $GECKO_PATH 25 26 tar cavf $UPLOAD_DIR/android-emulator-linux.tar.zst -C /builds/worker/.mozbuild android-sdk-linux bundletool.jar 27 28 ls -al $UPLOAD_DIR