Open ngmpngmp1 opened 6 years ago
Sorry for the... slightly delayed response :). Would it be possible to get a copy of the apk, so I can take a look?
@JesusFreke I have similar error with the following app.
Some of the classes are skipped, and I am unable to recompile back to APK after baksmali it.
Any progress of this? Here is a apk https://forum.powerampapp.com/files/file/56-poweramp-v3-build-826-uniapk/
What seems to be the problem?
String index out of bounds occured When I call DexAnnotator. This apk include obfuscation classes.
But same apk(not obfuscation) is not occured this problem. It is possible problem?
string index size is 47334 org.jf.dexlib2.dexbacked.DexBackedDexFile$InvalidItemIndex: String index out of bounds: 65534 at org.jf.dexlib2.dexbacked.DexBackedDexFile.getStringIdItemOffset(DexBackedDexFile.java:149) at org.jf.dexlib2.dexbacked.DexBackedDexFile.getString(DexBackedDexFile.java:215) at org.jf.dexlib2.dexbacked.reference.DexBackedStringReference.getString(DexBackedStringReference.java:53) at org.jf.dexlib2.util.ReferenceUtil.getReferenceString(ReferenceUtil.java:140) at org.jf.dexlib2.util.ReferenceUtil.getReferenceString(ReferenceUtil.java:134) at org.jf.dexlib2.dexbacked.raw.CodeItem$1.annotateDefaultInstruction(CodeItem.java:316) at org.jf.dexlib2.dexbacked.raw.CodeItem$1.annotateItem(CodeItem.java:148) at org.jf.dexlib2.dexbacked.raw.SectionAnnotator.annotateSectionInner(SectionAnnotator.java:97) at org.jf.dexlib2.dexbacked.raw.SectionAnnotator.annotateSection(SectionAnnotator.java:72) at org.jf.dexlib2.dexbacked.raw.CodeItem$1.annotateSection(CodeItem.java:75) at org.jf.dexlib2.dexbacked.raw.util.DexAnnotator.writeAnnotations(DexAnnotator.java:166) at org.jf.dexlib2.DexFileFactory.main(DexFileFactory.java:102)
What is the exact smali/baksmali command that you ran? download master smali / dexlib2 and make public static void main method in DexFileFactory.java => URL url = DexFileFactory.class.getResource("classes.dex"); DexBackedDexFile dexFile = DexFileFactory.loadDexFile(url.getFile(), Opcodes.getDefault());
RawDexFile rawDexFile = new RawDexFile(dexFile.getOpcodes(), dexFile); DexAnnotator annotator = new DexAnnotator(rawDexFile, consoleWidth); annotator.writeAnnotations(writer);