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

Commit

Permalink
Do not hook if LBE installed
Browse files Browse the repository at this point in the history
Closes #1231
  • Loading branch information
M66B committed Feb 8, 2014
1 parent ea0a470 commit eaeb8e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/biz/bokhorst/xprivacy/PrivacyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,6 @@ public static boolean getRestrictionExtra(final XHook hook, int uid, String rest
} else if (getHook(restrictionName, methodName) == null)
Util.log(hook, Log.WARN, "Unknown method=" + methodName);

if (!isApplication(uid) && Util.hasLBE())
return false;

// Check cache
boolean cached = false;
CRestriction key = new CRestriction(uid, restrictionName, methodName);
Expand Down Expand Up @@ -466,9 +463,6 @@ public static String getSetting(int uid, String name, String defaultValue, boole
long start = System.currentTimeMillis();
String value = null;

if (!isApplication(uid) && Util.hasLBE())
return defaultValue;

// Check cache
boolean cached = false;
boolean willExpire = false;
Expand Down
2 changes: 1 addition & 1 deletion src/biz/bokhorst/xprivacy/Requirements.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import android.util.Log;

public class Requirements {
private static String[] cIncompatible = new String[] {};
private static String[] cIncompatible = new String[] { "com.lbe.security" };

@SuppressWarnings("unchecked")
public static void check(final Context context) {
Expand Down
8 changes: 8 additions & 0 deletions src/biz/bokhorst/xprivacy/XPrivacy.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public class XPrivacy implements IXposedHookLoadPackage, IXposedHookZygoteInit {

@SuppressLint("InlinedApi")
public void initZygote(StartupParam startupParam) throws Throwable {
// Check for LBE security master
if (Util.hasLBE())
return;

Util.log(null, Log.INFO, String.format("Load %s", startupParam.modulePath));

// Generate secret
Expand Down Expand Up @@ -149,6 +153,10 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
}

public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
// Check for LBE security master
if (Util.hasLBE())
return;

// Log load
Util.log(null, Log.INFO, String.format("Load package=%s uid=%d", lpparam.packageName, Process.myUid()));

Expand Down

0 comments on commit eaeb8e2

Please sign in to comment.