Skip to content

Commit

Permalink
支持VAExposed
Browse files Browse the repository at this point in the history
目前VAExposed不支持hook空方法,换一个HOOK点。
  • Loading branch information
维术 committed Feb 1, 2018
1 parent d45cd73 commit 3d550ae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/src/main/java/com/yyxx/wechatfp/xposed/WalletBaseUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.app.Application;
import android.app.Instrumentation;
import android.content.Context;
import android.content.pm.PackageManager;
import android.text.TextUtils;
Expand Down Expand Up @@ -49,19 +50,19 @@ public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {

private void initWechat(final LoadPackageParam lpparam) {
L.d("loaded: [" + lpparam.packageName + "]" + " version:" + BuildConfig.VERSION_NAME);
XposedHelpers.findAndHookMethod(Application.class, "onCreate", new XC_MethodHook() {
XposedHelpers.findAndHookMethod(Instrumentation.class, "callApplicationOnCreate",Application.class, new XC_MethodHook() {
@TargetApi(21)
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
L.d("Application onCreate");
Context context = (Context) param.thisObject;
Context context = (Context) param.args[0];
XposedPluginLoader.load(XposedWeChatPlugin.class, context, lpparam);
}
});
}

private void initAlipay(final LoadPackageParam lpparam) {
L.d("loaded: [" + lpparam.packageName + "]" + " version:" + BuildConfig.VERSION_NAME);
XposedHelpers.findAndHookMethod(Application.class, "onCreate", new XC_MethodHook() {
XposedHelpers.findAndHookMethod(Instrumentation.class, "callApplicationOnCreate",Application.class, new XC_MethodHook() {
private boolean mCalled = false;
@TargetApi(21)
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
Expand All @@ -77,7 +78,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

private void initTaobao(final LoadPackageParam lpparam) {
L.d("loaded: [" + lpparam.packageName + "]" + " version:" + BuildConfig.VERSION_NAME);
XposedHelpers.findAndHookMethod(Application.class, "onCreate", new XC_MethodHook() {
XposedHelpers.findAndHookMethod(Instrumentation.class, "callApplicationOnCreate",Application.class, new XC_MethodHook() {
//受Atlas影响Application onCreate入口只需执行一次即可
private boolean mCalled = false;
@TargetApi(21)
Expand All @@ -101,7 +102,7 @@ private void initQQ(final LoadPackageParam lpparam) {
return;
}
L.d("loaded: [" + lpparam.packageName + "]" + " version:" + BuildConfig.VERSION_NAME);
XposedHelpers.findAndHookMethod(Application.class, "onCreate", new XC_MethodHook() {
XposedHelpers.findAndHookMethod(Instrumentation.class, "callApplicationOnCreate",Application.class, new XC_MethodHook() {
private boolean mCalled = false;
@TargetApi(21)
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
Expand Down

0 comments on commit 3d550ae

Please sign in to comment.