-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
139 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
app/src/main/java/de/robv/android/xposed/installer/XposedApp.java
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
app/src/main/java/de/robv/android/xposed/installer/util/InstallZipUtil.java
This file was deleted.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
app/src/main/java/org/meowcat/edxposed/manager/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package org.meowcat.edxposed.manager; | ||
|
||
import android.util.Log; | ||
|
||
import org.meowcat.annotation.NotProguard; | ||
|
||
import java.io.File; | ||
import java.io.FileInputStream; | ||
import java.io.IOException; | ||
|
||
import static org.meowcat.edxposed.manager.MeowCatApplication.TAG; | ||
|
||
@NotProguard | ||
public class Constants { | ||
|
||
public static int getActiveXposedVersion() { | ||
Log.d(TAG, "Not Active"); | ||
return -1; | ||
} | ||
|
||
public static String getInstalledXposedVersion() { | ||
return null; | ||
} | ||
|
||
public static String getBaseDir() { | ||
return XposedApp.getInstance().getApplicationInfo().deviceProtectedDataDir + "/"; | ||
} | ||
|
||
public static String getEnabledModulesListFile() { | ||
return getBaseDir() + "conf/enabled_modules.list"; | ||
} | ||
|
||
public static String getModulesListFile() { | ||
return getBaseDir() + "conf/modules.list"; | ||
} | ||
|
||
public static boolean isSELinuxEnforced() { | ||
boolean result = false; | ||
final File SELINUX_STATUS_FILE = new File("/sys/fs/selinux/enforce"); | ||
if (SELINUX_STATUS_FILE.exists()) { | ||
try { | ||
FileInputStream fis = new FileInputStream(SELINUX_STATUS_FILE); | ||
int status = fis.read(); | ||
switch (status) { | ||
case 49: | ||
result = true; | ||
break; | ||
case 48: | ||
result = false; | ||
break; | ||
default: | ||
Log.e(TAG, "Unexpected byte " + status + " in /sys/fs/selinux/enforce"); | ||
} | ||
fis.close(); | ||
} catch (IOException e) { | ||
if (e.getMessage().contains("Permission denied")) { | ||
result = true; | ||
} else { | ||
Log.e(TAG, "Failed to read SELinux status: " + e.getMessage()); | ||
result = false; | ||
} | ||
} | ||
} | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.