-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMainApplication.java
More file actions
27 lines (22 loc) · 882 Bytes
/
MainApplication.java
File metadata and controls
27 lines (22 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.arc.xposed;
import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import de.robv.android.xposed.XC_MethodReplacement;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
XposedHelpers.findAndHookMethod(Activity.class, "onCreate", Bundle.class, new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam param) throws Throwable {
Toast.makeText(MainApplication.this, "Hooked!", Toast.LENGTH_LONG).show();
return XposedBridge.invokeOriginalMethod(param.method, param.thisObject, param.args);
}
});
}
}