1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-05 18:30:50 +01:00

tools/android: Clone install_android_platform_tools() from LISA

Make sure devlib/install_base.sh has complete Android SDK support. This
will be the first step of removing duplicate Android SDK installation
functions from LISA/install_base.sh.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
This commit is contained in:
Metin Kaya 2024-05-23 18:13:00 +01:00 committed by Marc Bonnici
parent 14905fb515
commit 1c52f13e50

View File

@ -66,6 +66,16 @@ get_android_sdk_host_arch() {
echo "${arch}" echo "${arch}"
} }
# No need for the whole SDK for this one
install_android_platform_tools() {
echo "Installing Android Platform Tools ..."
local url="https://dl.google.com/android/repository/platform-tools-latest-linux.zip"
echo "Downloading Android Platform Tools from: ${url}"
wget -qO- "${url}" | bsdtar -xf- -C "${ANDROID_HOME}/"
}
cleanup_android_home() { cleanup_android_home() {
echo "Cleaning up Android SDK: ${ANDROID_HOME}" echo "Cleaning up Android SDK: ${ANDROID_HOME}"
rm -rf "${ANDROID_HOME}" rm -rf "${ANDROID_HOME}"
@ -238,6 +248,15 @@ for arg in "${args[@]}"; do
handled=1 handled=1
;;& ;;&
# Not part of --install-all since that is already satisfied by
# --install-android-tools The advantage of that method is that it does not
# require the Java JDK/JRE to be installed, and is a bit quicker. However,
# it will not provide the build-tools which are needed by devlib.
"--install-android-platform-tools")
install_functions+=(install_android_platform_tools)
handled=1
;;&
"--install-android-tools" | "--install-all") "--install-android-tools" | "--install-all")
install_functions+=( install_functions+=(
find_java_home find_java_home