build(android): permit signed Sentry auxiliary ABIs in FZG validation APK
This commit is contained in:
@@ -97,7 +97,14 @@ fi
|
|||||||
unzip -tq "$SOURCE_APK" >/dev/null || fail "APK ZIP integrity check failed."
|
unzip -tq "$SOURCE_APK" >/dev/null || fail "APK ZIP integrity check failed."
|
||||||
|
|
||||||
ABI_LIST="$(unzip -Z1 "$SOURCE_APK" | sed -n 's#^lib/\([^/]*\)/.*#\1#p' | sort -u | tr '\n' ' ' | sed 's/ $//')"
|
ABI_LIST="$(unzip -Z1 "$SOURCE_APK" | sed -n 's#^lib/\([^/]*\)/.*#\1#p' | sort -u | tr '\n' ' ' | sed 's/ $//')"
|
||||||
[[ "$ABI_LIST" == "x86_64" ]] || fail "Unexpected APK ABI set: [$ABI_LIST]"
|
# The Android 13.6.1 Test App includes Sentry auxiliary libraries for other ABIs.
|
||||||
|
# Only x86_64 may contain MapLibre or CustomLayer native code; do not reject
|
||||||
|
# harmless, explicitly whitelisted Sentry files or relax the core ABI contract.
|
||||||
|
[[ " $ABI_LIST " == *" x86_64 "* ]] || fail "x86_64 ABI missing: [$ABI_LIST]"
|
||||||
|
UNEXPECTED_ABI_LIBS="$(unzip -Z1 "$SOURCE_APK" | grep '^lib/' | grep -v '^lib/x86_64/' | grep -Ev '^lib/(arm64-v8a|armeabi-v7a|x86)/libsentry(-android)?\.so$' || true)"
|
||||||
|
[[ -z "$UNEXPECTED_ABI_LIBS" ]] || fail "Non-target ABI contains unexpected libraries: [$UNEXPECTED_ABI_LIBS]"
|
||||||
|
[[ -n "$(unzip -Z1 "$SOURCE_APK" | grep '^lib/x86_64/libexample-custom-layer\.so$')" ]] || fail "lib/x86_64/libexample-custom-layer.so missing."
|
||||||
|
|
||||||
|
|
||||||
LIB_BYTES="$(unzip -l "$SOURCE_APK" 'lib/x86_64/libmaplibre.so' | awk '/lib\/x86_64\/libmaplibre\.so$/ {print $1}')"
|
LIB_BYTES="$(unzip -l "$SOURCE_APK" 'lib/x86_64/libmaplibre.so' | awk '/lib\/x86_64\/libmaplibre\.so$/ {print $1}')"
|
||||||
[[ -n "$LIB_BYTES" ]] || fail "lib/x86_64/libmaplibre.so not found in APK."
|
[[ -n "$LIB_BYTES" ]] || fail "lib/x86_64/libmaplibre.so not found in APK."
|
||||||
@@ -124,6 +131,7 @@ git_dirty=$GIT_DIRTY
|
|||||||
built_at_utc=$BUILT_AT_UTC
|
built_at_utc=$BUILT_AT_UTC
|
||||||
variant=OpenglDebug
|
variant=OpenglDebug
|
||||||
abi=x86_64
|
abi=x86_64
|
||||||
|
bundled_abis=$ABI_LIST
|
||||||
strip_native_debug_symbols=true
|
strip_native_debug_symbols=true
|
||||||
apk=$OUT_APK
|
apk=$OUT_APK
|
||||||
apk_bytes=$APK_BYTES
|
apk_bytes=$APK_BYTES
|
||||||
|
|||||||
Reference in New Issue
Block a user