asolfre / dex2jar

Automatically exported from code.google.com/p/dex2jar
1 stars 0 forks source link

RuntimeException caused by @Nullable parameter annotation. #233

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. dex2jar classes.dex

This results in:
test » dex2jar classes.dex 
dex2jar classes.dex -> classes-dex2jar.jar
com.googlecode.dex2jar.DexException: while accept 
method:[Landroid/support/v4/app/ActivityCompat;.startActivity(Landroid/app/Activ
ity;Landroid/content/Intent;Landroid/os/Bundle;)V]
    at com.googlecode.dex2jar.reader.DexFileReader.acceptMethod(DexFileReader.java:694)
    at com.googlecode.dex2jar.reader.DexFileReader.acceptClass(DexFileReader.java:436)
    at com.googlecode.dex2jar.reader.DexFileReader.accept(DexFileReader.java:323)
    at com.googlecode.dex2jar.v3.Dex2jar.doTranslate(Dex2jar.java:85)
    at com.googlecode.dex2jar.v3.Dex2jar.to(Dex2jar.java:261)
    at com.googlecode.dex2jar.v3.Dex2jar.to(Dex2jar.java:252)
    at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:110)
    at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:174)
    at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:34)
Caused by: com.googlecode.dex2jar.DexException: while accept parameter 
annotation in 
method:[Landroid/support/v4/app/ActivityCompat;.startActivity(Landroid/app/Activ
ity;Landroid/content/Intent;Landroid/os/Bundle;)V], parameter:[0]
    at com.googlecode.dex2jar.reader.DexFileReader.acceptMethod(DexFileReader.java:663)
    ... 8 more
Caused by: java.lang.RuntimeException: EOF
    at com.googlecode.dex2jar.reader.io.ArrayDataIn.readUByte(ArrayDataIn.java:131)
    at com.googlecode.dex2jar.reader.DexAnnotationReader.accept(DexAnnotationReader.java:49)
    at com.googlecode.dex2jar.reader.DexFileReader.acceptMethod(DexFileReader.java:660)
    ... 8 more

What is the expected output? What do you see instead?
A resulting jar file, i.e.:
test » dex2jar classes.dex
dex2jar classes.dex -> classes-dex2jar.jar

What version of the product are you using? On what operating system?
version: reader-1.15, translator-0.0.9.15, ir-1.12
OSX 10.10

Please upload the file which cause the issue if possible.
Attached.

Please provide any additional information below.
This issue was first reported here: 
https://code.google.com/p/smali/issues/detail?id=220#c14, but seems to be a 
dex2jar issue. The dex file is a valid dex file and works on device.

Original issue reported on code.google.com by dwayney...@gmail.com on 15 Nov 2014 at 12:08

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, i am the owner the project, my account pxb1988 is banned for about 3 
months. and seams it is not possible to recover.
https://groups.google.com/forum/#!topic/google-code-hosting/qEt4ZpCmn7k

we are moving dex2jar to SourceForge and Bitbucket.

https://sourceforge.net/p/dex2jar
https://bitbucket.org/pxb1988/dex2jar

the issue is already fixed in new dex2jar-2.x, it can be downloaded here
https://sourceforge.net/projects/dex2jar/files/

Original comment by qq...@163.com on 17 Nov 2014 at 2:52

GoogleCodeExporter commented 9 years ago
Thank you I will update. Is there a changelog showing the differences between 
0.9.x and the latest 2.x? I noticed some files are missing such as 
d2j-decryptstrings - is that functionality still available? If not, will it be 
returning?

Original comment by dwayney...@gmail.com on 17 Nov 2014 at 7:51

GoogleCodeExporter commented 9 years ago
the code on 2.x is re-implemented to handle strange dex or even damaged dex. 

some function are still available,
https://bitbucket.org/pxb1988/dex2jar/src/ec6c9e8652c5a139022f5d6e5e6116820d27de
d7/dex-tools/src/main/bin_gen/class.cfg?at=2.x

d2j-decrypt-strings is come back on reversion 6dbf2d4 
https://bitbucket.org/pxb1988/dex2jar/commits/6dbf2d40356a96805f07413bfa55171254
bc0d06?at=2.x, with support to decrypt strings by dexguard and dasho pro.
wiki is here https://bitbucket.org/pxb1988/dex2jar/wiki/DecryptStrings
night build is here 
https://dex2jar.ci.cloudbees.com/job/dex2jar-2.x/lastBuild/com.googlecode.d2j$de
x-tools/artifact/com.googlecode.d2j/dex-tools/2.1-SNAPSHOT/dex-tools-2.1-SNAPSHO
T.zip

Original comment by qq...@163.com on 18 Nov 2014 at 3:18