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

Cannot rebuild decoded apk (InvalidTryException: Multiple overlapping catches for ClassNotFoundException) #784

Closed
iBotPeaches opened this issue Mar 18, 2015 · 2 comments

Comments

@iBotPeaches
Copy link
Owner

Original issue 675 created by shirokuroneko on 2014-08-26T21:46:31.000Z:

What steps will reproduce the problem?

  1. apktool d ly.secret.android.apk
  2. apktool b ly.secret.android.apk

What is the expected output? What do you see instead?
Decoding works and since there were no changes it should be able to rebuild the apk again. However, it fails with this error:

I: Using Apktool 2.0.0-3d2e93-SNAPSHOT on secret
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
Exception in thread "main" org.jf.dexlib2.writer.util.TryListBuilder$InvalidTryException: Multiple overlapping catches for Ljava/lang/ClassNotFoundException; with different handlers
at org.jf.dexlib2.writer.util.TryListBuilder$MutableTryBlock.addHandler(TryListBuilder.java:180)
at org.jf.dexlib2.writer.util.TryListBuilder.addHandler(TryListBuilder.java:311)
at org.jf.dexlib2.writer.util.TryListBuilder.massageTryBlocks(TryListBuilder.java:69)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:883)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:759)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:214)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:192)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:57)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:358)
at brut.androlib.Androlib.buildSources(Androlib.java:298)
at brut.androlib.Androlib.build(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)

What version of the product are you using? On what operating system?
apktool version: top of tree snapshot 3d2e93 (26/08/2014). Built following the wiki instructions.
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
Running in Mac OS X 10.9.4

Please provide any additional information below.
Play store link to the apk: https://play.google.com/store/apps/details?id=ly.secret.android

@iBotPeaches
Copy link
Owner Author

Comment #1 originally posted by connor.tumbleson on 2014-08-27T18:17:42.000Z:

This is an upstream bug with smali: https://code.google.com/p/smali/source/detail?r=0d8418ff1f253471dc5f579ec5b4976c08649a09

Once merged the compilation completes but fails on an aapt problem.

@iBotPeaches
Copy link
Owner Author

Comment #2 originally posted by connor.tumbleson on 2014-09-24T12:23:47.000Z:

394bb25

Fixed via cherry-pick of smali.

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

1 participant