Skip to content

Commit a800b5f

Browse files
committed
update
1 parent 0eba69d commit a800b5f

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

Bcore/src/main/cpp/DexDump.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ void fixCodeItem(JNIEnv *env, const art_lkchan::DexFile *dex_file_, size_t begin
8282
art_lkchan::ClassDataItemIterator cdit(*dex_file_, class_data);
8383
cdit.SkipAllFields();
8484
while (cdit.HasNextMethod()) {
85-
if (cdit.GetMemberIndex() > dex_file_->NumMethodIds())
86-
continue;
8785
const art_lkchan::DexFile::MethodId &method_id_item = dex_file_->GetMethodId(
8886
cdit.GetMemberIndex());
8987
auto method_name = dex_file_->GetMethodName(method_id_item);

Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package top.niunaijun.blackbox.core;
22

3-
import android.util.Log;
4-
53
import androidx.annotation.Keep;
64

75
import java.io.File;
@@ -58,7 +56,7 @@ public static void dumpDex(ClassLoader classLoader, String packageName) {
5856
result.dir = file.getAbsolutePath();
5957
result.packageName = packageName;
6058
int availableProcessors = Runtime.getRuntime().availableProcessors();
61-
ExecutorService executorService = Executors.newFixedThreadPool(availableProcessors <= 0 ? 1 : availableProcessors + 1);
59+
ExecutorService executorService = Executors.newFixedThreadPool(availableProcessors <= 0 ? 1 : availableProcessors);
6260
CountDownLatch countDownLatch = new CountDownLatch(cookies.size());
6361
AtomicInteger atomicInteger = new AtomicInteger(0);
6462

@@ -147,7 +145,7 @@ public static Object findMethod(String className, String methodName, String sign
147145
className = className.substring(0, className.length() - 1);
148146
}
149147
ClassLoader classLoader = BActivityThread.getApplication().getClassLoader();
150-
Class<?> aClass = classLoader.loadClass(className);
148+
Class<?> aClass = Class.forName(className, false, classLoader);
151149
if ("<init>".equals(methodName)) {
152150
Constructor<?>[] constructors = aClass.getDeclaredConstructors();
153151
for (Constructor<?> constructor : constructors) {

0 commit comments

Comments
 (0)