mirror of
https://github.com/revanced/Apktool.git
synced 2025-02-08 01:56:50 +01:00
Patch newest AndroResGuard format
This commit is contained in:
parent
e1dd436854
commit
6e509695eb
@ -718,7 +718,8 @@ public class Androlib {
|
|||||||
private final static String[] APK_MANIFEST_FILENAMES = new String[] {
|
private final static String[] APK_MANIFEST_FILENAMES = new String[] {
|
||||||
"AndroidManifest.xml" };
|
"AndroidManifest.xml" };
|
||||||
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", "lib", "libs", "assets", "META-INF" };
|
"classes.dex", "AndroidManifest.xml", "resources.arsc", "res", "r", "R",
|
||||||
|
"lib", "libs", "assets", "META-INF" };
|
||||||
// Taken from AOSP's frameworks/base/tools/aapt/Package.cpp
|
// Taken from AOSP's frameworks/base/tools/aapt/Package.cpp
|
||||||
private final static Pattern NO_COMPRESS_PATTERN = Pattern.compile("\\.(" +
|
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|" +
|
"jpg|jpeg|png|gif|wav|mp2|mp3|ogg|aac|mpg|mpeg|mid|midi|smf|jet|rtttl|imy|xmf|mp4|" +
|
||||||
|
@ -246,6 +246,9 @@ final public class AndrolibResources {
|
|||||||
if (in == null && inApk.containsDir("r")) {
|
if (in == null && inApk.containsDir("r")) {
|
||||||
in = inApk.getDir("r");
|
in = inApk.getDir("r");
|
||||||
}
|
}
|
||||||
|
if (in == null && inApk.containsDir("R")) {
|
||||||
|
in = inApk.getDir("R");
|
||||||
|
}
|
||||||
} catch (DirectoryException ex) {
|
} catch (DirectoryException ex) {
|
||||||
throw new AndrolibException(ex);
|
throw new AndrolibException(ex);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ public class ResFileValue extends ResIntBasedValue {
|
|||||||
if (mPath.startsWith("res/")) {
|
if (mPath.startsWith("res/")) {
|
||||||
return mPath.substring(4);
|
return mPath.substring(4);
|
||||||
}
|
}
|
||||||
if (mPath.startsWith("r/")) {
|
if (mPath.startsWith("r/") || mPath.startsWith("R/")) {
|
||||||
return mPath.substring(2);
|
return mPath.substring(2);
|
||||||
}
|
}
|
||||||
throw new AndrolibException("File path does not start with \"res/\" or \"r/\": " + mPath);
|
throw new AndrolibException("File path does not start with \"res/\" or \"r/\": " + mPath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user