Android dependency visualizer. It's a tool that helps to visualize current state of your project. It's really easy to see how tight your classes are coupled.
Class coupling is one of the significant code metrics which shows how easy is to change your code. Actually the architecture of microservices is based on the idea that the modules should be low-coupled so you are able to easily replace one module with another one with the same interface. This tool helps to view whole picture of your project. Check yourself!
This project consists of the several parts:
- lib (baksmali)
- src, build (apk-dependency-graph)
- gui (d3)
- run scripts
To get more information please check our wiki page.
build/jar/apk-dependency-graph.jar you need:
- ant 1.9.9 or newer.
- at least Java 5 From terminal just move to the parent folder of the project and run
ant command. Classes will be generated to
build/classes folder and jar file will appear onto
You need at least Java 7 to run
I've prepared helpful scripts for you. All you need to do is to download and unpack the latest release and type the next command in your command line:
run.bat full\path\to\the\apk\app-release.apk com.example.test true
run.bat full\path\to\the\apk\app-release.apk nofilter false
run.bat is a path to script in your local repository,
full\path\to\the\apk\app-release.apk is a full path to the apk file you want to analize,
com.example.test is a filter. We recommend to use your package name as a filter so you will avoid unnecessary dependencies in your graph. If you don't want to filter just pass
nofilter. The last argument defines whether you want to skip inner classes on your graph (true to skip, false otherwise).
./run.sh full/path/to/the/apk/app-release.apk com.example.test true
./run.sh full/path/to/the/apk/app-release.apk nofilter false
Wait until the command finishes:
Baksmaling classes.dex... Success! Now open index.html in your browser.
It will decompile your apk and create
apk-file-name folder in the same folder where the script is. After this it will analyze the smali code and generate
gui/analyzed.js file which contains all dependencies.Now open
gui/index.html in your browser and enjoy!
Does your project look like the first or the second picture? :)
Watch demo video.
Share your awesome architecture using