From 8fa99e11430535b611f294097a4b2a5a250e0a52 Mon Sep 17 00:00:00 2001 From: "fenghao (P)" Date: Fri, 9 Apr 2021 18:59:37 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:#I3HTK4=20Description:=E8=A7=A3?= =?UTF-8?q?=E5=8C=85=E5=B7=A5=E5=85=B7=E4=BB=8Ehap=E8=A7=A3=E5=8E=8Bapk?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E6=96=B0=E6=89=93=E5=8C=85=E6=97=B6=E5=AF=B9?= =?UTF-8?q?libs=E4=B8=8B=E7=9A=84so=E6=96=87=E4=BB=B6=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=BA=86=E5=8E=8B=E7=BC=A9=EF=BC=8C=E5=AF=BC=E8=87=B4=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=8A=A0=E8=BD=BDso=E5=A4=B1=E8=B4=A5=20Sig:aafwk=20F?= =?UTF-8?q?eature=20or=20Bugfix:=20Bugfix=20Binary=20Source:=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- com/huawei/ohos/Uncompress.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/com/huawei/ohos/Uncompress.java b/com/huawei/ohos/Uncompress.java index 4dfdf495..0d61522f 100755 --- a/com/huawei/ohos/Uncompress.java +++ b/com/huawei/ohos/Uncompress.java @@ -60,9 +60,10 @@ public class Uncompress { private static final int BUFFER_SIZE = 10 * 1024; private static final long FILE_TIME = 1546272000000L; private static final long TOO_BIG_SIZE = 0x6400000; - private static final long TOO_MANY_SIZE = 1024; + private static final long TOO_MANY_SIZE = 32768; private static final String LIBS_DIR_NAME = "libs"; private static final String CUT_ENTRY_FILENAME = "cut_entry.apk"; + private static final String SO_SUFFIX = ".so"; private static final Log LOG = new Log(Uncompress.class.toString()); /** @@ -1042,7 +1043,11 @@ public class Uncompress { try { String entryName = (baseDir + srcFile.getName()).replace(File.separator, LINUX_FILE_SEPARATOR); ZipEntry zipEntry = new ZipEntry(entryName); - if (isCompression) { + boolean isNeedCompress = isCompression; + if (srcFile.isFile() && srcFile.getName().toLowerCase(Locale.ENGLISH).endsWith(SO_SUFFIX)) { + isNeedCompress = false; + } + if (isNeedCompress) { zipEntry.setMethod(ZipEntry.DEFLATED); } else { zipEntry.setMethod(ZipEntry.STORED); -- Gitee