Thursday, February 6, 2014

Android decompile problem


            
In the decompiled using dex2jar jar open and access the $ symbol appears in the class method name
$ 2, etc.

import android.content.Context;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import dalvik.annotation.EnclosingMethod;
import java.lang.ref.WeakReference;
import java.util.List;
import java.util.Map;

@ EnclosingMethod
class BookInfoActivity $ MyBookInfoAdapter $ 2
implements View.OnClickListener
{
public void onClick (View paramView)
{
. Context localContext = (Context) BookInfoActivity.MyBookInfoAdapter.access $ 2 (this.this $ 1) get ();
Handler localHandler = BookInfoActivity.MyBookInfoAdapter.access $ 1 (this.this $ 1);
List localList = BookInfoActivity.MyBookInfoAdapter.access $ 0 (this.this $ 1);
int i = this.val $ position;
Map localMap = (Map) localList.get (i);
new BookInfoOpenTableDialog (localContext, localHandler, localMap) show ();.
}
}


The above is a piece of code. Like a lot of code. This method is what. Online said that the anonymous inner classes. Less clear. Great God seeking to explain
Reply:
 MyBookInfoAdapter.setOnClickListener (new OnclikcListener (
public void onClick (View paramView)
{
. Context localContext = (Context) BookInfoActivity.MyBookInfoAdapter.access $ 2 (this.this $ 1) get ();
Handler localHandler = BookInfoActivity.MyBookInfoAdapter.access $ 1 (this.this $ 1);
List localList = BookInfoActivity.MyBookInfoAdapter.access $ 0 (this.this $ 1);
int i = this.val $ position;
Map localMap = (Map) localList.get (i);
new BookInfoOpenTableDialog (localContext, localHandler, localMap) show ();.
}
));

Basic Listing like this
Reply:
cited a floor ilittleone reply:
Java code 1234567891011MyBookInfoAdapter.setOnClickListener (new OnclikcListener (public void onClick (View paramView) {Context localContext = (Context) BookInfoActivity? . MyBookInfoAdapte ......



Will access $ 2 under that this is what it means. Do not understand. Extremely grateful
Reply:
$ There is an internal class, I do not know what the specific
Reply:

Xiongtai All decompile compiled Yichen not entirely the same, there are some code or garbled case, the symbol is to represent garbled. Maybe there are a lot of what specific representatives, also need to carefully analyze the entire project, just like you if you have to take personal home already written code, a decompiler, use, possible? That does not have a bad street. Other people's hard work is not in vain. Where there are already anti garbled decompile before.
Reply:
The dex2jar out with apktool decompile decompile out smli do comparison

Reply:
3rd floor, said basically correct.
dex is a separate class within the class, there is no anonymous classes and inner classes. java classes and anonymous inner classes
Dex should be compiled into an independent after class, in order to distinguish, android non confusing compilation, the original anonymous class
(Or internal) name of the tail with a $ symbol.

No comments:

Post a Comment