From fc571b2c619b2f11ff0cae42afdffd8cae05b729 Mon Sep 17 00:00:00 2001 From: swift_gan Date: Wed, 10 Apr 2019 22:49:54 +0800 Subject: [PATCH] fix XSharePreference --- build.gradle | 2 +- .../com/android/internal/util/XmlUtils.java | 4 +-- .../de/robv/android/xposed/SELinuxHelper.java | 29 ++----------------- 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/build.gradle b/build.gradle index 58b93bd9..40397595 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ ext { userOrg = 'ganyao114' groupId = 'com.swift.sandhook' repoName = 'SandHook' - publishVersion = '3.2.0' + publishVersion = '3.4.6' desc = 'android art hook' website = 'https://github.com/ganyao114/SandHook' licences = ['Apache-2.0'] diff --git a/xposedcompat/src/main/java/com/android/internal/util/XmlUtils.java b/xposedcompat/src/main/java/com/android/internal/util/XmlUtils.java index 1738fb80..0ae44689 100644 --- a/xposedcompat/src/main/java/com/android/internal/util/XmlUtils.java +++ b/xposedcompat/src/main/java/com/android/internal/util/XmlUtils.java @@ -3,11 +3,11 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.InputStream; -import java.util.Map; +import java.util.HashMap; public class XmlUtils { - public static Map readMapXml(InputStream inputStream) throws XmlPullParserException { + public static final HashMap readMapXml(InputStream in) throws XmlPullParserException, java.io.IOException { return null; } diff --git a/xposedcompat/src/main/java/de/robv/android/xposed/SELinuxHelper.java b/xposedcompat/src/main/java/de/robv/android/xposed/SELinuxHelper.java index db1236bf..ff784386 100644 --- a/xposedcompat/src/main/java/de/robv/android/xposed/SELinuxHelper.java +++ b/xposedcompat/src/main/java/de/robv/android/xposed/SELinuxHelper.java @@ -1,7 +1,5 @@ package de.robv.android.xposed; -import com.swift.sandhook.xposedcompat.XposedCompat; - import de.robv.android.xposed.services.BaseService; import de.robv.android.xposed.services.DirectAccessService; @@ -10,10 +8,6 @@ */ public final class SELinuxHelper { - static { - initForProcess(XposedCompat.processName); - } - private SELinuxHelper() {} /** @@ -54,31 +48,12 @@ public static String getContext() { public static BaseService getAppDataFileService() { if (sServiceAppDataFile != null) return sServiceAppDataFile; - throw new UnsupportedOperationException(); + return new DirectAccessService(); } // ---------------------------------------------------------------------------- private static boolean sIsSELinuxEnabled = false; - private static BaseService sServiceAppDataFile = null; + private static BaseService sServiceAppDataFile = new DirectAccessService(); - /*package*/ static void initOnce() { - try { - //sIsSELinuxEnabled = SELinux.isSELinuxEnabled(); - } catch (NoClassDefFoundError ignored) {} - } - - /*package*/ static void initForProcess(String packageName) { - if (sIsSELinuxEnabled) { - if (packageName == null) { // Zygote - //sServiceAppDataFile = new ZygoteService(); - } else if (packageName.equals("android")) { //system_server - //sServiceAppDataFile = BinderService.getService(BinderService.TARGET_APP); - } else { // app - sServiceAppDataFile = new DirectAccessService(); - } - } else { - sServiceAppDataFile = new DirectAccessService(); - } - } }