Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load classes referenced from other dex or apk file #107

Open
axnsan12 opened this issue Jul 13, 2018 · 1 comment
Open

Load classes referenced from other dex or apk file #107

axnsan12 opened this issue Jul 13, 2018 · 1 comment

Comments

@axnsan12
Copy link

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.

@CalebFenton
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants