|
|
@ -1,7 +1,5 @@ |
|
|
|
package top.niunaijun.blackbox.core; |
|
|
|
package top.niunaijun.blackbox.core; |
|
|
|
|
|
|
|
|
|
|
|
import android.util.Log; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.Keep; |
|
|
|
import androidx.annotation.Keep; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
@ -58,7 +56,7 @@ public class VMCore { |
|
|
|
result.dir = file.getAbsolutePath(); |
|
|
|
result.dir = file.getAbsolutePath(); |
|
|
|
result.packageName = packageName; |
|
|
|
result.packageName = packageName; |
|
|
|
int availableProcessors = Runtime.getRuntime().availableProcessors(); |
|
|
|
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()); |
|
|
|
CountDownLatch countDownLatch = new CountDownLatch(cookies.size()); |
|
|
|
AtomicInteger atomicInteger = new AtomicInteger(0); |
|
|
|
AtomicInteger atomicInteger = new AtomicInteger(0); |
|
|
|
|
|
|
|
|
|
|
@ -147,7 +145,7 @@ public class VMCore { |
|
|
|
className = className.substring(0, className.length() - 1); |
|
|
|
className = className.substring(0, className.length() - 1); |
|
|
|
} |
|
|
|
} |
|
|
|
ClassLoader classLoader = BActivityThread.getApplication().getClassLoader(); |
|
|
|
ClassLoader classLoader = BActivityThread.getApplication().getClassLoader(); |
|
|
|
Class<?> aClass = classLoader.loadClass(className); |
|
|
|
Class<?> aClass = Class.forName(className, false, classLoader); |
|
|
|
if ("<init>".equals(methodName)) { |
|
|
|
if ("<init>".equals(methodName)) { |
|
|
|
Constructor<?>[] constructors = aClass.getDeclaredConstructors(); |
|
|
|
Constructor<?>[] constructors = aClass.getDeclaredConstructors(); |
|
|
|
for (Constructor<?> constructor : constructors) { |
|
|
|
for (Constructor<?> constructor : constructors) { |
|
|
|