Add support for soname display in apk.

Bug: 29218999

Test: Verified unwind through an apk works with both formats.
Change-Id: I20dba918e94024902968ab320dc03e1e343d8a31
diff --git a/scripts/stack_core.py b/scripts/stack_core.py
index e3910ff..ed45618 100755
--- a/scripts/stack_core.py
+++ b/scripts/stack_core.py
@@ -364,8 +364,21 @@
         # a shared so that was loaded directly out of it. In that case,
         # extract the shared library and the name of the shared library.
         lib = None
-        if area.endswith(".apk") and so_offset:
-          lib_name, lib = self.GetLibFromApk(area, so_offset)
+        # The format of the map name:
+        #   Some.apk!libshared.so
+        # or
+        #   Some.apk
+        if so_offset:
+          # If it ends in apk, we are done.
+          apk = None
+          if area.endswith(".apk"):
+            apk = area
+          else:
+            index = area.rfind(".apk!")
+            if index != -1:
+              apk = area[0:index + 4]
+          if not apk:
+            lib_name, lib = self.GetLibFromApk(apk, so_offset)
         if not lib:
           lib = area
           lib_name = None