BGraph is a tool designed to generate dependencies graphs from Android.bp soong files.

Overview

BGraph

BGraph is a tool designed to generate dependencies graphs from Android.bp soong files.

Overview

BGraph (for Build-Graphs) is a project aimed at create build graphs from blueprints in AOSP and querying those graphs.

In short, this project builds/uses Unified Dependency Graph for the Android Open Source Project by parsing and linking modules defined in the Android build system Soong.

Use-cases

You should use this tool if you want to find:

  • all the dependencies of a source file in AOSP;
  • all the sources involved in the building of a target in AOSP;
  • common dependencies between two targets.

Usage

% bgraph --help                                                       
Usage: bgraph [OPTIONS] COMMAND [ARGS]...

  BGraph - generate and query build dependency graphes.

  BGraph is used to manipulate build dependency graphs generated from
  blueprint files. The main commands are:

      - generate : used to generates multiples graphs

      - query: used to query a previously generated graph

  To get more help, see the online documentation.

Options:
  -v, --verbose         Activate verbose output  [default: False]
  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.

  --help                Show this message and exit.

Commands:
  generate         Generate BGraph's from a mirror dir.
  generate-single  Generate a BGraph from a branch.
  list             List the BGraph already generated.
  query            Query a BGraph.

Installation

Using poetry

poetry install bgraph

Using pip

pip install bgraph

Using docker

docker build -f docker/Dockerfile -t bgraph .

This will create a container with git, repo and bgraph and will take some time (because it compiles git from the source).

See Docker for more instructions.

Prerequisites

  • python3.8

Optional dependencies for the builder:

  • repo
  • git (>25): since we're using partial-checkouts, a modern version of git is required
  • at least 1Go of free disk space
  • (Optional: AOSP mirror)

See Building from AOSP for more details.

Documentation

Documentation

Licence

Apache-2

Contributing

Contributions are always welcome!

See the Contribution documentation for details on all you need to know about contributing.

Authors

You might also like...
A simple interpreted language for creating basic mathematical graphs.
A simple interpreted language for creating basic mathematical graphs.

graphr Introduction graphr is a small language written to create basic mathematical graphs. It is an interpreted language written in python and essent

Mapomatic - Automatic mapping of compiled circuits to low-noise sub-graphs

mapomatic Automatic mapping of compiled circuits to low-noise sub-graphs Overvie

Kglab - an abstraction layer in Python for building knowledge graphs
Kglab - an abstraction layer in Python for building knowledge graphs

Graph Data Science: an abstraction layer in Python for building knowledge graphs, integrated with popular graph libraries – atop Pandas, RDFlib, pySHACL, RAPIDS, NetworkX, iGraph, PyVis, pslpython, pyarrow, etc.

The visual framework is designed on the idea of module and implemented by mixin method

Visual Framework The visual framework is designed on the idea of module and implemented by mixin method. Its biggest feature is the mixins module whic

Python script to generate a visualization of various sorting algorithms, image or video.
Python script to generate a visualization of various sorting algorithms, image or video.

sorting_algo_visualizer Python script to generate a visualization of various sorting algorithms, image or video.

Generate a roam research like Network Graph view from your Notion pages.
Generate a roam research like Network Graph view from your Notion pages.

Notion Graph View Export Notion pages to a Roam Research like graph view.

Generate a 3D Skyline in STL format and a OpenSCAD file from Gitlab contributions
Generate a 3D Skyline in STL format and a OpenSCAD file from Gitlab contributions

Your Gitlab's contributions in a 3D Skyline gitlab-skyline is a Python command to generate a skyline figure from Gitlab contributions as Github did at

script to generate HeN ipfs app exports  of GLSL shaders
script to generate HeN ipfs app exports of GLSL shaders

HeNerator A simple script to generate HeN ipfs app exports from any frag shader created with: GlslViewer GlslEditor The Book of Shaders glslCanvas VS

A script written in Python that generate output custom color (HEX or RGB input to x1b hexadecimal)
A script written in Python that generate output custom color (HEX or RGB input to x1b hexadecimal)

ColorShell ─ 1.5 Planned for v2: setup.sh for setup alias This script converts HEX and RGB code to x1b x1b is code for colorize outputs, works on ou

Comments
  • Unable to generate

    Unable to generate

    Generate

    Steps to reproduce

    mkdir test && \
    cd test && \
    mkdir bgraphs && \
    python3.8 -m venv venv && \
    source venv/bin/activate && \
    pip install bgraph && \
    bgraph generate bgraphs 'https://android.googlesource.com/'
    

    Error Log

    2021-12-13 16:39:17,862 - bgraph.builder.builder - INFO - Found 1174 branches
    2021-12-13 16:39:17,863 - bgraph.builder.builder - INFO - Start composing for android-1.6_r1.1_
    2021-12-13 16:39:27,625 - bgraph.builder.builder - ERROR - Unable to init the repository. Verify that the mirror is correct.
    2021-12-13 16:39:27,625 - bgraph.builder.builder - INFO - Start composing for android-1.6_r1.2_
    2021-12-13 16:39:41,370 - bgraph.builder.builder - ERROR - Unable to init the repository. Verify that the mirror is correct.
    2021-12-13 16:39:41,370 - bgraph.builder.builder - INFO - Start composing for android-1.6_r1.3_
    
    ...
    
    opened by seanybaggins 1
Releases(v0.1.0)
Generate knowledge graphs with interesting geometries, like lattices

Geometric Graphs Generate knowledge graphs with interesting geometries, like lattices. Works on Python 3.9+ because it uses cool new features. Get out

Charles Tapley Hoyt 5 Jan 3, 2022
This tool is designed to help administrators get an overview of their Active Directory structure.

This tool is designed to help administrators get an overview of their Active Directory structure. In the group view you can see all elements of an AD (OU, USER, GROUPS, COMPUTERS etc.). In the user view one sees all users according to their Manager/Manager of Hierarchy.

deexno 2 Oct 30, 2022
Draw interactive NetworkX graphs with Altair

nx_altair Draw NetworkX graphs with Altair nx_altair offers a similar draw API to NetworkX but returns Altair Charts instead. If you'd like to contrib

Zachary Sailer 206 Dec 12, 2022
Draw interactive NetworkX graphs with Altair

nx_altair Draw NetworkX graphs with Altair nx_altair offers a similar draw API to NetworkX but returns Altair Charts instead. If you'd like to contrib

Zachary Sailer 156 Feb 6, 2021
By default, networkx has problems with drawing self-loops in graphs.

By default, networkx has problems with drawing self-loops in graphs. It makes it hard to draw a graph with self-loops or to make a nicely looking chord diagram. This repository provides some code to draw self-loops nicely

Vladimir Shitov 5 Jan 6, 2022
Personal IMDB Graphs with Bokeh

Personal IMDB Graphs with Bokeh Do you like watching movies and also rate all of them in IMDB? Would you like to look at your IMDB stats based on your

null 2 Dec 15, 2021
A D3.js plugin that produces flame graphs from hierarchical data.

d3-flame-graph A D3.js plugin that produces flame graphs from hierarchical data. If you don't know what flame graphs are, check Brendan Gregg's post.

Martin Spier 740 Dec 29, 2022
Here are my graphs for hw_02

Let's Have A Look At Some Graphs! Graph 1: State Mentions in Congressperson's Tweets on 10/01/2017 The graph below uses this data set to demonstrate h

null 7 Sep 2, 2022
Python ts2vg package provides high-performance algorithm implementations to build visibility graphs from time series data.

ts2vg: Time series to visibility graphs The Python ts2vg package provides high-performance algorithm implementations to build visibility graphs from t

Carlos Bergillos 26 Dec 17, 2022
Flame Graphs visualize profiled code

Flame Graphs visualize profiled code

Brendan Gregg 14.1k Jan 3, 2023