Over a million developers have joined DZone.

Exporting types from Android App Using ClassyShark

DZone's Guide to

Exporting types from Android App Using ClassyShark

In this post, MVB Boris Farber gives a quick tutorial on how to export types from an Android mobile application, using the tool ClassyShark.

· Mobile Zone ·
Free Resource

Following my recent article, I got a few suggestions asking about adding a type analysis export to the ClassyShark output.

Types analysis is important for Android developers when dealing with deprecated APIs, duplicate dependencies, and security analysis.

The tricky part is: we need to pay attention to both app and library types. The app own types are easy, as one can see them in their IDE, however, the dependencies are more difficult to grasp. On top of that, for Android, there is no distinction between the types in the app and the ones in dependencies (like third-party libraries).

For code inside the app a few surprises might come with inner classes and synthetic methods that add to class and method count (see the multidex limit) to the ClassyShark output, so in this article, I would like to describe how to use this feature.

You can find the same minimalistic UI here and a released jar (classyshark-types-export.jar) here. Say hello to ClassyShark Types Exporter!

How do you use the exporter? It is pretty easy:

  • Double click on the jar, and then the file chooser pops up.
  • Select your APK.

  • Once the APK is selected the exporter starts to export, showing the export progress that might take 30–40 secs (checked with MacBook Pro).
  • Once the exporter finishes the work, it creates a text file in the same folder as the running jar. This text file holds a list with all types from the APK.

Happy coding!

mobile ,android ,types

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}