pull/29/head
Milk 4 years ago
parent 0eba69d686
commit a800b5f638
  1. 2
      Bcore/src/main/cpp/DexDump.cpp
  2. 6
      Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java

@ -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);

@ -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 ("<init>".equals(methodName)) {
Constructor<?>[] constructors = aClass.getDeclaredConstructors();
for (Constructor<?> constructor : constructors) {

Loading…
Cancel
Save