diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 517a61a25..7498a9503 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -33,7 +33,6 @@
-
result) {
if (this.method instanceof Method)
return (((Method) this.method).getReturnType().equals(result));
diff --git a/src/biz/bokhorst/xprivacy/XPrivacy.java b/src/biz/bokhorst/xprivacy/XPrivacy.java
index 8622163b2..80553350b 100644
--- a/src/biz/bokhorst/xprivacy/XPrivacy.java
+++ b/src/biz/bokhorst/xprivacy/XPrivacy.java
@@ -27,9 +27,7 @@
import de.robv.android.xposed.XC_MethodHook;
import static de.robv.android.xposed.XposedHelpers.findClass;
-// TODO: fix link error when using Cydia Substrate
public class XPrivacy implements IXposedHookLoadPackage, IXposedHookZygoteInit {
- private static boolean mCydia = false;
private static String mSecret = null;
private static List mListHookError = new ArrayList();
private static List mListDisabled = new ArrayList();
@@ -83,95 +81,6 @@ public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
handleLoadPackage(lpparam.packageName, lpparam.classLoader, mSecret);
}
- // Cydia
- public static void initialize() {
- mCydia = true;
- init(null);
-
- // Self
- MS.hookClassLoad(Util.class.getName(), new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XUtilHook.getInstances(), clazz.getClassLoader(), mSecret);
- }
- });
-
- // TODO: Cydia: Build.SERIAL
-
- // Activity recognition
- MS.hookClassLoad("com.google.android.gms.location.ActivityRecognitionClient", new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XActivityRecognitionClient.getInstances(), clazz.getClassLoader(), mSecret);
- }
- });
-
- // Advertising Id
- MS.hookClassLoad("com.google.android.gms.ads.identifier.AdvertisingIdClient", new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XAdvertisingIdClientInfo.getInstances(), clazz.getClassLoader(), mSecret);
- }
- });
-
- // Google auth
- MS.hookClassLoad("com.google.android.gms.auth.GoogleAuthUtil", new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XGoogleAuthUtil.getInstances(), clazz.getClassLoader(), mSecret);
- }
- });
-
- // GoogleApiClient.Builder
- MS.hookClassLoad("com.google.android.gms.common.api.GoogleApiClient", new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XGoogleApiClient.getInstances(), clazz.getClassLoader(), mSecret);
- }
- });
-
- // Google Map V1
- MS.hookClassLoad("com.google.android.maps.GeoPoint", new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XGoogleMapV1.getInstances(), clazz.getClassLoader(), mSecret);
- }
- });
-
- // Google Map V2
- MS.hookClassLoad("com.google.android.gms.maps.GoogleMap", new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XGoogleMapV2.getInstances(), clazz.getClassLoader(), mSecret);
- }
- });
-
- // Location client
- MS.hookClassLoad("com.google.android.gms.location.LocationClient", new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XLocationClient.getInstances(), clazz.getClassLoader(), mSecret);
- }
- });
-
- // Phone interface manager
- MS.hookClassLoad("com.android.phone.PhoneInterfaceManager", new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XTelephonyManager.getPhoneInstances(), clazz.getClassLoader(), mSecret);
- }
- });
-
- // Providers
- for (final String className : XContentResolver.cProviderClassName)
- MS.hookClassLoad(className, new MS.ClassLoadHook() {
- @Override
- public void classLoaded(Class> clazz) {
- hookAll(XContentResolver.getInstances(className), clazz.getClassLoader(), mSecret);
- }
- });
- }
-
// Common
private static void init(String path) {
Util.log(null, Log.WARN, "Init path=" + path);
@@ -199,21 +108,12 @@ private static void init(String path) {
// frameworks/base/services/java/com/android/server/SystemServer.java
Class> cSystemServer = Class.forName("com.android.server.SystemServer");
Method mMain = cSystemServer.getDeclaredMethod("main", String[].class);
- if (mCydia)
- MS.hookMethod(cSystemServer, mMain, new MS.MethodAlteration