ThexXTURBOXx / dex2jar

Tools to work with android .dex and java .class files
Apache License 2.0
234 stars 59 forks source link

Exactly what is the purposal of dex2jar... #49

Closed AlexIs387 closed 6 months ago

AlexIs387 commented 6 months ago

if the only thing I get is an invalid or corrupt JAR file?

ThexXTURBOXx commented 6 months ago

If you are getting a corrupt jar file (in the sense that you cannot even unzip it), it is a bug and you should report it properly by giving as much information as possible.

However, I think that you rather mean that the jar file contains code that cannot be executed without further modification. About that: There is no perfect way to convert Dalvik bytecode to Java bytecode. In fact, there cannot be (as already discussed multiple times across this issues section and the upstream issues section). Dex2jar is rather a proof-of-concept next to other similar projects such as JADX and Col-E's dex-translator. Some of these projects might work better than others for different apk/dex files. Hence, by asking "what is the purpose of dex2jar?" you are really asking "why do I want to convert an apk/dex file into another, better readable format?"

Basically, as already said, perfect conversion is not possible - but most of the things you see inside the converted jar file provide most likely a good starting point for reverse-engineering APKs. I have also seen some projects that use dex2jar to convert apk/dex files to jar files, patch them (in order to add some new features or something) and convert them back to apk/dex files which can then be installed on Android devices.

I will close this issue as "completed", because I think I have explained everything I can/want. If you have further questions, feel free to state them here. For reporting issues, please create an issue and provide the appropriate information.