Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Hook SystemServer.main for pre Lollipop
Browse files Browse the repository at this point in the history
Refs #2209
  • Loading branch information
M66B committed May 27, 2015
1 parent a8b21c5 commit 78e2e80
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/biz/bokhorst/xprivacy/XPrivacy.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
});

} else {
Class<?> am = Class.forName("com.android.server.am.ActivityManagerService");
XposedBridge.hookAllMethods(am, "startRunning", new XC_MethodHook() {
Class<?> cSystemServer = Class.forName("com.android.server.SystemServer");
Method mMain = cSystemServer.getDeclaredMethod("main", String[].class);
XposedBridge.hookMethod(mMain, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
PrivacyService.register(mListHookError, null, mSecret, param.thisObject);
}
});
Expand Down

0 comments on commit 78e2e80

Please sign in to comment.