ci/android: Use aapt from Debian packages

Switch to using the aapt Debian package, which includes up-to-date
versions of both aapt and aapt2. This removes the need to manually
download and install the Android build-tools, eliminating one of the
blockers for a hypothetical arm64 test-android container.

Verified versions:
aapt: Android Asset Packaging Tool, v0.2-debian
aapt2: Android Asset Packaging Tool (aapt) 2.19-debian

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
This commit is contained in:
Valentine Burley 2025-04-21 10:36:39 +02:00 committed by Marge Bot
parent c2ac7fa77b
commit b3c07fe722
2 changed files with 13 additions and 18 deletions

View file

@ -4,7 +4,7 @@
. "${SCRIPTS_DIR}/setup-test-env.sh"
export PATH=/android-tools/android-cts/jdk/bin/:/android-tools/build-tools:$PATH
export PATH=/android-tools/android-cts/jdk/bin/:$PATH
export JAVA_HOME=/android-tools/android-cts/jdk
# Wait for the appops service to show up

View file

@ -16,18 +16,19 @@ export DEBIAN_FRONTEND=noninteractive
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
build-essential:native
ccache
cmake
config-package-dev
debhelper-compat
dpkg-dev
ninja-build
sudo
unzip
build-essential:native
ccache
cmake
config-package-dev
debhelper-compat
dpkg-dev
ninja-build
sudo
unzip
)
DEPS=(
aapt
iproute2
)
apt-get install -y --no-remove --no-install-recommends \
@ -138,9 +139,9 @@ usermod -a -G kvm,cvdnetwork root
section_end cuttlefish
############### Downloading Android CTS tools
############### Downloading Android CTS
uncollapsed_section_start android-cts "Downloading Android CTS tools"
uncollapsed_section_start android-cts "Downloading Android CTS"
ANDROID_CTS_VERSION="${ANDROID_VERSION}_r1"
ANDROID_CTS_DEVICE_ARCH="x86"
@ -159,12 +160,6 @@ rm "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
ANDROID_CTS_MODULES_KEEP_EXPRESSION=$(printf "%s|" $ANDROID_CTS_MODULES | sed -e 's/|$//g')
find android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "build-tools_r${ANDROID_SDK_VERSION}-linux.zip" "https://dl.google.com/android/repository/build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
unzip "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
rm "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
mv "android-$ANDROID_VERSION" build-tools
popd
section_end android-cts