-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Decoding XML values with CDATA, missing style information. #2872
Comments
in ResXmlEncoders.java, replacing line 29 to I'm currently using this python script to fix them
|
Thanks - I find it incredible odd that its been years on years and we haven't been completely following the encoded xml spec of characters so before I just add another character to that array - I want to dig into this. |
Yeah as I vaguely remembered. This is intentional. The resource only wants The issue here is we parse that XML file to read specific resources and this assumption does not work if the parser cannot understand the XML file, but Android can. So probably a bug, but unsure of a resolution at this time. Since I don't think adapting our XML parser to allow invalid XML is going to be easy. |
Same for me. |
So I am going to close this because to the best of my knowledge its resolved. However, since there was no sample or ability to fully confirm the original. I followed the apk-mitm issue till I hit this issue on their side: niklashigi/apk-mitm#105. It had a sample attached with same form of error. That is now resolved with the upcoming 2.8.2 release.
Will see if I can add a test case to suite, but I vaguely remember last time that since CDATA is not persisted into the compiled application - its not possible to do a 1/1 comparison of the decoded and plaintext attribute. |
<string name="incorrect_issue_2872"><![CDATA[<a href="https://apktool.org">Apktool</a> and more text here.]]></string> Okay will leave this open for now. The above string when decoded loses the double quotes, but I'm not even sure if I made a valid string or not. |
Information
apktool -version
) - 2.6.1Stacktrace/Logcat
Incorrect XML line is as follows:
As you can see,
>
character isn't escaped, creating an invalid XML file.Steps to Reproduce
apktool d app.apk
apktool b app
(also tried with aapt2, same problem)
APK
Private app
Questions to ask before submission
apktool d
,apktool b
without changing anything? YesThe text was updated successfully, but these errors were encountered: