diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/AaptInvoker.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/AaptInvoker.java index 4bd891d987..db9afc783e 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/AaptInvoker.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/AaptInvoker.java @@ -178,6 +178,9 @@ private void invokeAapt2(File apkFile, File manifest, File resDir, File rawDir, cmd.add("--no-compile-sdk-metadata"); + // #3427 - Ignore stricter parsing during aapt2 + cmd.add("--warn-manifest-validation"); + if (mApkInfo.sparseResources) { cmd.add("--enable-sparse-encoding"); } diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/AndroidManifest.xml b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/AndroidManifest.xml index ea5477ef5e..444556f33d 100644 --- a/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/AndroidManifest.xml +++ b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/AndroidManifest.xml @@ -6,6 +6,7 @@ android:name="android.accessibilityservice" android:resource="@xml/accessibility_service_config" /> +