testwhat / SmaliEx

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

oat2dex 41715173 can't deodex services.odex from Sony M4 Aqua Dual 26.3.B.0.131 FW #60

Closed S-trace closed 6 years ago

S-trace commented 6 years ago

The Android version is:

oat2dex oat/arm64/services.odex arm64/boot.oat 
04-16 18:38:11:776 Art version=64 (oat/arm64/services.odex)                                                                   
04-16 18:38:11:783 De-optimizing /system/framework/services.jar
04-16 18:38:13:263 Analysis error in class=Lcom/android/server/am/ActivityManagerService; method=dumpHeap
Method: Lcom/android/server/am/ActivityManagerService;->dumpHeap(Ljava/lang/String;IZLjava/lang/String;Landroid/os/ParcelFileDescriptor;)Z
Near line: 20008 (address 142)
Instructions: 
 [72] monitor-exit regA=6
 [73] if-eqz regA=11
 [74] invoke-virtual-quick regC=11 <-----
 [75] return regA=3
 [76] move-exception regA=4

04-16 18:38:13:263 org.jf.dexlib2.analysis.AnalysisException: Could not resolve the method in class unknown at index 13, objReg=11
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInvokeVirtualQuick(MethodAnalyzer.java:2582)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1271)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:259)
        at org.jf.dexlib2.analysis.MethodAnalyzer.<init>(MethodAnalyzer.java:190)
        at org.rh.smaliex.deopt.OdexRewriter$OdexRewriterModule$1$1.getInstructions(OdexRewriter.java:232)
        ...(Skip 24 traces)
        at org.rh.smaliex.OatUtil.convertToDex(OatUtil.java:271)
        at org.rh.smaliex.OatUtil.convertDexFromBootOat(OatUtil.java:192)
        at org.rh.smaliex.OatUtil.oat2dex(OatUtil.java:81)
        at org.rh.smaliex.Main.mainImpl(Main.java:127)
        at org.rh.smaliex.Main.main(Main.java:43)

04-16 18:38:13:264 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-16 18:38:13:264 convertToDex: skip /system/framework/services.jar

Version:

oat2dex
Easy oat2dex 0.90
Usage:
 java -jar oat2dex.jar [options] <action>
[options]
 Api level: -a <integer>
 Output folder: -o <folder path>
 Print detail : -v
<action>
 Get dex of boot(.oat) : boot <boot.oat/boot-folder>
 Get dex (de-optimize) : <oat/odex file> <boot-class-folder>
                         <vdex file>
 Get raw odex          : odex <oat/odex/vdex file>
 Get raw odex smali    : smali <oat/odex/vdex file>
 Deodex framework (exp): devfw [empty or path of /system/framework/]

boot.oat and services.odex: https://www.dropbox.com/s/rjt98vrwcbippys/Sony_M4_Aqua_Dual_26.3.B.0.131_deodex_problem_files.zip?dl=1

testwhat commented 6 years ago

Have a try on 05ba5b3 (current release).

S-trace commented 6 years ago

Thank you, 05ba5b3 works fine with this FW