Skip to content

Instantly share code, notes, and snippets.

@caioketo
Created August 4, 2015 19:36
Show Gist options
  • Save caioketo/ee65e35f00aeaa380227 to your computer and use it in GitHub Desktop.
Save caioketo/ee65e35f00aeaa380227 to your computer and use it in GitHub Desktop.
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