Skip to content

Commit

Permalink
Move XposedBridge.jar to /system/framework
Browse files Browse the repository at this point in the history
With enforced SELinux, Zygote usually cannot read/execute files in /data/data.
By locating XposedBridge.jar next to the system code, we can be pretty
sure that access is always possible.

This might also help to avoid issues where the system partition is wiped,
but /data still holds an older version of XposedBridge.jar.
  • Loading branch information
rovo89 committed Feb 13, 2015
1 parent 6c13c91 commit 31638a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/de/robv/android/xposed/XposedBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected static void main(String[] args) {
private static native int getRuntime();

private static void determineXposedVersion() throws IOException {
ZipInputStream is = new ZipInputStream(new FileInputStream(BASE_DIR + "bin/XposedBridge.jar"));
ZipInputStream is = new ZipInputStream(new FileInputStream("/system/framework/XposedBridge.jar"));
ZipEntry entry;
try {
while ((entry = is.getNextEntry()) != null) {
Expand All @@ -166,7 +166,7 @@ private static void determineXposedVersion() throws IOException {
throw new RuntimeException("could not parse XposedBridge version from \"" + version + "\"");
return;
}
throw new RuntimeException("could not find assets/VERSION in " + BASE_DIR + "bin/XposedBridge.jar");
throw new RuntimeException("could not find assets/VERSION in /system/framework/XposedBridge.jar");
} finally {
try {
is.close();
Expand Down

0 comments on commit 31638a2

Please sign in to comment.