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

Commit

Permalink
Disable rehooking on lib load
Browse files Browse the repository at this point in the history
It doesn't solve the problems

Refs #1366
  • Loading branch information
M66B committed Feb 19, 2014
1 parent bbf3e23 commit 4af827b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/biz/bokhorst/xprivacy/XPrivacy.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
Util.bug(null, ex);
}

hookCheckNative();
// hookCheckNative();

// App widget manager
hookAll(XAppWidgetManager.getInstances(), mSecret);
Expand Down Expand Up @@ -370,11 +370,12 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
if (method.getName().equals(hook.getMethodName())
&& (Modifier.isPublic(method.getModifiers()) ? hook.isVisible() : !hook.isVisible())) {
// After hooking the method becomes native
boolean isNative = Modifier.isNative(method.getModifiers());
// boolean isNative =
// Modifier.isNative(method.getModifiers());
XC_MethodHook.Unhook unhook = XposedBridge.hookMethod(method, methodHook);
hookSet.add(unhook);
if (isNative)
registerNativeMethod(hook, method, unhook);
// if (isNative)
// registerNativeMethod(hook, method, unhook);
}
clazz = (hookSet.isEmpty() ? clazz.getSuperclass() : null);
}
Expand All @@ -400,6 +401,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {

private static List<XC_MethodHook.Unhook> mUnhookNativeMethod = new ArrayList<XC_MethodHook.Unhook>();

@SuppressWarnings("unused")
private static void registerNativeMethod(final XHook hook, Method method, XC_MethodHook.Unhook unhook) {
if (Process.myUid() > 0) {
synchronized (mUnhookNativeMethod) {
Expand All @@ -409,6 +411,7 @@ private static void registerNativeMethod(final XHook hook, Method method, XC_Met
}
}

@SuppressWarnings("unused")
private static void hookCheckNative() {
try {
XC_MethodHook hook = new XC_MethodHook() {
Expand Down

0 comments on commit 4af827b

Please sign in to comment.