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.