Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
nnjun committed Jun 8, 2021
1 parent 0eba69d commit a800b5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Bcore/src/main/cpp/DexDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package top.niunaijun.blackbox.core;

import android.util.Log;

import androidx.annotation.Keep;

import java.io.File;
Expand Down Expand Up @@ -58,7 +56,7 @@ public static void dumpDex(ClassLoader classLoader, String packageName) {
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);

Expand Down Expand Up @@ -147,7 +145,7 @@ public static Object findMethod(String className, String methodName, String sign
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 ("<init>".equals(methodName)) {
Constructor<?>[] constructors = aClass.getDeclaredConstructors();
for (Constructor<?> constructor : constructors) {
Expand Down

0 comments on commit a800b5f

Please sign in to comment.