From b9028f379b16d67f576b9c70d46ddbf6ba265514 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Tue, 5 May 2026 14:26:10 -0700 Subject: [PATCH] android_stub: fix update-android-headers.sh for libbacktrace libbacktrace is gone in Android 14. If needed, one could add support for libunwindstack going forward. Acked-by: Valentine Burley Part-of: --- bin/update-android-headers.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/update-android-headers.sh b/bin/update-android-headers.sh index 57b1ceb95e8..dcd1687e87d 100755 --- a/bin/update-android-headers.sh +++ b/bin/update-android-headers.sh @@ -12,7 +12,6 @@ if [ ! -d platform-hardware-libhardware ]; then git clone --depth 1 https://android.googlesource.com/platform/hardware/libhardware platform-hardware-libhardware git clone --depth 1 https://android.googlesource.com/platform/system/core platform-system-core git clone --depth 1 https://android.googlesource.com/platform/system/logging platform-system-logging - git clone --depth 1 https://android.googlesource.com/platform/system/unwinding platform-system-unwinding fi dest=include/android_stub @@ -21,6 +20,13 @@ dest=include/android_stub cp -av ${dest}/system/window.h platform-system-core/libsystem/include/system +# Persist the frozen libbacktrace header for backward compatibility, since the +# support has been dropped in Android 15. +# +# TODO: add support for libunwindstack +mkdir -p platform-system-unwinding/libbacktrace/include +cp -av ${dest}/backtrace platform-system-unwinding/libbacktrace/include/ + rm -rf ${dest} mkdir ${dest}