From efc390724b98d059a4b1a48cc169489e58a50d89 Mon Sep 17 00:00:00 2001 From: Milk <1871357815@qq.com> Date: Sun, 23 May 2021 22:38:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81uri?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/top/niunaijun/blackbox/BlackDexCore.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Bcore/src/main/java/top/niunaijun/blackbox/BlackDexCore.java b/Bcore/src/main/java/top/niunaijun/blackbox/BlackDexCore.java index 2cb52d3..7838606 100644 --- a/Bcore/src/main/java/top/niunaijun/blackbox/BlackDexCore.java +++ b/Bcore/src/main/java/top/niunaijun/blackbox/BlackDexCore.java @@ -1,6 +1,7 @@ package top.niunaijun.blackbox; import android.content.Context; +import android.net.Uri; import java.io.File; @@ -51,6 +52,15 @@ public class BlackDexCore { } } + public boolean dumpDex(Uri file) { + InstallResult installResult = BlackBoxCore.get().installPackage(file); + if (installResult.success) { + return BlackBoxCore.get().launchApk(installResult.packageName); + } else { + return false; + } + } + public void registerDumpMonitor(IBDumpMonitor monitor) { BlackBoxCore.getBDumpManager().registerMonitor(monitor.asBinder()); }