Commit b4d94888 authored by topjohnwu's avatar topjohnwu

Fix unzip issues

parent 4d8d7937
...@@ -91,11 +91,11 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> { ...@@ -91,11 +91,11 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
if (in == null) throw new FileNotFoundException(); if (in == null) throw new FileNotFoundException();
BufferedInputStream buf = new BufferedInputStream(in); BufferedInputStream buf = new BufferedInputStream(in);
buf.mark(Integer.MAX_VALUE); buf.mark(Integer.MAX_VALUE);
ZipUtils.unzip(buf, install, arch, true); ZipUtils.unzip(buf, install, arch + "/", true);
buf.reset(); buf.reset();
ZipUtils.unzip(buf, install, "common", true); ZipUtils.unzip(buf, install, "common/", true);
buf.reset(); buf.reset();
ZipUtils.unzip(buf, install, "chromeos", false); ZipUtils.unzip(buf, install, "chromeos/", false);
buf.reset(); buf.reset();
ZipUtils.unzip(buf, install, "META-INF/com/google/android/update-binary", true); ZipUtils.unzip(buf, install, "META-INF/com/google/android/update-binary", true);
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
......
...@@ -139,7 +139,7 @@ public class ZipUtils { ...@@ -139,7 +139,7 @@ public class ZipUtils {
continue; continue;
} }
// Don't include placeholder // Don't include placeholder
if (path.contains("system/placeholder")) { if (path.equals("system/placeholder")) {
continue; continue;
} }
dest.putNextEntry(new JarEntry(path)); dest.putNextEntry(new JarEntry(path));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment