Git Product home page Git Product logo

apk-dependency-graph's Introduction

Apk Dependency Graph (ADG)

Build Status version Android Arsenal

The repo is not supported anymore

Class dependency visualizer. Only apk file is needed.
Class coupling is one of the significant code metrics that shows how easy is to change, maintain and test the code. This tool helps to view whole picture of the project.

Table of contents

Usage

Some helpful scripts are prepared for you. All you need to do is to download and unpack the latest release and type the next command in your command line:

For Windows:

run.bat full\path\to\the\apk\app-release.apk full\path\to\the\filterset.json

Where:

  • 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
  • full\path\to\the\filterset.json is a full path to the filterset file

The tool is provided with the default filterset. However, you're highly encouraged to customize it. Read filter instructions for the details.

For Unix:

./run.sh full/path/to/the/apk/app-release.apk full/path/to/the/filterset.json

Wait until the command finishes:

Baksmaling classes.dex...
Analyzing dependencies...
Success! Now open index.html in your browser.

It will decompile your apk and create output/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!

Compile

At least Java 8 is needed to compile and run the jar file.

Ways to compile build/jar/apk-dependency-graph.jar:

>> gradle build (Gradle 5.0 or newer)
>> gradlew build (Gradle Wrapper)

Classes will be generated to build/classes folder and jar file will appear onto build/libs folder.

To get more information please check our wiki page.

Examples

Here is the sample of good architecture with low class coupling:
Good sample

And this one looks like a spaghetti:
Good sample

Does your project look like the first or the second picture? :)

Demo

Watch demo video.

Contributors

I want to say thank you to all the people who made even tiny pull request. This project is intended to improve current state of Android architecture all over the world so each detail is important. In the contributors page you can find a list of people who have found some time to improve this tool.

Credits

There is the same tool for iOS: https://github.com/PaulTaykalo/objc-dependency-visualizer
I have used gui/index.html of that project. Thanks Paul for the great tool.

apk-dependency-graph's People

Contributors

alexzaitsev avatar martinbreuerf2m avatar supinepandora43 avatar victorrattis avatar warrenfaith avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.