diff --git a/Bcore/src/main/cpp/DexDump.cpp b/Bcore/src/main/cpp/DexDump.cpp index 1577f9c..bab675a 100644 --- a/Bcore/src/main/cpp/DexDump.cpp +++ b/Bcore/src/main/cpp/DexDump.cpp @@ -82,8 +82,6 @@ void fixCodeItem(JNIEnv *env, const art_lkchan::DexFile *dex_file_, size_t begin art_lkchan::ClassDataItemIterator cdit(*dex_file_, class_data); cdit.SkipAllFields(); while (cdit.HasNextMethod()) { - if (cdit.GetMemberIndex() > dex_file_->NumMethodIds()) - continue; const art_lkchan::DexFile::MethodId &method_id_item = dex_file_->GetMethodId( cdit.GetMemberIndex()); auto method_name = dex_file_->GetMethodName(method_id_item); diff --git a/Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java b/Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java index 4fadd56..d263fa4 100644 --- a/Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java +++ b/Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java @@ -1,7 +1,5 @@ package top.niunaijun.blackbox.core; -import android.util.Log; - import androidx.annotation.Keep; import java.io.File; @@ -58,7 +56,7 @@ public class VMCore { result.dir = file.getAbsolutePath(); result.packageName = packageName; int availableProcessors = Runtime.getRuntime().availableProcessors(); - ExecutorService executorService = Executors.newFixedThreadPool(availableProcessors <= 0 ? 1 : availableProcessors + 1); + ExecutorService executorService = Executors.newFixedThreadPool(availableProcessors <= 0 ? 1 : availableProcessors); CountDownLatch countDownLatch = new CountDownLatch(cookies.size()); AtomicInteger atomicInteger = new AtomicInteger(0); @@ -147,7 +145,7 @@ public class VMCore { className = className.substring(0, className.length() - 1); } ClassLoader classLoader = BActivityThread.getApplication().getClassLoader(); - Class aClass = classLoader.loadClass(className); + Class aClass = Class.forName(className, false, classLoader); if ("".equals(methodName)) { Constructor[] constructors = aClass.getDeclaredConstructors(); for (Constructor constructor : constructors) {