iBotPeaches / Apktool

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

A lot of #disallowed odex opcode and nop in smali after decompile #1207

Closed ghost closed 8 years ago

ghost commented 8 years ago

Information

  1. Apktool Version 2.0.3
  2. Operating System Windows
  3. APK From? Other

    Stacktrace/Logcat

C:\Users\quocd\Documents\APK Easy Tool>java -jar apktool.jar d dr2.apk
I: Using Apktool 2.0.3 on dr2.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\quocd\apktool\framework\1.apk
I: Decoding Shared Library (com.sonyericsson.uxp), pkgId: 2
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...

Error occurred while disassembling class Lcom.com2us.module.activeuser.useragree.UserAgreeDialog$UserAgreeWebViewClient; - skipping class
java.lang.NullPointerException
        at org.jf.dexlib2.util.SyntheticAccessorFSM.test(SyntheticAccessorFSM.java:299)
        at org.jf.dexlib2.util.SyntheticAccessorResolver.getAccessedMember(SyntheticAccessorResolver.java:127)
        at org.jf.baksmali.Adaptors.MethodDefinition.addInstructionMethodItems(MethodDefinition.java:449)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:373)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:238)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:327)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:113)
        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(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Error occurred while disassembling class Lcom.facebook.Session$TokenRefreshRequest; - skipping class
java.lang.NullPointerException
        at org.jf.dexlib2.util.SyntheticAccessorFSM.test(SyntheticAccessorFSM.java:299)
        at org.jf.dexlib2.util.SyntheticAccessorResolver.getAccessedMember(SyntheticAccessorResolver.java:127)
        at org.jf.baksmali.Adaptors.MethodDefinition.addInstructionMethodItems(MethodDefinition.java:449)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:373)
        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(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Error occurred while disassembling class Lcom.facebook.Session$TokenRefreshRequestHandler; - skipping class

Error occurred while disassembling class Lcom.facebook.internal.LikeActionController$4$1; - skipping class
java.lang.NullPointerException
        at org.jf.dexlib2.util.SyntheticAccessorFSM.test(SyntheticAccessorFSM.java:299)
        at org.jf.dexlib2.util.SyntheticAccessorResolver.getAccessedMember(SyntheticAccessorResolver.java:127)
        at org.jf.baksmali.Adaptors.MethodDefinition.addInstructionMethodItems(MethodDefinition.java:449)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:373)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:238)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:327)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:113)
        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(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Error occurred while disassembling class Lcom.facebook.android.Facebook$TokenRefreshConnectionHandler; - skipping class
java.lang.NullPointerException
        at org.jf.dexlib2.util.SyntheticAccessorFSM.test(SyntheticAccessorFSM.java:299)
        at org.jf.dexlib2.util.SyntheticAccessorResolver.getAccessedMember(SyntheticAccessorResolver.java:127)
        at org.jf.baksmali.Adaptors.MethodDefinition.addInstructionMethodItems(MethodDefinition.java:449)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:373)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:238)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:327)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:113)
        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(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
        at org.jf.dexlib2.util.SyntheticAccessorFSM.test(SyntheticAccessorFSM.java:299)
        at org.jf.dexlib2.util.SyntheticAccessorResolver.getAccessedMember(SyntheticAccessorResolver.java:127)
        at org.jf.baksmali.Adaptors.MethodDefinition.addInstructionMethodItems(MethodDefinition.java:449)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:373)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:238)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:327)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:113)
        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(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

Steps to Reproduce

  1. Open the cmd and cd to the path where apktool.jar is located
  2. java -jar apktool.jar d dr2.apk

    Frameworks

Framework from Sony Xperia Z3 Compact framework-res.zip

APK

http://sbupload.com/5dy0zit6pp1t.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? N/A
  3. Are you using the latest apktool version? Yes
iBotPeaches commented 8 years ago

Could not duplicate on latest. Seems fixed with the update in smali. 2.1.0 will be out shortly.

➜  Bug1207 apktool if framework-res.apk -t 1207
I: Decoding Shared Library (com.sonyericsson.uxp), pkgId: 2
I: Framework installed to: /home/ibotpeaches/apktool/framework/1-1207.apk
➜  Bug1207 apktool d dr2.apk -t 1207
I: Using Apktool 2.1.0-5c7702-SNAPSHOT on dr2.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1-1207.apk
I: Decoding Shared Library (com.sonyericsson.uxp), pkgId: 2
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...
➜  Bug1207