Created
August 4, 2015 19:36
-
-
Save caioketo/ee65e35f00aeaa380227 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HookIntent implements IXposedHookLoadPackage { | |
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable { | |
if (!lpparam.packageName.equals("android.app.Activity")) | |
return; | |
findAndHookMethod("android.app.Activity", lpparam.classLoader, "getIntent", new XC_MethodHook() { | |
@Override | |
protected void beforeHookedMethod(MethodHookParam param) throws Throwable { | |
// mIntent is the variable that will return | |
// should use it to get Extra | |
param.thisObject.mIntent | |
// or | |
((Activity)param.thisObject).getIntent(); //prob will cause loops, so need some control variable | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment