apk反编译回来的代码跟正向开发的代码语法有出入,看不懂.
本帖最后由 szuzsq 于 2013-09-27 12:09:38 编辑 反编译涉及到的工具有3个:apktool1.5.2, dex2jar-0.0.9.15, jd-gui.exe
例如枚举类型:
源代码为:
package com.example.test;
import android.os.Bundle;
import android.app.Activity;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
enum TestEnum {
one, two, three, four, five, six, seven, eight, nine, ten;
}
package com.example.test;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity
{
protected void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
setContentView(2130903040);
}
}
enum TestEnum
{
static
{
three = new TestEnum("three", 2);
four = new TestEnum("four", 3);
five = new TestEnum("five", 4);
six = new TestEnum("six", 5);
seven = new TestEnum("seven", 6);
eight = new TestEnum("eight", 7);
nine = new TestEnum("nine", 8);
ten = new TestEnum("ten", 9);
TestEnum[] arrayOfTestEnum = new TestEnum[10];
arrayOfTestEnum[0] = one;
arrayOfTestEnum[1] = two;
arrayOfTestEnum[2] = three;
arrayOfTestEnum[3] = four;
arrayOfTestEnum[4] = five;
arrayOfTestEnum[5] = six;
arrayOfTestEnum[6] = seven;
arrayOfTestEnum[7] = eight;
arrayOfTestEnum[8] = nine;
arrayOfTestEnum[9] = ten;
}
}
public class BinderProxy {
private IBinder mBinder;
private ServiceConnection mCon = new ServiceConnection() {
public void onServiceConnected(ComponentName paramComponentName, IBinder paramIBinder) {
//问题出现在这里了,从头到尾,我都没找着access$002有这个函数..问问大家这个是怎么样回事...它原始的代码可能是怎么样子的?????
BinderProxy.access$002(BinderProxy.this, paramIBinder);
}
public void onServiceDisconnected(ComponentName paramComponentName) {
BinderProxy.access$002(BinderProxy.this, null);
}
};
//以下省略一些代码............
}