mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-01 06:34:25 +02:00
fix: remove hardcoded list of no-compressed assets
- We no longer use aapt for building assets, so this code is never ran in aapt1/2. So we can no longer skip these assets.
This commit is contained in:
parent
d984948412
commit
061ddb8ee6
@ -168,8 +168,7 @@ public class Androlib {
|
|||||||
String ext;
|
String ext;
|
||||||
|
|
||||||
for (String file : files) {
|
for (String file : files) {
|
||||||
if (isAPKFileNames(file) && !NO_COMPRESS_PATTERN.matcher(file).find()) {
|
if (isAPKFileNames(file) && unk.getCompressionLevel(file) == 0) {
|
||||||
if (unk.getCompressionLevel(file) == 0) {
|
|
||||||
|
|
||||||
if (StringUtils.countMatches(file, ".") > 1) {
|
if (StringUtils.countMatches(file, ".") > 1) {
|
||||||
ext = file;
|
ext = file;
|
||||||
@ -180,12 +179,11 @@ public class Androlib {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! uncompressedFilesOrExts.contains(ext)) {
|
if (!uncompressedFilesOrExts.contains(ext)) {
|
||||||
uncompressedFilesOrExts.add(ext);
|
uncompressedFilesOrExts.add(ext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (DirectoryException ex) {
|
} catch (DirectoryException ex) {
|
||||||
throw new AndrolibException(ex);
|
throw new AndrolibException(ex);
|
||||||
}
|
}
|
||||||
@ -789,9 +787,4 @@ public class Androlib {
|
|||||||
private final static String[] APK_STANDARD_ALL_FILENAMES = new String[] {
|
private final static String[] APK_STANDARD_ALL_FILENAMES = new String[] {
|
||||||
"classes.dex", "AndroidManifest.xml", "resources.arsc", "res", "r", "R",
|
"classes.dex", "AndroidManifest.xml", "resources.arsc", "res", "r", "R",
|
||||||
"lib", "libs", "assets", "META-INF", "kotlin" };
|
"lib", "libs", "assets", "META-INF", "kotlin" };
|
||||||
// Taken from AOSP's frameworks/base/tools/aapt/Package.cpp
|
|
||||||
private final static Pattern NO_COMPRESS_PATTERN = Pattern.compile("\\.(" +
|
|
||||||
"jpg|jpeg|png|gif|wav|mp2|mp3|ogg|aac|mpg|mpeg|mid|midi|smf|jet|rtttl|imy|xmf|mp4|" +
|
|
||||||
"m4a|m4v|3gp|3gpp|3g2|3gpp2|amr|awb|wma|wmv|webm|mkv)$");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user