harshguptaiscf / androguard

Automatically exported from code.google.com/p/androguard
Apache License 2.0
0 stars 0 forks source link

dad does not decompile correctly interface #170

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Please retrieve attached sample, password is 'infected'. 
(can you please remove the sample once retrieved?)

Then, run 
$ androlyze -s
a, d, dx = AnalyzeAPK('thesample', decompiler='dad')

Then, ask for the source code of net.binu.client.r:

d.CLASS_Lnet_binu_client_r.source()
package net.binu.client;
public interface abstract class r {
}

though, d.CLASS_Lnet_binu_client_r.METHODS... will show there are methods.
And if you have a look at the smali:

.method public abstract a(J)V
.end method

.method public abstract a(Ljava/lang/String;)V
.end method

.method public abstract a(Ljava/lang/String;I)V
.end method

.method public abstract a(Ljava/lang/String;Ljava/lang/String;)V
.end method

.method public abstract a(ZZZI)V
.end method
etc

So, the expected output of dad would rather be something like

package net.binu.client;

public interface r {
  boolean a(int arg1, u arg2);

    String b(int arg1);

    void b(String arg1);

    boolean b(int arg1, u arg2);
...
}

I am using androlyze version 2.0 on Linux Mint Rebecca.

Original issue reported on code.google.com by aaforti...@gmail.com on 4 Dec 2014 at 3:47

Attachments:

GoogleCodeExporter commented 8 years ago
Actually, I understand there is "no source" code for the interface. But in the 
decompiler's output, that is a bit misleading, and I think the various methods 
should be listed, the way we would normally do it in Java.

Original comment by aaforti...@gmail.com on 4 Dec 2014 at 4:08