/android_development_shell_tools

Development Shell Tools - http://adriandc.github.io/android_development_shell_tools

Primary LanguageShellApache License 2.0Apache-2.0

Android Development Shell Tools

Disclaimer

  • No wrong use or side effect of this project shall involve the responsibility of its developers.
    The scripts are shared as they are. Improvements are regularly done based on personal use
    and developers reports, but no instantaneous changes shall be requested by anyone.

    #include <std_disclaimer.h>
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */

About the project

  • The project android_development_shell_tools started in 2015
    to ease Android development, ADB usage, Git commands and related projects.
    Originally a private set of scripts, I made the project evolve towards
    a publically shareable set of tools that can be easily used and even configured
    by anyone interested in using advanced development tools and in winning time.
    It provides many functions and shortcuts to ease Android development.

  • The sources written and shared here are either meant to be used as they are,
    or to serve as a reference for commands and functions an Android developer needs.
    Developers or beginners interested in Shell commands and scripting
    can look into my sources and find documented commands and syntaxes,
    which can be used as a reference for Shell scripting and help making their own.


How to update with upstream changes

  • To keep a local sync of 'android_development_shell_tools' updated with upstream changes,
    simply run the shtoolssync; command and the updates will be downloaded.
    Local modifications will be lost through the update (read about git stash pop in that case)
    and the newest commits / improvements will be added to your available tools.

  • If you intend to keep personal or unfinished functions along this project,
    you can also look at the android_development_shell_users project, a minimal variant
    that allows holding functions or macros separately (like credentials).


About the documentation and structure

  • The linked documentation holds a reference point to all functions and macros
    that this project provides, which details their purpose, and if present,
    details the <required> or [optional] parameters available.

  • The documentation is completely dynamically built, through a function I wrote
    to parse the whole project and to create this unique reference point.
    Functions and macros seen there will exist as presented in the documentation,
    there is no risk of irregularities between the list and the actual sources.

  • Scripts flagged "Standalone Import Ready" and starting with source <(curl -Ls...
    are able to be directly sourced through the provided commands in any terminal
    without the need of this project being synced locally or loaded in the Shell.
    This can be useful when using a different computer, when running from a root Shell,
    or even if you need a few functions for work to ease something.


Project and documentations


How to install the project

  • Clone the project locally with git:
    git clone https://github.com/AdrianDC/android_development_shell_tools -b master;

  • Load the project in the current Shell terminal:
    source /path/to/folder/android_development_shell_tools.rc;

  • Permanently load the project: Open ~/.bashrc, adapt and add:

    export ANDROID_DEV_DRIVE='/media/../AndroidDev';
    source '/.../android_development_shell_tools.rc';
  • The ANDROID_DEV_DRIVE variable is a folder used for Android ROMs and kernels.
    You do not need it, but a few functions rely on it to ease things.


How to contribute to the project

  • Perform the scripts modifications, fixes or additions
  • Validate the code thanks to ShellCheck with shtoolscheck;
  • Update README.md documentation with shtoolsreadme;
  • Commit the changes with git (refer to older commits for style)
  • Push your changes and create a pull-request once ready

Project contributors and modules

  • AdrianDC : android_development_shell_tools creator and main developer
  • Caio99BR : android_development_shell_tools user and contributor
  • multirom-dev : libbootimg evolutions originally by Tassadar
  • xiaolu : mkbootimg_tools submodule original developer