From cd4e29e102f9aba15e3ddb8402a15b5ceadf463a Mon Sep 17 00:00:00 2001 From: a-maurice Date: Mon, 10 Feb 2025 11:01:58 -0800 Subject: [PATCH 1/5] Switch FTL to target Android 35 --- scripts/gha/print_matrix_configuration.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index ca0181c41..3c2a7f70f 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -95,9 +95,10 @@ ]}, "android_target": {"platform": ANDROID, "type": "real", "device": [ - "model=blueline,version=28", # Pixel 3 - "model=gts3lltevzw,version=28", # Galaxy Tab S3 - "model=SH-01L,version=28", # AQUOS sense2 SH-01L + #"model=blueline,version=28", # Pixel 3 + #"model=gts3lltevzw,version=28", # Galaxy Tab S3 + #"model=SH-01L,version=28", # AQUOS sense2 SH-01L + "model=shiba_beta,version=35", # Pixel 8 ]}, "android_latest": {"platform": ANDROID, "type": "real", "device": [ From cb3a5a060778bc842684a11ec54fd29c0479603e Mon Sep 17 00:00:00 2001 From: a-maurice Date: Mon, 10 Feb 2025 11:39:06 -0800 Subject: [PATCH 2/5] Try setting the max page size --- cmake/build_shared.cmake | 2 ++ cmake/build_universal.cmake | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cmake/build_shared.cmake b/cmake/build_shared.cmake index 3cbb39140..040179fdd 100644 --- a/cmake/build_shared.cmake +++ b/cmake/build_shared.cmake @@ -106,6 +106,8 @@ function(build_firebase_shared LIBRARY_NAME ARTIFACT_NAME OUTPUT_NAME) "-Wl,--no-undefined" # Link against the static libc++, which is the default done by Gradle. "-static-libstdc++" + # Set the max page size to 16KB, needed by Android 15 + "-Wl,-z,max-page-size=16384" ) add_custom_command(TARGET ${shared_target} POST_BUILD COMMAND "${ANDROID_TOOLCHAIN_PREFIX}strip" -g -S -d --strip-debug --verbose diff --git a/cmake/build_universal.cmake b/cmake/build_universal.cmake index e14a086e8..d24e04903 100644 --- a/cmake/build_universal.cmake +++ b/cmake/build_universal.cmake @@ -86,6 +86,8 @@ function(build_uni TARGET_LINK_LIB_NAMES PROJECT_LIST_HEADER_VARIABLE) "-Wl,--no-undefined" # Link against the static libc++, which is the default done by Gradle. "-static-libstdc++" + # Set the max page size to 16KB, needed by Android 15 + "-Wl,-z,max-page-size=16384" ) add_custom_command(TARGET firebase_app_uni POST_BUILD COMMAND "${ANDROID_TOOLCHAIN_PREFIX}strip" -g -S -d --strip-debug --verbose From ce6bd1c4f8f6dc125e477b19febde20f6acd55a8 Mon Sep 17 00:00:00 2001 From: a-maurice Date: Tue, 11 Feb 2025 13:43:07 -0800 Subject: [PATCH 3/5] Update ndk to r23c --- .github/workflows/build_android.yml | 14 +++++++------- scripts/gha/build_testapps.py | 16 ++++------------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_android.yml b/.github/workflows/build_android.yml index 4613f6af4..fd3b492bb 100644 --- a/.github/workflows/build_android.yml +++ b/.github/workflows/build_android.yml @@ -70,18 +70,18 @@ jobs: id: cache_ndk uses: actions/cache@v3 with: - path: /tmp/android-ndk-r21e - key: android-ndk-${{ matrix.os }}-r21e + path: /tmp/android-ndk-r23c + key: android-ndk-${{ matrix.os }}-r23c - name: Check cached NDK shell: bash if: steps.cache_ndk.outputs.cache-hit != 'true' run: | # If the NDK failed to download from the cache, but there is a - # /tmp/android-ndk-r21e directory, it's incomplete, so remove it. - if [[ -d "/tmp/android-ndk-r21e" ]]; then + # /tmp/android-ndk-r23c directory, it's incomplete, so remove it. + if [[ -d "/tmp/android-ndk-r23c" ]]; then echo "Removing incomplete download of NDK" - rm -rf /tmp/android-ndk-r21e + rm -rf /tmp/android-ndk-r23c fi - name: Install prerequisites @@ -92,8 +92,8 @@ jobs: python scripts/gha/install_prereqs_desktop.py build_scripts/android/install_prereqs.sh cd .. - echo "NDK_ROOT=/tmp/android-ndk-r21e" >> $GITHUB_ENV - echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $GITHUB_ENV + echo "NDK_ROOT=/tmp/android-ndk-r23c" >> $GITHUB_ENV + echo "ANDROID_NDK_HOME=/tmp/android-ndk-r23c" >> $GITHUB_ENV brew install swig - name: Force Java 11 diff --git a/scripts/gha/build_testapps.py b/scripts/gha/build_testapps.py index 862617569..fa90b3de7 100644 --- a/scripts/gha/build_testapps.py +++ b/scripts/gha/build_testapps.py @@ -499,20 +499,12 @@ def patch_android_env(unity_version): # Set ndk env UNITY_SETTINGS = { "2022": { - _WINDOWS: "https://dl.google.com/android/repository/android-ndk-r21-windows-x86_64.zip", - _MACOS: "https://dl.google.com/android/repository/android-ndk-r21-darwin-x86_64.zip", + _WINDOWS: "https://dl.google.com/android/repository/android-ndk-r23c-windows.zip", + _MACOS: "https://dl.google.com/android/repository/android-ndk-r23c-darwin.zip", }, "2021": { - _WINDOWS: "https://dl.google.com/android/repository/android-ndk-r21-windows-x86_64.zip", - _MACOS: "https://dl.google.com/android/repository/android-ndk-r21-darwin-x86_64.zip", - }, - "2020": { - _WINDOWS: "https://dl.google.com/android/repository/android-ndk-r19-windows-x86_64.zip", - _MACOS: "https://dl.google.com/android/repository/android-ndk-r19-darwin-x86_64.zip", - }, - "2019": { - _WINDOWS: "https://dl.google.com/android/repository/android-ndk-r19-windows-x86_64.zip", - _MACOS: "https://dl.google.com/android/repository/android-ndk-r19-darwin-x86_64.zip", + _WINDOWS: "https://dl.google.com/android/repository/android-ndk-r23c-windows.zip", + _MACOS: "https://dl.google.com/android/repository/android-ndk-r23c-darwin.zip", }, } url = UNITY_SETTINGS[str(major_version)][get_desktop_platform()] From 66044c15b23d93545bd5207a9458fd5a7b99bffa Mon Sep 17 00:00:00 2001 From: a-maurice Date: Tue, 11 Feb 2025 15:26:32 -0800 Subject: [PATCH 4/5] Update Android strip location --- cmake/build_shared.cmake | 2 +- cmake/build_universal.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/build_shared.cmake b/cmake/build_shared.cmake index 040179fdd..846d40ebe 100644 --- a/cmake/build_shared.cmake +++ b/cmake/build_shared.cmake @@ -110,7 +110,7 @@ function(build_firebase_shared LIBRARY_NAME ARTIFACT_NAME OUTPUT_NAME) "-Wl,-z,max-page-size=16384" ) add_custom_command(TARGET ${shared_target} POST_BUILD - COMMAND "${ANDROID_TOOLCHAIN_PREFIX}strip" -g -S -d --strip-debug --verbose + COMMAND "${ANDROID_STRIP}" -g -S -d --strip-debug --verbose "lib${OUTPUT_NAME}.so" COMMENT "Strip debug symbols done on final binary. lib${OUTPUT_NAME}.so") endif() diff --git a/cmake/build_universal.cmake b/cmake/build_universal.cmake index d24e04903..9c7734295 100644 --- a/cmake/build_universal.cmake +++ b/cmake/build_universal.cmake @@ -90,7 +90,7 @@ function(build_uni TARGET_LINK_LIB_NAMES PROJECT_LIST_HEADER_VARIABLE) "-Wl,-z,max-page-size=16384" ) add_custom_command(TARGET firebase_app_uni POST_BUILD - COMMAND "${ANDROID_TOOLCHAIN_PREFIX}strip" -g -S -d --strip-debug --verbose + COMMAND "${ANDROID_STRIP}" -g -S -d --strip-debug --verbose "lib${FIREBASE_APP_UNI_VERSIONED}.so" COMMENT "Strip debug symbols done on final binary. lib${FIREBASE_APP_UNI_VERSIONED}.so") endif() From 1100d9442810a0fe3845f1e347cf03c730b0e72e Mon Sep 17 00:00:00 2001 From: a-maurice Date: Tue, 11 Feb 2025 16:33:26 -0800 Subject: [PATCH 5/5] Remove verbose flag from strip --- cmake/build_shared.cmake | 2 +- cmake/build_universal.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/build_shared.cmake b/cmake/build_shared.cmake index 846d40ebe..33add5392 100644 --- a/cmake/build_shared.cmake +++ b/cmake/build_shared.cmake @@ -110,7 +110,7 @@ function(build_firebase_shared LIBRARY_NAME ARTIFACT_NAME OUTPUT_NAME) "-Wl,-z,max-page-size=16384" ) add_custom_command(TARGET ${shared_target} POST_BUILD - COMMAND "${ANDROID_STRIP}" -g -S -d --strip-debug --verbose + COMMAND "${ANDROID_STRIP}" -g -S -d --strip-debug "lib${OUTPUT_NAME}.so" COMMENT "Strip debug symbols done on final binary. lib${OUTPUT_NAME}.so") endif() diff --git a/cmake/build_universal.cmake b/cmake/build_universal.cmake index 9c7734295..138045d36 100644 --- a/cmake/build_universal.cmake +++ b/cmake/build_universal.cmake @@ -90,7 +90,7 @@ function(build_uni TARGET_LINK_LIB_NAMES PROJECT_LIST_HEADER_VARIABLE) "-Wl,-z,max-page-size=16384" ) add_custom_command(TARGET firebase_app_uni POST_BUILD - COMMAND "${ANDROID_STRIP}" -g -S -d --strip-debug --verbose + COMMAND "${ANDROID_STRIP}" -g -S -d --strip-debug "lib${FIREBASE_APP_UNI_VERSIONED}.so" COMMENT "Strip debug symbols done on final binary. lib${FIREBASE_APP_UNI_VERSIONED}.so") endif()