simplify icon indicating copy to clipboard operation
simplify copied to clipboard

Load classes referenced from other dex or apk file

Open axnsan12 opened this issue 7 years ago • 1 comments
trafficstars

Hello and first of all thanks for the great tool!

I would like to know if it's possible to provide a "classpath" of dex/apk/jar files to source classes from.

My use case is:

  • I have an obfuscated APK I want to analyze
  • via dyanmic analysis I have captured one or more .dex files loaded on the fly
  • I want to analyze these dex files with simplify
  • they reference classes from eachother and from the main apk

Looking through the README I couldn't figure out how to handle this.

axnsan12 avatar Jul 13 '18 12:07 axnsan12

This would be a good feature, and it's come up a few times before, especially for multi-dex apps.

This could probably best be solved in ClassManager since that abstracts away (almost?) all of the class loading. Instead of holding only one dexfile (via dexlib2), hold multiple and keep some map between class names. There will be some weird edge cases like "what if an app has a hidden dex which is dynamically loaded and tries to redefine a class in the original classes.dex? which class is loaded?" This would require a little research to figure out how dalvikvm handles it. In a pinch, a little warning to the user that smalivm isn't sure which class to use might suffice.

One kinda-crappy work around is to try and manually combine all the code yourself into one dex. Most dex files are usually bloated by libraries which can easily be removed.

CalebFenton avatar Jul 13 '18 16:07 CalebFenton