-
Notifications
You must be signed in to change notification settings - Fork 85
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
Android APK D2D: Convert classes.dex and related VM/Dalvik bytecode to plain JARs #1372
Comments
Signed-off-by: Jono Yang <[email protected]>
I am able to use jadx to decompile the classes.dex file into java source files and then map the paths to the |
We should also have a way to separate the kotlin runtime from results |
An android apk d2d pipeline has been created here: https://github.com/aboutcode-org/android-inspector All android d2d related code for scancode.io will be placed here. |
This is a little sample d2d note when I compile an APK from kotlin sources I created an APK in a sample android project that have 7 sources (excluing those xml from res/) which include 6 .kt files and 1.java file. If I extract the APK, I find 5 classes.dex files, making it unclear which dex files contain the 'real' sources and which ones contain Google libraries. On the other hand, if I use JADX directly on the APK file, it generates file structure without worrying the dex files. This note indicates that we can use JADX directly on the APK file rather than the DEX file. However, in either cases, it generated many more files that we originally have in the sources.
As note above, the source location should only be in com/example/, but it generates many other libs that we need to smartly ignore/identify when we perform the D2D in a sense that these will be no match. For the file level, following are the source files in a sample andorid project:
Following are the decompiled files generated from jadx:
We already know all the R.java is generated, but for others, it is important to note that not all of them have matching basenames. Source: empty_java.java Source: empty_kt.kt Source: MainActivity.kt Source: test_kt.kt We need to find a pattern in order to increase the matching accuracy and avoid noise. |
* #1366 #1371 #1372 Signed-off-by: Jono Yang <[email protected]>
I have created a library named |
@chinyeungli I am creating a new issue for the Kotlin-specific parts that were not part of this originally and this here is working and done. |
The goal is to reverse the Android bytecode into Java class files and JARs amenable to further analysis.
There are multiple tools that may help with this:
The text was updated successfully, but these errors were encountered: