Static Mode

When the tool is launched without the option, only a quick analysis of the Manifest is executed. The tool enumerate:

  • Dagerous functionnality

  • Permission used and created

  • Activities exported

  • Service exported

  • Broadcast receiver exported

  • Provider

alternate text

Advanced

To analyse the source code of the APK and not only the manifest or the other xml files. Option –tree can be used

This option allows the tool to browse all nodes of the AST build with the source code and create some hook on each interesting node of the APK

asthook example.apk --tree --tree_path /com/

Note

If you want to restrict analysis to a part of the code you should used option –tree_path <path>

Warning

Be careful when you used –tree_path if you don’t put a / at is not seeking the directory but the file begin by last word specify for instance /com seek file com and /com/ seek directory

Display AST

To have a render of the ast browse you can call –graph_ast will produce a pdf like this one:

AST

Plugins

To use plugins available each plugin should have documentation you can find all plugins available here:

FAQ

When you use to generate APK if you have this error:

PARSE ERROR:
unsupported class file version XX

You version of javac is not compatible with dx follow this guide should fix your issue : https://www.javahelps.com/2015/03/install-oracle-jdk-in-ubuntu.html