diff --git a/daemon/src/main/jni/logging.h b/daemon/src/main/jni/logging.h index 86a7220ac..ca9e36e06 100644 --- a/daemon/src/main/jni/logging.h +++ b/daemon/src/main/jni/logging.h @@ -25,7 +25,7 @@ #include #ifndef LOG_TAG -#define LOG_TAG "LSPosed" +#define LOG_TAG "VectorDaemon" #endif #ifdef LOG_DISABLED diff --git a/daemon/src/main/jni/obfuscation.cpp b/daemon/src/main/jni/obfuscation.cpp index 96d7c2048..9965f42f1 100644 --- a/daemon/src/main/jni/obfuscation.cpp +++ b/daemon/src/main/jni/obfuscation.cpp @@ -221,6 +221,26 @@ extern "C" JNIEXPORT jobject JNICALL Java_org_lsposed_lspd_service_ObfuscationMa return nullptr; } + bool needs_obfuscation = false; + for (const auto &sig : signatures) { + if (memmem(mem, size, sig.first.c_str(), sig.first.length()) != nullptr) { + needs_obfuscation = true; + break; + } + } + + if (!needs_obfuscation) { + LOGD("No target signatures found in fd=%d, skipping slicer.", fd); + munmap(mem, size); + + // Wrap the duplicated FD into Java objects and return instantly + auto java_fd = + lsplant::JNI_NewObject(env, class_file_descriptor, method_file_descriptor_ctor, fd); + auto java_sm = + lsplant::JNI_NewObject(env, class_shared_memory, method_shared_memory_ctor, java_fd); + return java_sm.release(); + } + // Process the DEX and obtain a new file descriptor for the output int new_fd = obfuscateDexBuffer(mem, size); diff --git a/external/apache/commons-lang b/external/apache/commons-lang index 675ab08d0..422ab6377 160000 --- a/external/apache/commons-lang +++ b/external/apache/commons-lang @@ -1 +1 @@ -Subproject commit 675ab08d0eb62b7d2edd43fe42512c896e84bcd6 +Subproject commit 422ab637736e06076c04a768ce03ecc2e5344937 diff --git a/external/fmt b/external/fmt index 0e078f6ed..dc05bee30 160000 --- a/external/fmt +++ b/external/fmt @@ -1 +1 @@ -Subproject commit 0e078f6ed0624be8babc43bd145371d9f3a08aab +Subproject commit dc05bee30755bb993add7ed90845d87c2315f9c6 diff --git a/services/libxposed b/services/libxposed index 496b76fa3..11f8945de 160000 --- a/services/libxposed +++ b/services/libxposed @@ -1 +1 @@ -Subproject commit 496b76fa3e5af87958ebef97bd160319e05da79b +Subproject commit 11f8945de4e24efc0eb0e2e87a2dd8284d8f7b66 diff --git a/xposed/libxposed b/xposed/libxposed index 88cc0781e..eb63ec2c4 160000 --- a/xposed/libxposed +++ b/xposed/libxposed @@ -1 +1 @@ -Subproject commit 88cc0781e1138477c6b2a6570a0a27692f91f175 +Subproject commit eb63ec2c49a34a9c3cd08a7eee2b5cd8332f46d2