Work around bad XML output by dexdump.
The version of dexdump in build-tools 30.0.1 includes more information than previous versions in its output, which has revealed that it doesn't encode its output as valid XML in all cases; Java strings with control characters or nulls end up emitted literally in the XML output, which breaks ElementTree's parser. b/161925303 has been filed internally to track fixing this in dexdump itself. Since we only need to be able to extract a few specific things from the dexdump output in our tooling, just replace invalid characters in the output with the Unicode replacement character (as Python does when using the 'replace' error handler in encoding) before parsing it. Bug: 1106471 Change-Id: Id1c3a40e5ce91125dbee9fdf1923383d02314f55 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2314986Reviewed-by:Andrew Grieve <agrieve@chromium.org> Auto-Submit: Richard Coles <torne@chromium.org> Commit-Queue: Richard Coles <torne@chromium.org> Cr-Commit-Position: refs/heads/master@{#791232}
Showing
Please register or sign in to comment