mirror of
https://github.com/revanced/Apktool.git
synced 2024-09-05 05:55:29 +02:00
Merge pull request #1390 from iBotPeaches/issue/1389
Patch aapt for 32/64 unix/mac and add support for unknown chars.
This commit is contained in:
commit
4d5a822e4f
@ -773,9 +773,17 @@ final public class AndrolibResources {
|
||||
|
||||
try {
|
||||
if (OSDetection.isMacOSX()) {
|
||||
aaptBinary = Jar.getResourceAsFile("/prebuilt/aapt/macosx/aapt");
|
||||
if (OSDetection.is64Bit()) {
|
||||
aaptBinary = Jar.getResourceAsFile("/prebuilt/aapt/macosx/64/aapt");
|
||||
} else {
|
||||
aaptBinary = Jar.getResourceAsFile("/prebuilt/aapt/macosx/32/aapt");
|
||||
}
|
||||
} else if (OSDetection.isUnix()) {
|
||||
aaptBinary = Jar.getResourceAsFile("/prebuilt/aapt/linux/aapt");
|
||||
if (OSDetection.is64Bit()) {
|
||||
aaptBinary = Jar.getResourceAsFile("/prebuilt/aapt/linux/64/aapt");
|
||||
} else {
|
||||
aaptBinary = Jar.getResourceAsFile("/prebuilt/aapt/linux/32/aapt");
|
||||
}
|
||||
} else if (OSDetection.isWindows()) {
|
||||
aaptBinary = Jar.getResourceAsFile("/prebuilt/aapt/windows/aapt.exe");
|
||||
} else {
|
||||
|
BIN
brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/linux/32/aapt
Executable file
BIN
brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/linux/32/aapt
Executable file
Binary file not shown.
BIN
brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/linux/64/aapt
Executable file
BIN
brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/linux/64/aapt
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/macosx/64/aapt
Executable file
BIN
brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/macosx/64/aapt
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -18,17 +18,22 @@ package brut.util;
|
||||
|
||||
public class OSDetection {
|
||||
private static String OS = System.getProperty("os.name").toLowerCase();
|
||||
private static String Bit = System.getProperty("sun.arch.data.model").toLowerCase();
|
||||
|
||||
public static boolean isWindows() {
|
||||
return (OS.indexOf("win") >= 0);
|
||||
return (OS.contains("win"));
|
||||
}
|
||||
|
||||
public static boolean isMacOSX() {
|
||||
return (OS.indexOf("mac") >= 0);
|
||||
return (OS.contains("mac"));
|
||||
}
|
||||
|
||||
public static boolean isUnix() {
|
||||
return (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 || (OS.indexOf("sunos") >= 0));
|
||||
return (OS.contains("nix") || OS.contains("nux") || OS.contains("aix") || (OS.contains("sunos")));
|
||||
}
|
||||
|
||||
public static boolean is64Bit() {
|
||||
return Bit.equalsIgnoreCase("64");
|
||||
}
|
||||
|
||||
public static String returnOS() {
|
||||
|
Loading…
Reference in New Issue
Block a user