Merge branch 'upstream'

This commit is contained in:
oSumAtrIX 2023-08-27 21:30:14 +02:00
commit 43edf043ed
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
5 changed files with 10 additions and 4 deletions

View File

@ -88,6 +88,8 @@ jobs:
- build-and-test-with-Java-8-and-later
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
@ -100,4 +102,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: apktool.jar
path: brut.apktool/apktool-cli/build/libs/apktool-*-SNAPSHOT.jar
path: brut.apktool/apktool-cli/build/libs/apktool-v*

View File

@ -69,6 +69,6 @@ tasks.register<ProGuardTask>("proguard") {
dontwarn("javax.xml.xpath.**")
dontnote("**")
val outPath = "build/libs/apktool-cli-$apktoolVersion.jar"
val outPath = "build/libs/apktool-$apktoolVersion.jar"
outjars(outPath)
}

View File

@ -77,7 +77,7 @@ public class Framework {
crc.update(data);
entry = new ZipEntry("resources.arsc");
entry.setSize(data.length);
entry.setMethod(ZipOutputStream.STORED);
entry.setMethod(ZipEntry.STORED);
entry.setCrc(crc.getValue());
out.putNextEntry(entry);
out.write(data);

View File

@ -270,7 +270,9 @@ public class ARSCDecoder {
mHeader.checkForUnreadHeader(mIn);
if ((typeFlags & 0x01) != 0) {
// Be sure we don't poison mResTable by marking the application as sparse
// Only flag the ResTable as sparse if the main package is not loaded.
if ((typeFlags & 0x01) != 0 && !mResTable.isMainPkgLoaded()) {
mResTable.setSparseResources(true);
}

View File

@ -54,6 +54,7 @@ public class SparseFlagTest extends BaseTest {
LOGGER.info("Decoding sparse.apk...");
Config config = Config.getDefaultConfig();
config.frameworkTag = "issue-3298";
ApkDecoder apkDecoder = new ApkDecoder(config, testApk);
ApkInfo apkInfo = apkDecoder.decode(sTestNewDir);
@ -70,6 +71,7 @@ public class SparseFlagTest extends BaseTest {
LOGGER.info("Decoding not-sparse.apk...");
Config config = Config.getDefaultConfig();
config.frameworkTag = "issue-3298";
ApkDecoder apkDecoder = new ApkDecoder(config, testApk);
ApkInfo apkInfo = apkDecoder.decode(sTestNewDir);