From 9279f30e89c36d11f766aed28b9dec1d17530415 Mon Sep 17 00:00:00 2001 From: vvb2060 Date: Wed, 14 Sep 2022 22:59:12 +0800 Subject: [PATCH] Upload mapping and native debug symbols --- .github/workflows/build.yml | 10 ++++++++++ app/build.gradle.kts | 8 ++++---- native/src/Android.mk | 2 ++ native/src/Application.mk | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0da1b712..afefd0cfb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,6 +89,9 @@ jobs: run: | python build.py -v all + - name: Stop gradle daemon + run: ./gradlew --stop + # Only upload artifacts built on Linux - name: Upload build artifact if: runner.os == 'Linux' @@ -96,3 +99,10 @@ jobs: with: name: ${{ github.sha }} path: out + + - name: Upload mapping and native debug symbols + if: runner.os == 'Linux' + uses: actions/upload-artifact@v3 + with: + name: ${{ github.sha }}-symbols + path: app/build/outputs diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c9da4eb26..e902b1a02 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -26,7 +26,10 @@ android { vectorDrawables.useSupportLibrary = true versionName = Config.version versionCode = Config.versionCode - ndk.abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64") + ndk { + abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64") + debugSymbolLevel = "FULL" + } } buildTypes { @@ -54,9 +57,6 @@ android { excludes += "/*.bin" excludes += "/*.json" } - jniLibs { - keepDebugSymbols += "**/*.so" - } } } diff --git a/native/src/Android.mk b/native/src/Android.mk index 3e331d05b..1932de0d6 100644 --- a/native/src/Android.mk +++ b/native/src/Android.mk @@ -58,11 +58,13 @@ ifdef B_PRELOAD include $(CLEAR_VARS) LOCAL_MODULE := init-ld LOCAL_SRC_FILES := init/preload.c +LOCAL_STRIP_MODE := --strip-all include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := zygisk-ld LOCAL_SRC_FILES := zygisk/loader.c +LOCAL_STRIP_MODE := --strip-all include $(BUILD_SHARED_LIBRARY) endif diff --git a/native/src/Application.mk b/native/src/Application.mk index 1ff317bcd..3ffe46736 100644 --- a/native/src/Application.mk +++ b/native/src/Application.mk @@ -6,7 +6,7 @@ APP_CPPFLAGS := -std=c++20 APP_STL := none APP_PLATFORM := android-23 APP_THIN_ARCHIVE := true -APP_STRIP_MODE := --strip-all +APP_STRIP_MODE := none # Busybox should use stock libc.a ifdef B_BB