dex2jar
dex2jar copied to clipboard
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
at java.lang.String.substring(Unknown Source)
at org.objectweb.asm.signature.SignatureReader.parseType(SignatureReader.java:169)
at org.objectweb.asm.signature.SignatureReader.acceptType(SignatureReader.java:130)
at org.objectweb.asm.commons.Remapper.mapSignature(Remapper.java:162)
at org.objectweb.asm.commons.RemappingClassAdapter.visitField(RemappingClassAdapter.java:90)
at org.objectweb.asm.ClassVisitor.visitField(ClassVisitor.java:272)
at com.googlecode.d2j.dex.Dex2Asm.convertField(Dex2Asm.java:488)
at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:439)
at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:357)
at com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:460)
at com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:175)
at com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:275)
at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:112)
at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:290)
at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:33)
P.S: I'm trying to use this tool on a classes.dex file extracted from an APK which was mainly programmed in Kotlin.
Bump
Please share the appropriate APK/DEX file and test it on my fork of dex2jar
: https://github.com/ThexXTURBOXx/dex2jar
ThexXTURBOXx branch does work on that APK, thanks.
Thanks for your feedback!
@pxb1988 There seems to be something else in my fork that you might want to release in your version as well.
FYI I just have the same issue, I'm not the issue author or related :)
FYI I just have the same issue, I'm not the issue author or related :)
I will wait for the original author to reply and we will see if his issue is fixed as well :)
Hi thank you @ThexXTURBOXx for your fork of dex2jar. It gave me following message while converting dex 2 jar
Applying workaround to field Lk/f/b/e/d/f$a;->n:Landroid/view/View; by removing its original signature TV.
Though I got no error while conversion, but in final output classes-dex2jar.jar
file, I didn't get R.java
class.
Thanks for the response @WaqasAzamKml Yes, this message is appropriate as the type can't directly be translated to Java ByteCode from Dalvik. I will take a look at the missing R.java file, though. Are you able to share your APK as well? :)
Here is my classes.dex file, I would be grateful if you extract most of its code, specially from the package com.appxstudio.esportslogo
classes.zip
Link to APK: https://apkpure.com/esports-gaming-logo-maker/com.appxstudio.esportlogo
@ThexXTURBOXx any luck with the dex file I sent?
Sadly no, I can't seem to find the R.class
file either.
I will try to see if jadx
can successfully recover it at some point. If it also doesn't, then it's most likely not dex2jar
's fault :)
Tested it on jadx. The R.class file is there. So, something goes wrong in Dex2Jar. I will try to investigate this issue whenever I have time :)
Good luck @ThexXTURBOXx
This problem seems to have not been resolved in the new version.
@Hackxiaoya Have you tried my fork? If yes, please provide me with the stack trace
@ThexXTURBOXx Yes. Your fork solves this problem.But why didn't this repository merge your fixes?
Okay, thanks for the feedback! I provided too many fixes to merge them all at once. So, instead the original author cherry picked only a few ones
@ThexXTURBOXx you are awesome. your version works on a 300MB apk file.
Very nice to hear, thanks for the feedback :)