XposedInit @author wrbug @since 2018/3/20
| 19 | * @since 2018/3/20 |
| 20 | */ |
| 21 | public class XposedInit implements IXposedHookLoadPackage { |
| 22 | |
| 23 | |
| 24 | public static void log(String txt) { |
| 25 | |
| 26 | XposedBridge.log("dumpdex-> " + txt); |
| 27 | } |
| 28 | |
| 29 | public static void log(Throwable t) { |
| 30 | if (!BuildConfig.DEBUG) { |
| 31 | return; |
| 32 | } |
| 33 | XposedBridge.log(t); |
| 34 | } |
| 35 | |
| 36 | @Override |
| 37 | public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) { |
| 38 | PackerInfo.Type type = PackerInfo.find(lpparam); |
| 39 | if (type == null) { |
| 40 | return; |
| 41 | } |
| 42 | final String packageName = lpparam.packageName; |
| 43 | if (lpparam.packageName.equals(packageName)) { |
| 44 | String path = "/data/data/" + packageName + "/dump"; |
| 45 | File parent = new File(path); |
| 46 | if (!parent.exists() || !parent.isDirectory()) { |
| 47 | parent.mkdirs(); |
| 48 | } |
| 49 | log("sdk version:" + Build.VERSION.SDK_INT); |
| 50 | if (DeviceUtils.isOreo()) { |
| 51 | OreoDump.init(lpparam); |
| 52 | } else { |
| 53 | LowSdkDump.init(lpparam,type); |
| 54 | } |
| 55 | |
| 56 | } |
| 57 | } |
| 58 | } |
nothing calls this directly
no outgoing calls
no test coverage detected