mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-09 10:14:25 +02:00
only check for layoutDir if over sdk 17
This commit is contained in:
parent
14e12b016f
commit
b4db7735a5
@ -190,23 +190,6 @@ final public class AndrolibResources {
|
|||||||
mMaxSdkVersion = map.get("maxSdkVersion");
|
mMaxSdkVersion = map.get("maxSdkVersion");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void prepPath() throws AndrolibException {
|
|
||||||
List<String> cmd = new ArrayList<String>();
|
|
||||||
|
|
||||||
// check for win vs linux
|
|
||||||
if (System.getProperty("os.name").indexOf("win") >= 0) {
|
|
||||||
cmd.add("set PATH=%PATH%;" + System.getProperty("user.dir"));
|
|
||||||
} else {
|
|
||||||
cmd.add("export PATH=$PATH:" + System.getProperty("user.dir"));
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
OS.exec(cmd.toArray(new String[0]));
|
|
||||||
} catch (BrutException ex) {
|
|
||||||
throw new AndrolibException(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void aaptPackage(File apkFile, File manifest, File resDir,
|
public void aaptPackage(File apkFile, File manifest, File resDir,
|
||||||
File rawDir, File assetDir, File[] include, HashMap<String, Boolean> flags)
|
File rawDir, File assetDir, File[] include, HashMap<String, Boolean> flags)
|
||||||
@ -493,8 +476,6 @@ final public class AndrolibResources {
|
|||||||
entry.setCrc(crc.getValue());
|
entry.setCrc(crc.getValue());
|
||||||
out.putNextEntry(entry);
|
out.putNextEntry(entry);
|
||||||
out.write(data);
|
out.write(data);
|
||||||
zip.close();
|
|
||||||
|
|
||||||
LOGGER.info("Framework installed to: " + outFile);
|
LOGGER.info("Framework installed to: " + outFile);
|
||||||
} catch (ZipException ex) {
|
} catch (ZipException ex) {
|
||||||
throw new AndrolibException(ex);
|
throw new AndrolibException(ex);
|
||||||
|
@ -274,7 +274,7 @@ public class ARSCDecoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
short layoutDirection = 0;
|
short layoutDirection = 0;
|
||||||
if (size >= 38 && !this.mPkg.getName().equalsIgnoreCase("com.htc")) {
|
if (size >= 38 && sdkVersion >= 17 && !this.mPkg.getName().equalsIgnoreCase("com.htc")) {
|
||||||
layoutDirection = mIn.readShort();
|
layoutDirection = mIn.readShort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user