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

MainActivity; - skipping class java.lang.ArrayIndexOutOfBoundsException: 7 #1269

Closed
Aex12 opened this Issue Jun 8, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@Aex12

Aex12 commented Jun 8, 2016

Information

  1. Apktool 2.1.1 -
  2. Operating System: Linux and Windows (Same error on both) -
  3. APK From? Other -

Stacktrace/Logcat

Error occurred while disassembling class Lcom.some.app.MainActivity; - skipping class
java.lang.ArrayIndexOutOfBoundsException: 7
    at org.jf.dexlib2.dexbacked.util.DebugInfo$DebugInfoImpl$3.readNextItem(DebugInfo.java:200)
    at org.jf.dexlib2.dexbacked.util.DebugInfo$DebugInfoImpl$3.readNextItem(DebugInfo.java:157)
    at org.jf.dexlib2.dexbacked.util.VariableSizeLookaheadIterator.computeNext(VariableSizeLookaheadIterator.java:60)
    at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
    at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
    at org.jf.baksmali.Adaptors.MethodDefinition.addDebugInfo(MethodDefinition.java:576)
    at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:378)
    at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:238)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:282)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:112)
    at org.jf.baksmali.baksmali.disassembleClass(baksmali.java:225)
    at org.jf.baksmali.baksmali.access$000(baksmali.java:55)
    at org.jf.baksmali.baksmali$1.call(baksmali.java:149)
    at org.jf.baksmali.baksmali$1.call(baksmali.java:147)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Steps to Reproduce

  1. Add line: ".end local vX" (X is a number) to onCreate() method of some activity.smali that you dont want to be decompiled.
  2. Recompile it and sign it.
  3. Apk can be installed on your Android smartphone without problem, but can't be decompiled and recompiled with apktool.

More info

Some modders are using this trick to avoid people decompiling their apps. Some mod-apps that include this trick are YoWhatsapp and GBWhatsapp

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? Yes
  2. If you are trying to install a modified apk, did you resign it? Yes
  3. Are you using the latest apktool version? Yes
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jun 9, 2016

Owner

I would cross post this to https://github.com/JesusFreke/smali

I haven't tested it myself, but if adding comments can break the decode for baksmali, thats probably something that @JesusFreke would like to patch.

Owner

iBotPeaches commented Jun 9, 2016

I would cross post this to https://github.com/JesusFreke/smali

I haven't tested it myself, but if adding comments can break the decode for baksmali, thats probably something that @JesusFreke would like to patch.

iBotPeaches added a commit that referenced this issue Aug 3, 2016

@iBotPeaches iBotPeaches added this to the 2.2.0 milestone Aug 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment