APKEditor icon indicating copy to clipboard operation
APKEditor copied to clipboard

Multiple ZIP entries with the same name: AndroidManifest.xml///.xml

Open AndroidMaster25 opened this issue 10 months ago • 2 comments

Describe the bug Apksigner.jar can't sign the apk protected by apkeditor.

To Reproduce Steps to reproduce the behavior:

  1. Used version v1.4.2
  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

AndroidMaster25 avatar Feb 26 '25 19:02 AndroidMaster25

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

REAndroid avatar Feb 27 '25 13:02 REAndroid

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

AndroidMaster25 avatar Feb 28 '25 19:02 AndroidMaster25