From b4d948886c3f25db0629ce8217e2e85235dd3f13 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 3 Sep 2017 21:05:57 +0800 Subject: [PATCH] Fix unzip issues --- .../java/com/topjohnwu/magisk/asyncs/InstallMagisk.java | 6 +++--- app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java b/app/src/main/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java index 994620274..fa8aea0f3 100644 --- a/app/src/main/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java +++ b/app/src/main/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java @@ -91,11 +91,11 @@ public class InstallMagisk extends ParallelTask { if (in == null) throw new FileNotFoundException(); BufferedInputStream buf = new BufferedInputStream(in); buf.mark(Integer.MAX_VALUE); - ZipUtils.unzip(buf, install, arch, true); + ZipUtils.unzip(buf, install, arch + "/", true); buf.reset(); - ZipUtils.unzip(buf, install, "common", true); + ZipUtils.unzip(buf, install, "common/", true); buf.reset(); - ZipUtils.unzip(buf, install, "chromeos", false); + ZipUtils.unzip(buf, install, "chromeos/", false); buf.reset(); ZipUtils.unzip(buf, install, "META-INF/com/google/android/update-binary", true); } catch (FileNotFoundException e) { diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java b/app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java index b9e2b3ea7..8a3380904 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java @@ -139,7 +139,7 @@ public class ZipUtils { continue; } // Don't include placeholder - if (path.contains("system/placeholder")) { + if (path.equals("system/placeholder")) { continue; } dest.putNextEntry(new JarEntry(path));