Kindly, help please : wrong interpretation of event handler's parameter

11 views
Skip to first unread message

Sandeep Tuppad

unread,
Mar 14, 2016, 6:38:37 AM3/14/16
to dex...@googlegroups.com
Hi Guys,

Hope you are doing good. Thank you very much for your efforts on dex2jar.

I have attached following files:
1) app-debug.apk -- The compiled apk
2) app.rar - The app folder of the android project zipped contains source code 
3) app-debug-dex2jar.src.zip -- The reverse engineered code generated with dex2jar+jdgui


The function attached to a button in MainActivity is:

    public void TextData(View view) {
        System.out.println("Clicked on TextData");
        String text1 = "First text information on clip"+String.valueOf(count);
        String text2 = "Second text information on clip"+String.valueOf(count);
        String desc = "testing-text"+String.valueOf(count);
        clipboard = (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE);
        data = ClipData.newPlainText(desc, text1);
        data.addItem(new ClipData.Item(text2));
        clipboard.setPrimaryClip(data);
        count++;
    }

However in the reverse engineered code the function is decoded as:

  public void TextData(View paramView)
  {
    System.out.println("Clicked on TextData");
    paramView = "First text information on clip" + String.valueOf(count);
    String str1 = "Second text information on clip" + String.valueOf(count);
    String str2 = "testing-text" + String.valueOf(count);
    this.clipboard = ((ClipboardManager)getSystemService("clipboard"));
    this.data = ClipData.newPlainText(str2, paramView);
    this.data.addItem(new ClipData.Item(str1));
    this.clipboard.setPrimaryClip(this.data);
    count += 1;
  }


The paramView(view in original code) is being assigned with "First text information on clip"+String.valueOf(count); incorrectly, while it's no where referenced in the function. 
I see this happening with every function which has a parameter being used as the first object being used for assigning value.

The behavior can be observed with other functions too. Kindly help.




app-debug.apk
app.rar
app-debug-dex2jar.src.zip

Bob Pan

unread,
Mar 14, 2016, 6:40:08 AM3/14/16
to dex...@googlegroups.com
have you tried another  decompiler, like https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler

--
You received this message because you are subscribed to the Google Groups "dex2jar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dex2jar+u...@googlegroups.com.
To post to this group, send email to dex...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages