testwhat / SmaliEx

A wrapper to get de-optimized dex from odex/oat/vdex.
532 stars 141 forks source link

MarshMallow Sony Z3 Compact #10

Open russel5 opened 8 years ago

russel5 commented 8 years ago

Hello, can you see what is wrong with new boot.oat. I think oat2dex not extract classes from boot.oat proper, because when i try baksmali-2.1.0 core-libart.jar i have this error:

Exception in thread "main" java.lang.RuntimeException: java.util.concurrent.Exec utionException: org.jf.util.ExceptionWithContext: The last instruction in the me thod is truncated at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:165) at org.jf.baksmali.main.main(main.java:305) Caused by: java.util.concurrent.ExecutionException: org.jf.util.ExceptionWithCon text: The last instruction in the method is truncated at java.util.concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:159) ... 1 more Caused by: org.jf.util.ExceptionWithContext: The last instruction in the method is truncated at org.jf.dexlib2.dexbacked.DexBackedMethodImplementation$1$1.readNextIt em(DexBackedMethodImplementation.java:87) at org.jf.dexlib2.dexbacked.DexBackedMethodImplementation$1$1.readNextIt em(DexBackedMethodImplementation.java:75) at org.jf.dexlib2.dexbacked.util.VariableSizeLookaheadIterator.computeNe xt(VariableSizeLookaheadIterator.java:60) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractI terator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.j ava:138) at org.jf.baksmali.Adaptors.ClassDefinition.findFieldsSetInStaticConstru ctor(ClassDefinition.java:73) at org.jf.baksmali.Adaptors.ClassDefinition.(ClassDefinition.java: 58) at org.jf.baksmali.baksmali.disassembleClass(baksmali.java:197) 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)

File boot.oat https://mega.nz/#!8YU1ELoD!11r2cXHuo8W_ozOUPB8q1NFncL18-OBZ45tF3CzFwQk

Thanks

russel5 commented 8 years ago

Hello again. After your last update now i have this error when try oat2dex.jar boot boot.oat

12-05 21:47:46:149 Output raw dex: /home/russel5/Проекты/odex/core-libart.dex 12-05 21:47:46:150 Output raw dex: /home/russel5/Проекты/odex/conscrypt.dex 12-05 21:47:46:150 Output raw dex: /home/russel5/Проекты/odex/okhttp.dex 12-05 21:47:46:150 Output raw dex: /home/russel5/Проекты/odex/core-junit.dex 12-05 21:47:46:151 Output raw dex: /home/russel5/Проекты/odex/bouncycastle.dex 12-05 21:47:46:152 Output raw dex: /home/russel5/Проекты/odex/ext.dex 12-05 21:47:46:156 Output raw dex: /home/russel5/Проекты/odex/framework.dex 12-05 21:47:46:158 Output raw dex: /home/russel5/Проекты/odex/framework-classes2.dex 12-05 21:47:46:159 Output raw dex: /home/russel5/Проекты/odex/telephony-common.dex 12-05 21:47:46:159 Output raw dex: /home/russel5/Проекты/odex/voip-common.dex 12-05 21:47:46:159 Output raw dex: /home/russel5/Проекты/odex/ims-common.dex 12-05 21:47:46:160 Output raw dex: /home/russel5/Проекты/odex/apache-xml.dex 12-05 21:47:46:160 Output raw dex: /home/russel5/Проекты/odex/org.apache.http.legacy.boot.dex 12-05 21:47:46:300 De-optimizing /system/framework/core-libart.jar 12-05 21:47:47:462 Analysis error in class=Landroid/icu/text/Normalizer; method=cmpEquivFold Method: Landroid/icu/text/Normalizer;->cmpEquivFold(Ljava/lang/CharSequence;Ljava/lang/CharSequence;I)I Opcode: iget-object-quick Code address: 151 Near line: 2130

12-05 21:47:47:463 org.jf.dexlib2.analysis.AnalysisException: Could not resolve the field in class (Reference,Ljava/lang/CharSequence;) at offset 8 in cmpEquivFold at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeIputIgetQuick(MethodAnalyzer.java:2007) at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1132) at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:228) at org.jf.dexlib2.analysis.MethodAnalyzer.(MethodAnalyzer.java:165) at org.rh.smaliex.OatUtil$OatDexRewriterModule$1$1.getInstructions(OatUtil.java:477) at org.jf.dexlib2.immutable.ImmutableMethodImplementation.of(ImmutableMethodImplementation.java:82)
at org.jf.dexlib2.immutable.ImmutableMethod.(ImmutableMethod.java:72) at org.jf.dexlib2.immutable.ImmutableMethod.of(ImmutableMethod.java:95) at org.jf.dexlib2.immutable.ImmutableMethod$1.makeImmutable(ImmutableMethod.java:129) at org.jf.dexlib2.immutable.ImmutableMethod$1.makeImmutable(ImmutableMethod.java:120) at org.jf.util.ImmutableConverter$3.next(ImmutableConverter.java:139) at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:301) at com.google.common.collect.ImmutableSet$Builder.addAll(ImmutableSet.java:522) at com.google.common.collect.ImmutableSortedSet$Builder.addAll(ImmutableSortedSet.java:551) at com.google.common.collect.ImmutableSortedSet.copyOf(ImmutableSortedSet.java:326) at org.jf.util.ImmutableConverter.toSortedSet(ImmutableConverter.java:137) at org.jf.dexlib2.immutable.ImmutableMethod.immutableSetOf(ImmutableMethod.java:116) at org.jf.dexlib2.immutable.ImmutableClassDef.(ImmutableClassDef.java:109) at org.jf.dexlib2.immutable.ImmutableClassDef.of(ImmutableClassDef.java:139) at org.jf.dexlib2.immutable.ImmutableClassDef$3.makeImmutable(ImmutableClassDef.java:210) at org.jf.dexlib2.immutable.ImmutableClassDef$3.makeImmutable(ImmutableClassDef.java:201) at org.jf.util.ImmutableConverter$2.next(ImmutableConverter.java:105) at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:301) at com.google.common.collect.ImmutableSet$Builder.addAll(ImmutableSet.java:522) at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:321) at org.jf.util.ImmutableConverter.toSet(ImmutableConverter.java:103) at org.jf.dexlib2.immutable.ImmutableClassDef.immutableSetOf(ImmutableClassDef.java:197) at org.jf.dexlib2.immutable.ImmutableDexFile.(ImmutableDexFile.java:47) at org.jf.dexlib2.immutable.ImmutableDexFile.of(ImmutableDexFile.java:58) at org.rh.smaliex.OatUtil$OatDexRewriter.rewriteDexFile(OatUtil.java:431) at org.rh.smaliex.OatUtil.convertToDex(OatUtil.java:303) at org.rh.smaliex.OatUtil.extractDexFromBootOat(OatUtil.java:232) at org.rh.smaliex.OatUtil.bootOat2Dex(OatUtil.java:140) at org.rh.smaliex.Main.mainImpl(Main.java:98) at org.rh.smaliex.Main.main(Main.java:53) Method: Landroid/icu/text/Normalizer;->cmpEquivFold(Ljava/lang/CharSequence;Ljava/lang/CharSequence;I)I Opcode: iget-object-quick Code address: 151 Near line: 2130

12-05 21:47:49:913 Output to /home/russel5/Проекты/dex/core-libart.dex 12-05 21:47:49:913 De-optimizing /system/framework/conscrypt.jar 12-05 21:47:49:995 Output to /home/russel5/Проекты/dex/conscrypt.dex 12-05 21:47:49:995 De-optimizing /system/framework/okhttp.jar 12-05 21:47:50:114 Output to /home/russel5/Проекты/dex/okhttp.dex 12-05 21:47:50:114 De-optimizing /system/framework/core-junit.jar 12-05 21:47:50:120 Output to /home/russel5/Проекты/dex/core-junit.dex 12-05 21:47:50:120 De-optimizing /system/framework/bouncycastle.jar 12-05 21:47:50:511 Output to /home/russel5/Проекты/dex/bouncycastle.dex 12-05 21:47:50:511 De-optimizing /system/framework/ext.jar 12-05 21:47:50:789 Output to /home/russel5/Проекты/dex/ext.dex 12-05 21:47:50:789 De-optimizing /system/framework/framework.jar 12-05 21:47:54:105 Output to /home/russel5/Проекты/dex/framework.dex 12-05 21:47:54:105 De-optimizing /system/framework/framework.jar:classes2.dex 12-05 21:47:55:357 Output to /home/russel5/Проекты/dex/framework-classes2.dex 12-05 21:47:55:357 De-optimizing /system/framework/telephony-common.jar 12-05 21:47:55:835 Output to /home/russel5/Проекты/dex/telephony-common.dex 12-05 21:47:55:836 De-optimizing /system/framework/voip-common.jar 12-05 21:47:55:867 Output to /home/russel5/Проекты/dex/voip-common.dex 12-05 21:47:55:867 De-optimizing /system/framework/ims-common.jar 12-05 21:47:55:886 Output to /home/russel5/Проекты/dex/ims-common.dex 12-05 21:47:55:886 De-optimizing /system/framework/apache-xml.jar 12-05 21:47:56:220 Output to /home/russel5/Проекты/dex/apache-xml.dex 12-05 21:47:56:220 De-optimizing /system/framework/org.apache.http.legacy.boot.jar 12-05 21:47:56:330 Output to /home/russel5/Проекты/dex/org.apache.http.legacy.boot.dex

testwhat commented 8 years ago

Try latest release https://github.com/testwhat/SmaliEx/releases/tag/snapshot

russel5 commented 8 years ago

Thanks for update, but now i have only one error in Exchange3Google.apk `C:\temp>java -jar oat2dex.jar Exchange3Google.odex odex 04-14 24:10:52:702 Art version=64 (Exchange3Google.odex) 04-14 24:10:52:717 De-optimizing /system/app/Exchange3Google/Exchange3Google.apk 04-14 24:10:53:014 Analysis error in class=Landroid/support/v4/widget/ExploreByTouchHelper; method=a Method: Landroid/support/v4/widget/ExploreByTouchHelper;->a(I)Landroid/support/v4/view/accessibility/AccessibilityNodeInfoCompat; Near line: -1 (address 79) Instructions: [37] return-object regA=0 [38] invoke-virtual-quick regC=0 regD=3 [39] invoke-virtual-quick regC=3 <----- [40] move-result regA=1 [41] if-eqz regA=1

04-14 24:10:53:014 org.jf.dexlib2.analysis.AnalysisException: Could not resolve the method in class unknown at index 25, objReg=3 at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInvokeVirtualQuick(MethodAnalyzer.java:2436) at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1229) at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:262) at org.jf.dexlib2.analysis.MethodAnalyzer.(MethodAnalyzer.java:198) at org.rh.smaliex.DexUtil$ODexRewriterModule$1$1.getInstructions(DexUtil.java:427) ...(Skip 23 traces) at org.rh.smaliex.DexUtil$ODexRewriter.rewriteDexFile(DexUtil.java:366) at org.rh.smaliex.OatUtil.convertToDex(OatUtil.java:320) at org.rh.smaliex.OatUtil.oat2dex(OatUtil.java:153) at org.rh.smaliex.Main.mainImpl(Main.java:128) at org.rh.smaliex.Main.main(Main.java:54)

04-14 24:10:53:030 Failed to re-construct dex java.lang.ClassCastException: org.jf.dexlib2.analysis.UnresolvedOdexInstruction cannot be cast to org.jf.dexlib2.iface.instruction.formats.Instruction35ms 04-14 24:10:53:030 convertToDex: skip /system/app/Exchange3Google/Exchange3Google.apk`