iBotPeaches / Apktool

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

PNG Signature ! #2202

Closed Ac3n34d-X closed 4 years ago

Ac3n34d-X commented 4 years ago

Error: Command failed: java -jar /usr/local/lib/node_modules/apk-mitm/jar/apktool.jar build /tmp/2c68de93fb75c4923037827b0682719f/decode --output /tmp/2c68de93fb75c4923037827b0682719f/unsigned.apk --use-aapt2 W: /tmp/2c68de93fb75c4923037827b0682719f/decode/res/drawable-mdpi/src_assets_img_background.png: error: failed to read PNG signature: file does not start with PNG signature. brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_9729835945442411667.tmp, compile, --dir, /tmp/2c68de93fb75c4923037827b0682719f/decode/res, --legacy, -o, /tmp/2c68de93fb75c4923037827b0682719f/decode/build/resources.zip]

I: Using Apktool 2.4.0 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...

iBotPeaches commented 4 years ago

I don't think Apktool can do anything here. If it was given a bad PNG, it error`d out. I would expect that. What else can we do in that situation? Fill a fake resource? I'd much rather error out.

Closing as non-issue.

ghost commented 1 year ago

@iBotPeaches How about adding option to ignore error? I'm sure it would still work since the original APK works fine. In my case, the format was JFIF

APK file: https://apkcombo.com/anime-fighters/com.mangaol.thaijflr.apken/download/apk

deco9999 commented 4 weeks ago

@iBotPeaches How about adding option to ignore error? I'm sure it would still work since the original APK works fine.

good suggestion, unfortunately this error is still ongoing