iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
20.37k stars 3.6k forks source link

Exception in thread "main" java.lang.IllegalArgumentException: MALFORMED #1721

Closed linyia01 closed 3 years ago

linyia01 commented 6 years ago
I: Using Apktool 2.3.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
Exception in thread "main" java.lang.IllegalArgumentException: MALFORMED
        at java.util.zip.ZipCoder.toString(Unknown Source)
        at java.util.zip.ZipFile.getZipEntry(Unknown Source)
        at java.util.zip.ZipFile.access$900(Unknown Source)
        at java.util.zip.ZipFile$ZipEntryIterator.next(Unknown Source)
        at java.util.zip.ZipFile$ZipEntryIterator.nextElement(Unknown Source)
        at java.util.zip.ZipFile$ZipEntryIterator.nextElement(Unknown Source)
        at brut.androlib.Androlib.copyExistingFiles(Androlib.java:629)
        at brut.androlib.Androlib.buildUnknownFiles(Androlib.java:614)
        at brut.androlib.Androlib.build(Androlib.java:313)
        at brut.androlib.Androlib.build(Androlib.java:270)
        at brut.apktool.Main.cmdBuild(Main.java:227)
        at brut.apktool.Main.main(Main.java:75)
iBotPeaches commented 6 years ago

Must be related to some charsets. Do you have an application by chance at a downloadable location for me to investigate?

eprnadml commented 6 years ago

Hi, I'm having the exact same problem with this. I'll tell you who I am. I am a developer living in Korea. Build apk using 'visual novel maker'. By the way, you have to decompile and repackage to change the logo.

Let's get to the point. I decompiled it with the following command. apktool d -f -s --frame-path C: windows uju.apk --frame-path was used for reasons similar to issue 1705.

Then I repackaged it with the following command. apktool b -f -s -frame-path \ C: \ windows uju -o newuju.apk Then, there was an error that completely matched the text.

I'll attach an apk file and a decompiled file to help. https://drive.google.com/open?id=1nQP1SPzQuy87pEpaOELvUwSHSnjSijHI

cool-firer commented 6 years ago

is this solved? I met the same question

iBotPeaches commented 3 years ago

I don't have an application of the original issue to triage. So closing. Sorry for 2-3 year delay.