Skip to content
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

StringIndexOutOfBoundsException: String index out of range #3

Open
Surendrajat opened this issue Dec 12, 2020 · 1 comment
Open

StringIndexOutOfBoundsException: String index out of range #3

Surendrajat opened this issue Dec 12, 2020 · 1 comment

Comments

@Surendrajat
Copy link

Surendrajat commented Dec 12, 2020

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.

@Lanchon
Copy link
Member

Lanchon commented Dec 13, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants