From a5c65a324f39dcf863258b2371a731cf1ee5decb Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 27 Jan 2025 00:28:35 +0100 Subject: [PATCH] Patcher module: abort for qti libraries --- root-module/customize.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/root-module/customize.sh b/root-module/customize.sh index cabe76c..7d6ece1 100644 --- a/root-module/customize.sh +++ b/root-module/customize.sh @@ -89,10 +89,9 @@ for lib_path in \ "/system/lib64/libbluetooth_qti.so" \ "/system_ext/lib64/libbluetooth_qti.so"; do if [ -f "$lib_path" ]; then - SOURCE_FILE="$lib_path" - LIBRARY_NAME="$(basename "$lib_path")" - ui_print "Detected library: $SOURCE_FILE" - break + ui_print "Detected library: $lib_path" + [ -z "$SOURCE_FILE" ] && SOURCE_FILE="$lib_path" + [ -z "$LIBRARY_NAME" ] && LIBRARY_NAME="$(basename "$lib_path")" fi done @@ -101,6 +100,11 @@ done abort "No target library found." } +if echo "$LIBRARY_NAME" | grep -q "qti"; then + ui_print "ERROR: \"qti\" Bluetooth libraries are NOT supported by the patcher and you won't be able to use aln. Aborting..." + abort "Bluetooth driver not compatible." +fi + ui_print "Calculating patch addresses for $SOURCE_FILE..." # export R2_LIBDIR="$UNZIP_DIR/radare2-android/libs/arm64-v8a"