Closed omeraydindev closed 3 years ago
Thank you very much for your report! Indeed, there seems to be some error in the mentioned commit. I have reverted it similar to your approach in cc35ac953c4b074b96c93a617806bfe02d990fae. Again, thank you very much! :)
This was a painful one to track down, but this particular fork of dex2jar erases some of the inner class info when ran on a DEX file that was rewritten using dexlib2.
I have added a reproduction case in https://github.com/MikeAndrson/dex2jar/blob/main/main/src/main/java/Main.kt , it has a DEX file named
classes_org.dex
, and it:classes_org.dex
toclasses_dexlib2.dex
using dexlib2,classes_org.dex
andclasses_dexlib2.dex
,Main.class
files produced by both DEX files,The result is:
[DeleteDelta, position: 4, lines: [ // access flags 0x0, INNERCLASS Main$1 null null]]
Now this might seem trivial but it kinda messes with decompilers, which was a big problem for my project. So I decided to track it down and realized that this issue doesn't exist on the original dex2jar. So I checked the commits of this fork and found this one: https://github.com/ThexXTURBOXx/dex2jar/commit/98196e0bf3947fde1a6afd00ce518e48130fb03a
I'm not sure why, but reverting the above change solves the issue.
You can try and see for yourself that the diff doesn't complain in my "revert" branch where I reverted that change: https://github.com/MikeAndrson/dex2jar/tree/revert
I'm not sure if the above change was necessary or not, but it does constitute a problem in my project 😅