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

String index out of bounds #2071

Closed
megapro17 opened this issue May 3, 2019 · 3 comments · Fixed by #2153

Comments

@megapro17
Copy link

commented May 3, 2019

Information

  1. Apktool Version (apktool -version) - 2.4.0
  2. Operating System (Mac, Linux, Windows) - Windows
  3. APK From? (Playstore, ROM, Other) - Site

Stacktrace/Logcat

I: Using Apktool 2.4.0 on Poweramp-v3-build-826-uni.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\megapro17\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...


Error occurred while disassembling class Lvx; - skipping class
org.jf.dexlib2.dexbacked.DexBackedDexFile$InvalidItemIndex: String index out of bounds: 20515
        at org.jf.dexlib2.dexbacked.DexBackedDexFile.getStringIdItemOffset(DexBackedDexFile.java:159)
        at org.jf.dexlib2.dexbacked.DexBackedDexFile.getString(DexBackedDexFile.java:257)
        at org.jf.dexlib2.dexbacked.reference.DexBackedStringReference.getString(DexBackedStringReference.java:53)
        at org.jf.dexlib2.util.ReferenceUtil.getReferenceString(ReferenceUtil.java:209)
        at org.jf.baksmali.Adaptors.Format.InstructionMethodItem.lambda$writeTo$1(InstructionMethodItem.java:133)
        at org.jf.baksmali.Adaptors.Format.InstructionMethodItem.writeTo(InstructionMethodItem.java:269)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:240)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:326)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:112)
        at org.jf.baksmali.Baksmali.disassembleClass(Baksmali.java:152)
        at org.jf.baksmali.Baksmali.access$000(Baksmali.java:46)
        at org.jf.baksmali.Baksmali$1.call(Baksmali.java:76)
        at org.jf.baksmali.Baksmali$1.call(Baksmali.java:74)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)



Error occurred while disassembling class Lyd; - skipping class
org.jf.dexlib2.dexbacked.DexBackedDexFile$InvalidItemIndex: String index out of bounds: 41242
        at org.jf.dexlib2.dexbacked.DexBackedDexFile.getStringIdItemOffset(DexBackedDexFile.java:159)
        at org.jf.dexlib2.dexbacked.DexBackedDexFile.getString(DexBackedDexFile.java:257)
        at org.jf.dexlib2.dexbacked.reference.DexBackedStringReference.getString(DexBackedStringReference.java:53)
        at org.jf.dexlib2.util.ReferenceUtil.getReferenceString(ReferenceUtil.java:209)
        at org.jf.baksmali.Adaptors.Format.InstructionMethodItem.lambda$writeTo$1(InstructionMethodItem.java:133)
        at org.jf.baksmali.Adaptors.Format.InstructionMethodItem.writeTo(InstructionMethodItem.java:269)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:240)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:326)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:112)
        at org.jf.baksmali.Baksmali.disassembleClass(Baksmali.java:152)
        at org.jf.baksmali.Baksmali.access$000(Baksmali.java:46)
        at org.jf.baksmali.Baksmali$1.call(Baksmali.java:76)
        at org.jf.baksmali.Baksmali$1.call(Baksmali.java:74)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

Steps to Reproduce

  1. apktool d Poweramp-v3-build-826-uni.apk

APK

https://forum.powerampapp.com/files/file/56-poweramp-v3-build-826-uniapk/

@iBotPeaches

This comment has been minimized.

Copy link
Owner

commented May 7, 2019

This looks like a smali issue, so probably outside my expertise. You may check this bug which looks related - JesusFreke/smali#581

I'm going to mark as 3rd party dependent.

@2165998

This comment has been minimized.

Copy link

commented Aug 17, 2019

hi!The baksmali-2.3 version can solve this error~

@iBotPeaches

This comment has been minimized.

Copy link
Owner

commented Aug 17, 2019

Thanks for the notice @2165998

➜  2071 apktool d Poweramp-v3-build-826-uni.apk -f
I: Using Apktool 2.4.1-75e4c6-SNAPSHOT on Poweramp-v3-build-826-uni.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  2071 

PR above, waiting for build status to be merged. Will be upcoming 2.4.1 release.

@iBotPeaches iBotPeaches added this to the 2.4.1 milestone Aug 17, 2019

iBotPeaches added a commit that referenced this issue Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.