XposedBridge.hookAllMethods(XposedHelpers.findClassIfExists("android.app.ActivityThread",loadPackageParam.classLoader), "performLaunchActivity", new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
super.beforeHookedMethod(param);
}
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
super.afterHookedMethod(param);
Log.i(TAG, "beforeHookedMethod: android.app.ActivityThread");
Application mInitialApplication = (Application)XposedHelpers.getObjectField(param.thisObject,"mInitialApplication");
Log.i(TAG, "beforeHookedMethod: mInitialApplication");
ClassLoader classLoader = mInitialApplication.getClassLoader();
HttpServer.getInstance().startServer(classLoader);
}
});