I have the source code of an apk, containing a few hundred classes. I need to get the list of all calls to Android SDK methods in my source code. I thought about developing a python script to parse all sources, but there seem to be too many rules to define. I fell it would be too complicated.
Does anyone has an idea ? Or are there existing tools that can do it ?
For exemple, if the code looks like this :
class MyActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
if (savedInstanceState.containsKey("toto")) {
setContentView(R.layout.mylayout);
this.uselessMethod();
}
}
public int uselessMethod() {
new Thread();
}
}
I want to get something like this :
- java.lang.Thread#<'init'>()
- android.app.Activity#onCreate(Bundle) void
- android.app.Activity#setContentView(int) void
- android.os.Bundle#containsKey(String) boolean
Thanks.