DexPatcher/dex2jar

StringIndexOutOfBoundsException: String index out of range

Surendrajat opened this issue · 1 comments

Hi @Lanchon.

Been trying to do some more modding and facing this issue:

> Task :app:dedexAppClasses
dex2jar /home/surendra/mod_app/app/apk/test_app.apk -> /home/surendra/mod_app/app/build/intermediates/dexpatcher/dedexed-classes/app-classes.jar
java.lang.StringIndexOutOfBoundsException: String index out of range: 56
        at java.lang.String.charAt(String.java:658)
        at org.objectweb.asm.signature.SignatureReader.parseType(SignatureReader.java:177)
        at org.objectweb.asm.signature.SignatureReader.accept(SignatureReader.java:110)
        at org.objectweb.asm.commons.Remapper.mapSignature(Remapper.java:164)
        at org.objectweb.asm.commons.RemappingClassAdapter.visit(RemappingClassAdapter.java:66)
        at org.objectweb.asm.ClassVisitor.visit(ClassVisitor.java:113)
        at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:401)
        at com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:457)
        at com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:126)
        at com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:275)
        at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:107)
        at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:290)
        at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:33)

I guess this belongs here. Thanks much for all your work.

Edit: rebuild is working fine even with this error so it's not a real issue per se.

that's a dex2jar issue, it's full of them. you can try a roundtrip of the apk via apktool before feeding it to the dxp project; the baksmali/smali roundtrip included there might tell you something useful or fix the issue. otherwise you can use importSymbols=false, but then you'd need to define every symbol. or just ignore the exception; dex2jar tries to continue after errors anyway.