Multiple ZIP entries with the same name: AndroidManifest.xml///.xml
Describe the bug Apksigner.jar can't sign the apk protected by apkeditor.
To Reproduce Steps to reproduce the behavior:
- Used version v1.4.2
- Operating system Windows 11
Log/Stacktrace
[01:19] Exception in thread "main" com.android.apksig.apk.ApkFormatException: Multiple ZIP entries with the same name: AndroidManifest.xml///.xml
[01:19] at com.android.apksig.ApkSigner.parseZipCentralDirectory(ApkSigner.java:939)
[01:19] at com.android.apksig.ApkSigner.sign(ApkSigner.java:282)
[01:19] at com.android.apksig.ApkSigner.sign(ApkSigner.java:237)
[01:19] at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:425)
[01:19] at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:94)
Used apk file https://apkcombo.app/duel-links/jp.konami.duellinks/download/apk
Additional context I used apktool to decompile/compile apk, protect apk using apkeditor and sign using apksigner from Android SDK. I know apkeditor support recompiling but I want to keep using apktool to maintain compatibility with my scripts
The apk might already contain obfuscated file names (I will check in detail latter), you can correct first run with refactor command
java -jar APKEditor.jar refactor -i file.apk
Did that, also getting same issue. Apktool also does refactoring if apk is obfuscated Not only this apk, it happens with any apk even simple app AIDA64, CPU-Z...
Exception in thread "main" com.android.apksig.apk.ApkFormatException: Multiple ZIP entries with the same name: classes.dex/ .xml
It works fine if protected with Apkeditor 1.3.9