android: New Python helper functions.

This CL introduces a new Python script providing various
functions to make it easier to parse Android APK files
for symbolization, i.e.:

- ApkReader: convenience class to read the content of an APK,
  especially information related to uncompressed native shared
  libraries. Mostly useful because it can be easily mocked
  for unit-testing purpose.

- ApkNativeLibrariesMap: convenience class to build a map
  of native shared libraries contained in an APK.

- ApkLibraryPathTranslator: convenience class used to translate
  on-device APK file paths and offsets (as found in stack traces
  or tombstones) into a virtual device library path + offset.

+ Add unit-tests for all features.

+ Add a small script used to dump the list of
  uncompressed native libraries inside an APK and their file
  start/end offsets and sizes. This is mostly useful for debugging
  symbolization issues.

NOTE: This is a partial rewrite of the corresponding code from
      the following patch, which shows how this will be used in
      the future to better symbolize tombstones:


Change-Id: If71e0048fa88c859e5f256d8c960134b6b88d06f
Commit-Queue: David Turner <>
Reviewed-by: Egor Pasko <>
Reviewed-by: agrieve <>
Cr-Commit-Position: refs/heads/master@{#576193}
4 files changed