Inside ClassyShark: Ultimate Executable Inspection Made Simple

Written by

in

ClassyShark is a lightweight, standalone binary inspection tool used by Android developers to analyze executables and debug post-build issues. Created by Boris Farber, it allows developers to quickly inspect the final artifact (.apk, .aar, .dex, .so, or .jar). This helps confirm exactly what code and structures made it through the compiler, ProGuard, or R8 optimization steps. Core Capabilities

Multi-Format Support: Reads .apk, .dex, .aar, .jar, .class, and .so files out of the box.

Method Count Breakdown: Tracks exactly how many methods exist inside your dex files to prevent hitting the 65k multidex threshold.

APK Dashboard: Displays package breakdowns, native libraries, and potential structural dependency errors in a single consolidated screen.

Decompiler Viewer: Inspects individual class implementations, fields, and constructors without needing the original source files. How to Set Up and Run ClassyShark

Download the latest compiled executable from the official ClassyShark GitHub Repository.

Launch the tool from your command line using the following command: java -jar ClassyShark.jar Use code with caution.

Use the Folder Icon in the top-right corner to open and load your generated application build. Common Build Problems You Can Troubleshoot 1. Managing and Avoiding Multidex Overflows

Android apps have a hard limit of 65,536 methods per single dex file. ClassyShark provides a fast way to verify how close your package is to this threshold. Open your build artifact in ClassyShark.

Click the Methods Count tab at the top of the navigation pane.

View the structural breakdown per package to identify which third-party dependencies are consuming the highest percentage of your method allocation. 2. Auditing ProGuard or R8 Code Shrinking

When code shrinking tools strip or obfuscate methods, they can occasionally introduce runtime bugs or strip out required reflection classes.

Search for targeted classes directly inside the left panel search tree.

Verify if your classes were renamed correctly or if specific packages were erroneously stripped out due to incorrect rules.

Ensure internal APIs remain secure by verifying that confidential class strings or code lines are missing from the final compiled view. 3. Resolving Native Library and NDK Compilation Errors

If an app crashes due to missing native components (UnsatisfiedLinkError), ClassyShark can scan internal .so native libraries directly. Double-click the file to access the APK Dashboard. Locate the Native Dependencies block.

Scan for Dynamic Symbol Errors to isolate missing SONAME tags or faulty architecture links inside your compiled binary. 4. Investigating Dependency Bloat

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *