You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to decompile an apk, but resources parsing fails.
You'll be able to find the stacktrace below, but I tried to dig into the failing point in apktool, dicovering:
In the when decoding a file, a good decoded attribute comes like this:
In the case of the affected attributes, they do not come with the name, rather with an id that I suppose is linked to nowhere:
The two attributes shown above are referring to the lines 13 and 14 of this layout (and we can see that JADx also didn't managed to bring the id of this resource):
From my (small) understanding of the flow, the indexes of the tables that brings the attribute values are correct, but the xml parser that deodes the original file may be missing the actual value?
Information
Apktool Version (apktool -version) - 2.9.3
Operating System (Mac, Linux, Windows) - macOS 14.7
APK From? (Playstore, ROM, Other) - Other
Java Version (java --version) - 17.0.9
Stacktrace/Logcat
I: Using Apktool 2.9.3
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: decoded_app/res/animator/2130837504.xml:4: error: not well-formed (invalid token).
W: decoded_app/res/animator/2130837504.xml: error: file failed to compile.
W: decoded_app/res/animator/2130837527.xml:4: error: not well-formed (invalid token).
W: decoded_app/res/animator/2130837527.xml: error: file failed to compile.
W: decoded_app/res/color/2131100411.xml:5: error: not well-formed (invalid token).
W: decoded_app/res/color/2131100411.xml: error: file failed to compile.
W: decoded_app/res/color/2131100412.xml:5: error: not well-formed (invalid token).
W: decoded_app/res/color/2131100412.xml: error: file failed to compile.
W:decoded_app/res/drawable/2131231146.xml:5: error: not well-formed (invalid token).
W: decoded_app/res/drawable/2131231146.xml: error: file failed to compile.
W: decoded_app/res/drawable/2131231148.xml:5: error: not well-formed (invalid token).
W: decoded_app/res/drawable/2131231148.xml: error: file failed to compile.
W: decoded_app/res/font/2131296256.xml:2: error: not well-formed (invalid token).
W: decoded_app/res/font/2131296256.xml: error: file failed to compile.
W: decoded_app/res/font/2131296257.xml:2: error: not well-formed (invalid token).
W: decoded_app/res/font/2131296257.xml: error: file failed to compile.
W: decoded_app/res/font/2131296258.xml:2: error: not well-formed (invalid token).
W: decoded_app/res/font/2131296258.xml: error: file failed to compile.
W: decoded_app/res/font/2131296259.xml:2: error: not well-formed (invalid token).
W: decoded_app/res/font/2131296259.xml: error: file failed to compile.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/38/pd7j36w954b83s1_8zmfrn6m0000gn/T/brut_util_Jar_23304051720274397738368976131288687923.tmp, compile, --dir, decoded_app/res, --legacy, -o, decoded_app/build/resources.zip]
Steps to Reproduce
java -jar apktool.jar d -o tmp/ -f "app.apk"
java -jar apktool.jar java -jar b tmp/ -o "repacked_app.apk"
APK
If this APK can be freely shared, please upload/attach a link to it.
Sent apkpure url by mail
Questions to ask before submission
Have you tried apktool d, apktool b without changing anything?
Yes, decompiling resources fails on build time, with --no-res works well, but for what I need to do is mandatory to decompile it.
If you are trying to install a modified apk, did you resign it?
Yes
Are you using the latest apktool version?
Yes
The text was updated successfully, but these errors were encountered:
Hello,
I have been trying to decompile an apk, but resources parsing fails.
You'll be able to find the stacktrace below, but I tried to dig into the failing point in apktool, dicovering:
In the when decoding a file, a good decoded attribute comes like this:
In the case of the affected attributes, they do not come with the name, rather with an id that I suppose is linked to nowhere:
The two attributes shown above are referring to the lines 13 and 14 of this layout (and we can see that JADx also didn't managed to bring the id of this resource):
From my (small) understanding of the flow, the indexes of the tables that brings the attribute values are correct, but the xml parser that deodes the original file may be missing the actual value?
Information
Apktool Version (apktool -version) - 2.9.3
Operating System (Mac, Linux, Windows) - macOS 14.7
APK From? (Playstore, ROM, Other) - Other
Java Version (java --version) - 17.0.9
Stacktrace/Logcat
I: Using Apktool 2.9.3
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: decoded_app/res/animator/2130837504.xml:4: error: not well-formed (invalid token).
W: decoded_app/res/animator/2130837504.xml: error: file failed to compile.
W: decoded_app/res/animator/2130837527.xml:4: error: not well-formed (invalid token).
W: decoded_app/res/animator/2130837527.xml: error: file failed to compile.
W: decoded_app/res/color/2131100411.xml:5: error: not well-formed (invalid token).
W: decoded_app/res/color/2131100411.xml: error: file failed to compile.
W: decoded_app/res/color/2131100412.xml:5: error: not well-formed (invalid token).
W: decoded_app/res/color/2131100412.xml: error: file failed to compile.
W:decoded_app/res/drawable/2131231146.xml:5: error: not well-formed (invalid token).
W: decoded_app/res/drawable/2131231146.xml: error: file failed to compile.
W: decoded_app/res/drawable/2131231148.xml:5: error: not well-formed (invalid token).
W: decoded_app/res/drawable/2131231148.xml: error: file failed to compile.
W: decoded_app/res/font/2131296256.xml:2: error: not well-formed (invalid token).
W: decoded_app/res/font/2131296256.xml: error: file failed to compile.
W: decoded_app/res/font/2131296257.xml:2: error: not well-formed (invalid token).
W: decoded_app/res/font/2131296257.xml: error: file failed to compile.
W: decoded_app/res/font/2131296258.xml:2: error: not well-formed (invalid token).
W: decoded_app/res/font/2131296258.xml: error: file failed to compile.
W: decoded_app/res/font/2131296259.xml:2: error: not well-formed (invalid token).
W: decoded_app/res/font/2131296259.xml: error: file failed to compile.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/38/pd7j36w954b83s1_8zmfrn6m0000gn/T/brut_util_Jar_23304051720274397738368976131288687923.tmp, compile, --dir, decoded_app/res, --legacy, -o, decoded_app/build/resources.zip]
Steps to Reproduce
java -jar apktool.jar d -o tmp/ -f "app.apk"
java -jar apktool.jar java -jar b tmp/ -o "repacked_app.apk"
APK
If this APK can be freely shared, please upload/attach a link to it.
Sent apkpure url by mail
Questions to ask before submission
Have you tried apktool d, apktool b without changing anything?
Yes, decompiling resources fails on build time, with --no-res works well, but for what I need to do is mandatory to decompile it.
If you are trying to install a modified apk, did you resign it?
Yes
Are you using the latest apktool version?
Yes
The text was updated successfully, but these errors were encountered: