From f490fbdff87cc0218b249921d08748635ef7f952 Mon Sep 17 00:00:00 2001 From: Nolen Johnson Date: Sat, 5 Nov 2022 01:10:43 -0400 Subject: [PATCH] exynos9610: Patch wfc-pkt-router to load libip_checksum_shim * In Android T, AOSP moved `libnetutils` to an APEX that is inaccessible to the vendor namespace - and it can't be built to vendor in any treble-compliant way. * Our `wfc-pkt-router` blob lives on vendor, and relies on `libnetutils.so`. * Upon further analysis, we only reply on a few checksum related functions, such as the symbol `ipv4_pseudo_header_checksum`, which lives in the (now) staticly included dependency of `libnetutils.so`, `libip_checksum`. * To work around this, we enabled building `libip_checksum` as a stand-alone vendor_available library called `libip_checksum_shim.so`, and `patchelf` `wfc-pkt-router` to depend on `lib_up_checksum.so`. Depends-on: I7dff9ec6c8ff146f6090e9519ece7844b4a057eb Change-Id: Ibaae5435c20f36469bf3417069a3fa3cfeb3aa9a --- common.mk | 1 + extract-files.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/common.mk b/common.mk index 73cadb0..68b0c66 100644 --- a/common.mk +++ b/common.mk @@ -390,6 +390,7 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.wifi@1.0-service \ hostapd \ + libip_checksum_shim.vendor \ WifiOverlay \ wpa_supplicant diff --git a/extract-files.sh b/extract-files.sh index 46b750b..2d54eee 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -64,6 +64,8 @@ BLOB_ROOT="${ANDROID_ROOT}"/vendor/"${VENDOR}"/"${DEVICE_COMMON}"/proprietary "${PATCHELF}" --replace-needed "libmedia.so" "libmedia_ims.so" "${BLOB_ROOT}"/lib64/libmediaadaptor.so +"${PATCHELF}" --replace-needed "libnetutils.so" "libip_checksum_shim.so" "${BLOB_ROOT}"/vendor/bin/wfc-pkt-router + "${PATCHELF}" --replace-needed "libutils.so" "libutils-v32.so" "${BLOB_ROOT}"/vendor/lib/libexynosdisplay.so "${PATCHELF}" --replace-needed "libutils.so" "libutils-v32.so" "${BLOB_ROOT}"/vendor/lib64/libexynosdisplay.so "${PATCHELF}" --replace-needed "libutils.so" "libutils-v32.so" "${BLOB_ROOT}"/vendor/lib/hw/hwcomposer.exynos9610.so -- 2.20.1