Apktool
Apktool copied to clipboard
Decompiled strings.xml is invalid
Using apktool 2.0.3, decompile com.google.android.apps.docs.editors.slides (version 60521040).
In the output directory, res/values/strings.xml contains the following in line 808:
<string name="document_info_panel_path">On <g example="My device (Nexus 4) > foo > bar\" id=\"document_info_panel_path\">%1$s</g></string>
This is invalid XML and the expected result is either:
<string name="document_info_panel_path">On <g example=\"My device (Nexus 4) > foo > bar\" id=\"document_info_panel_path\">%1$s</g<</string>
or:
<string name="document_info_panel_path">On <g example="My device (Nexus 4) > foo > bar" id="document_info_panel_path">%1$s</g></string>
Now, this may be similar to Issue 859, but this APK is coming from Google themselves, which makes me doubtful that it's an issue of non-standard coding and mentioned in that issue.
Note that this issue exists throughout the file and is inconsistent:
- Line 914:
<string name="empty_doclist_for_pinned_view_details_can_edit">"Tap \"Available offline\" in a file's menu so you can keep working on it offline."</string>(escaped quotes vs. unescaped quotes) - Line 1369:
<string name="navigation_search_results">Search: \"<g example="Cruise" id="searchTerm">%s</g>\"</string>(no escaping except around xml element) - Line 2420:
<string name="template_list_brand_link">" by <a href=\""<g example="http://billnye.com/" id="brand_name">%2$s</g>\"><g example="Bill Nye, The Science Guy" id="brand_name">%1$s</g>"</a> "</string>(wat)
It's all very strange and I'd love to hear what you think.
Thanks for taking the time and for the great tool! :+1:
I'll have to build some unit-tests using these values, because I'm not sure why values weren't escaped or converted at all.
Thanks! The APK upload expires in a week, so if you need me to re-upload it at any point, please let me know.
I've got the apk already, just a little hard to effectively debug a file as large as google applications. Once I create the unit-tests that replicate the behavior, it'll be a lot easier to investigate.
I've got several apks where apktool 2.3.0 produces strings.xml files without well-formed xml. There are basically unbalanced html-tags as content of a string tag interspersed with quoted strings.
<string name="welcome">" ...
..."<b>hallo</b></i>"...
..."</string>