Open jgoyao opened 9 years ago
invoke-interface { v1, v2 }, Ljava/util/Set;->add(Ljava/lang/Object;)Z
move-result v1
invoke-static { v0, v1 }, // v1 is boolean but used as integer
Landroid/preference/MultiSelectListPreference;->access$076(Landroid/preference/MultiSelectListPreference;I)Z
the problem is caused by strict type calculation, because in java syntaxt, a boolean can not assign to an inteager. so dex2jar forbid merge type Z and I. It is simple to fix
move-result v1
if-eqz v1, :LZERO
const v1, 1
goto :Lend
:LZERO
const v1, 0
:Lend
https://sourceforge.net/p/dex2jar/tickets/238/ http://sourceforge.net/p/dex2jar/tickets/237 https://bitbucket.org/pxb1988/dex2jar/issue/1/javalangruntimeexception-can-not-merge-i
wdym i dont understand how to modify the dex ?
//////SUMARY There are 1 methods fail to translate. 2015-05-12 16:40:35 UTC version: [dex-reader-2.0, dex-reader-api-2.0, dex-ir-2.0, d2j-smali-2.0, d2j-base-cmd-2.0, dex-tools-2.0, dex-translator-2.0] cmdline: [classes.dex] env: java.runtime.name: Java(TM) SE Runtime Environment java.vm.version: 25.31-b07 java.vm.vendor: Oracle Corporation java.vendor.url: http://java.oracle.com/ java.vm.name: Java HotSpot(TM) 64-Bit Server VM java.vm.specification.name: Java Virtual Machine Specification java.runtime.version: 1.8.0_31-b13 java.awt.graphicsenv: sun.awt.Win32GraphicsEnvironment java.endorsed.dirs: C:\Program Files\Java\jre1.8.0_31\lib\endorsed java.io.tmpdir: C:\Users--\AppData\Local\Temp\ java.vm.specification.vendor: Oracle Corporation java.library.path: C:\ProgramData\Oracle\Java\javapath;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\MATLAB\R2014b\runtime\win64;C:\Program Files\MATLAB\R2014b\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;C:\Program Files (x86)\Java\jre1.8.0_31\bin;. java.specification.name: Java Platform API Specification java.class.version: 52.0 java.awt.printerjob: sun.awt.windows.WPrinterJob java.specification.version: 1.8 java.class.path: C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\antlr-runtime-3.5.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\asm-debug-all-4.1.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\d2j-base-cmd-2.0.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\d2j-jasmin-2.0.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\d2j-smali-2.0.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\dex-ir-2.0.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\dex-reader-2.0.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\dex-reader-api-2.0.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\dex-tools-2.0.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\dex-translator-2.0.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\dex-writer-2.0.jar;C:\Users--\AppData\Local\Android\sdk1\platform-tools\dex2jar-2.0\lib\dx-1.7.jar; java.vm.specification.version: 1.8 java.home: C:\Program Files\Java\jre1.8.0_31 java.specification.vendor: Oracle Corporation java.vm.info: mixed mode java.version: 1.8.0_31 java.ext.dirs: C:\Program Files\Java\jre1.8.0_31\lib\ext;C:\Windows\Sun\Java\lib\ext java.vendor: Oracle Corporation java.vendor.url.bug: http://bugreport.sun.com/bugreport/
////// M-0 Landroid/preference/MultiSelectListPreference$1;.onClick(Landroid/content/DialogInterface;IZ)V java.lang.RuntimeException: can not merge I and Z at com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:659) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840) at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206) at com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44) at com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162) at com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414) at com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42) at com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128) at com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509) at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406) at com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422) at com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172) at com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272) at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108) at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288) at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)
.method public onClick(Landroid/content/DialogInterface;IZ)V .registers 7 if-eqz p3, :L1 iget-object v0, p0, Landroid/preference/MultiSelectListPreference$1;->this$0:Landroid/preference/MultiSelectListPreference; iget-object v1, p0, Landroid/preference/MultiSelectListPreference$1;->this$0:Landroid/preference/MultiSelectListPreference; invoke-static { v1 }, Landroid/preference/MultiSelectListPreference;->access$200(Landroid/preference/MultiSelectListPreference;)Ljava/util/Set; move-result-object v1 iget-object v2, p0, Landroid/preference/MultiSelectListPreference$1;->this$0:Landroid/preference/MultiSelectListPreference; invoke-static { v2 }, Landroid/preference/MultiSelectListPreference;->access$100(Landroid/preference/MultiSelectListPreference;)[Ljava/lang/CharSequence; move-result-object v2 aget-object v2, v2, p2 invoke-virtual { v2 }, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v2 invoke-interface { v1, v2 }, Ljava/util/Set;->add(Ljava/lang/Object;)Z move-result v1 invoke-static { v0, v1 }, Landroid/preference/MultiSelectListPreference;->access$076(Landroid/preference/MultiSelectListPreference;I)Z :L0 return-void :L1 iget-object v0, p0, Landroid/preference/MultiSelectListPreference$1;->this$0:Landroid/preference/MultiSelectListPreference; iget-object v1, p0, Landroid/preference/MultiSelectListPreference$1;->this$0:Landroid/preference/MultiSelectListPreference; invoke-static { v1 }, Landroid/preference/MultiSelectListPreference;->access$200(Landroid/preference/MultiSelectListPreference;)Ljava/util/Set; move-result-object v1 iget-object v2, p0, Landroid/preference/MultiSelectListPreference$1;->this$0:Landroid/preference/MultiSelectListPreference; invoke-static { v2 }, Landroid/preference/MultiSelectListPreference;->access$100(Landroid/preference/MultiSelectListPreference;)[Ljava/lang/CharSequence; move-result-object v2 aget-object v2, v2, p2 invoke-virtual { v2 }, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v2 invoke-interface { v1, v2 }, Ljava/util/Set;->remove(Ljava/lang/Object;)Z move-result v1 invoke-static { v0, v1 }, Landroid/preference/MultiSelectListPreference;->access$076(Landroid/preference/MultiSelectListPreference;I)Z goto :L0 .end method