From eb100b6e3bf4bb554f8ab1c2b1a42ac114c45f4e Mon Sep 17 00:00:00 2001 From: Petri Virkkunen Date: Thu, 31 Aug 2023 16:03:56 +0300 Subject: [PATCH] Add AAOS10 image for Android Automotive emulator as minimum supported SDK Android Automotive should follow the lead for Q4A and regularly test changes with both the minimum and then maximum supported SDK levels. These are Android 10 and 13, of which 13 is already active on the CI. This commit adds a Configuration for Android 10 and support for creating an avd for that image. Task-number: QAA-2073 Change-Id: I6d22c68f10a5da4b46664c67cf1369cbc7f5a537 Reviewed-by: Assam Boudjelthia --- .../tqtc-android-automotive.yaml | 16 ++++++++++ .../common/linux/android_linux.sh | 30 ++++++++++++------- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/coin/platform_configs/tqtc-android-automotive.yaml b/coin/platform_configs/tqtc-android-automotive.yaml index ff599631..7ebef271 100644 --- a/coin/platform_configs/tqtc-android-automotive.yaml +++ b/coin/platform_configs/tqtc-android-automotive.yaml @@ -33,3 +33,19 @@ Configurations: 'NON_QTBASE_TARGET_CMAKE_ARGS=-DFEATURE_native_grpc=OFF -DQT_PROTOBUF_WELL_KNOWN_TYPES_PROTO_DIR=/usr/local/include', 'ANDROID_EMULATOR=automotive_emulator_x86_64_api_33' ] +- + Id: "automotive-android-10-x86_64-on-linux" + Template: 'qtci-linux-RHEL-8.8-x86_64-50' + Target os: 'Android_ANY' + Target arch: 'x86_64' + Compiler: 'GCC' + Target compiler: 'Clang' + Platform dependency: 'rhel-8.8' + Features: ['Packaging', 'Sccache', 'WarningsAreErrors', 'AndroidTestRun', 'VMSize8', 'UseConfigure'] + Environment variables: [ + 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86_64', + 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}', + 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_ANDROID}}', + 'NON_QTBASE_TARGET_CMAKE_ARGS=-DFEATURE_native_grpc=OFF -DQT_PROTOBUF_WELL_KNOWN_TYPES_PROTO_DIR=/usr/local/include', + 'ANDROID_EMULATOR=automotive_emulator_x86_64_api_29' + ] diff --git a/coin/provisioning/common/linux/android_linux.sh b/coin/provisioning/common/linux/android_linux.sh index 718cfbe0..3a66606b 100755 --- a/coin/provisioning/common/linux/android_linux.sh +++ b/coin/provisioning/common/linux/android_linux.sh @@ -38,11 +38,14 @@ android14SystemZipName="android14system_UPB5_230623_003.tar.gz" android14SystemZipSha="9680db449516ad6212525cc53f2bc027cf8b3322" android14SystemPath="$basePath/$android14SystemZipName" -# Android automotive -sdkApiLevelAutomotive="android-33" -androidAutomotive13Url="$basePath/${sdkApiLevelAutomotive}_automotive.tar.gz" -androidAutomotive="android-automotive" -androidAutomotive13Sha="b020a938ec46af2510047284406e9bed608cad03" +# Android Automotive max SDK level image +sdkApiLevelAutomotiveMax="android-33" +androidAutomotiveMaxUrl="$basePath/${sdkApiLevelAutomotiveMax}_automotive.tar.gz" +androidAutomotiveMaxSha="b020a938ec46af2510047284406e9bed608cad03" +# Android Automotive min SDK level image +sdkApiLevelAutomotiveMin="android-29" +androidAutomotiveMinUrl="$basePath/${sdkApiLevelAutomotiveMin}_automotive.tar.gz" +androidAutomotiveMinSha="e6092585c00f87eb3b20a2eb7fdf6add42342d2f" toolsTargetFile="/tmp/$toolsFile" toolsSourceFile="$basePath/$toolsFile" @@ -148,12 +151,19 @@ echo "no" | ./avdmanager create avd -n emulator_x86_64_api_33 -c 2048M -f \ echo "no" | ./avdmanager create avd -n emulator_x86_64_api_34 -c 2048M -f \ -k "system-images;android-34;google_apis;x86_64" -echo "Install $sdkApiLevelAutomotive $androidAutomotive" -DownloadURL "$androidAutomotive13Url" "$androidAutomotive13Url" "$androidAutomotive13Sha" \ - "/tmp/${sdkApiLevelAutomotive}_automotive.tar.gz" -sudo tar -xzf "/tmp/${sdkApiLevelAutomotive}_automotive.tar.gz" -C "$sdkTargetFolder/system-images" +echo "Install maximum supported SDK level image for Android Automotive $sdkApiLevelAutomotiveMax" +DownloadURL "$androidAutomotiveMaxUrl" "$androidAutomotiveMaxUrl" "$androidAutomotiveMaxSha" \ + "/tmp/${sdkApiLevelAutomotiveMax}_automotive.tar.gz" +sudo tar -xzf "/tmp/${sdkApiLevelAutomotiveMax}_automotive.tar.gz" -C "$sdkTargetFolder/system-images" echo "no" | ./avdmanager create avd -n automotive_emulator_x86_64_api_33 -c 2048M -f \ - -k "system-images;${sdkApiLevelAutomotive};${androidAutomotive};x86_64" + -k "system-images;${sdkApiLevelAutomotiveMax};android-automotive;x86_64" + +echo "Install minimum supported SDK level image for Android Automotive $sdkApiLevelAutomotiveMin" +DownloadURL "$androidAutomotiveMinUrl" "$androidAutomotiveMinUrl" "$androidAutomotiveMinSha" \ + "/tmp/${sdkApiLevelAutomotiveMin}_automotive.tar.gz" +sudo tar -xzf "/tmp/${sdkApiLevelAutomotiveMin}_automotive.tar.gz" -C $sdkTargetFolder/system-images +echo "no" | ./avdmanager create avd -n automotive_emulator_x86_64_api_29 -c 2048M -f \ + -k "system-images;${sdkApiLevelAutomotiveMin};android-automotive;x86_64" # Purely informative, show the list of avd devices ./avdmanager list avd