Grk26 / elsim

Automatically exported from code.google.com/p/elsim
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Not identical methods flagged as identical. #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run $ ./androsim.py -i 
RuFraud_angry.Birds_95a04cfc5ed03c54d4749310ba29dda9.apk RuFraud_SuiConFo.apk -d

What is the expected output? What do you see instead?
Output:
warning: compressor SNAPPY is not supported (use zlib default compressor)
Elements:
     IDENTICAL: 1
     SIMILAR:   1
     NEW:       1
     DELETED:   44
     SKIPPED:   0
warning: compressor SNAPPY is not supported (use zlib default compressor)
    --> methods: 33.333333% of similarities
[...]
IDENTICAL methods:
    Lcom/Angry/Birds/R$attr; <init> ()V 4
        --> Lcom/magicsms/own/MagicSMSActivity; <init> ()V 4
[...]

I expect androsim, to differ an R*.class from a normal class-Method by default. 
The SMALI Code shows, that the both methods looks pretty the same, except for 
the class of the called <init> method:

Sample 1 = RuFraud_angry.Birds_95a04cfc5ed03c54d4749310ba29dda9.apk
sha256 = e45caa25f87531cff2ee2803374ac78de0757941dd1311e3411ce4cdf6d5d942
-------------
  1 .class public final Lcom/Angry/Birds/R$attr;
[...]
 17 # direct methods
 18 .method public constructor <init>()V
 19     .locals 0
 20 
 21     .prologue
 22     .line 11
 23     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 24 
 25     return-void
 26 .end method

Sample 2 = SuiConFu.apk
sha256 = 98a402d885cdb941dca8b45a4bbcbbe7f44ba62910d519bc1c2161dba117ebd2
-------------
  1 .class public Lcom/magicsms/own/MagicSMSActivity;
[...]
  6 # direct methods
  7 .method public constructor <init>()V
  8     .locals 0
  9 
 10     .prologue
 11     .line 11
 12     invoke-direct {p0}, Landroid/app/Activity;-><init>()V
 13 
 14     return-void
 15 .end method

I does not know, if this is a BUG or a problem of your algorithm. Perhaps you 
have to make a explicit exception for the R*.java files.
Nevertheless androsim/elsim is an awesome feature. Thanks!

What version of the product are you using? On what operating system?
- Androguard 1.6 Revision 411 from the Repository (Oct 08 15:41:27 2012 +0200)
- Ubuntu ....

Please provide any additional information below.

Original issue reported on code.google.com by hanno.le...@googlemail.com on 11 Oct 2012 at 10:29

GoogleCodeExporter commented 9 years ago
"-s 10" is a possibility, but I think the R*.java you can except in general, or?

Original comment by hanno.le...@googlemail.com on 11 Oct 2012 at 11:17

GoogleCodeExporter commented 9 years ago
yes you re right, the main problem with this algorithm is for small methods, 
but I can add exception for that !

Original comment by anthony....@gmail.com on 11 Oct 2012 at 11:32