获得当前的context
Context context = (Context) AndroidAppHelper.currentApplication();
获取第三方的
XposedHelpers.findAndHookMethod("android.app.Instrumentation", lpparam.classLoader, "callApplicationOnCreate", Application.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
super.afterHookedMethod(param);
if (param.args[0] instanceof Application) {
try {
xcontext = ((Application) param.args[0]).getApplicationContext();
} catch (Exception ee) {
XposedBridge.log("" + ee.toString());
}
}
}
});