iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
20.42k stars 3.6k forks source link

org.jf.util.ExceptionWithContext #1772

Closed Deltafox79 closed 6 years ago

Deltafox79 commented 6 years ago

Information

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

    Stacktrace/Logcat

I: Smaling smali folder into classes.dex... Exception in thread "main" org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method Lcom/google/android/gms/internal/zzegw;->zzcee()Lcom/google/android/gms/internal/zzegw; at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:825) at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:268) at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:246) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:61) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:36) at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:417) at brut.androlib.Androlib.buildSources(Androlib.java:348) at brut.androlib.Androlib.build(Androlib.java:301) at brut.androlib.Androlib.build(Androlib.java:269) at brut.apktool.Main.cmdBuild(Main.java:227) at brut.apktool.Main.main(Main.java:75) Caused by: org.jf.util.ExceptionWithContext: Error while writing instruction at code offset 0x68 at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1098) at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:821) ... 10 more Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65536 at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116) at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:348) at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1058) ... 11 more

Include stacktrace here



### Steps to Reproduce
1. `apktool `

apktool d fr24.apk
apktool b fr24

### Frameworks
If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(`.apks` that live in `/system/framework` or `/system/priv-app`)

### APK
If this APK can be freely shared, please upload/attach a link to it.

[https://www67.zippyshare.com/v/jG2Oi1XW/file.html](https://www67.zippyshare.com/v/jG2Oi1XW/file.html)

### 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 commented 6 years ago
➜  Bug1772 apktool b FR24
I: Using Apktool 2.3.2-ca25a2-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
➜  Bug1772 

I couldn't replicate.

Deltafox79 commented 6 years ago

For replicate this issue Try to compile this :

apktool b Test1...

https://www69.zippyshare.com/v/mfj4qXIh/file.html

Regards