FORUMS
Remove All Ads from XDA

[TOOLS] Advanced Development Shell Tools

2,161 posts
Thanks Meter: 12,646
 
By AdrianDC, Recognized Developer on 15th June 2017, 10:15 PM
Post Reply Email Thread


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.`
    Code:
       #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 advanced_development_shell_tools started in 2015
    to ease Android and Linux developments, 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 'advanced_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/advanced_development_shell_tools -b master;`
  • Load the project in the current Shell terminal:
    `source /path/to/folder/advanced_development_shell_tools.rc;`
  • Permanently load the project: Open `~/.bashrc`, adapt and add:
    Code:
       export ANDROID_DEV_DRIVE='/media/../AndroidDev';
       source '/.../advanced_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 : advanced_development_shell_tools creator and main developer
  • Caio99BR : advanced_development_shell_tools user and contributor
  • multirom-dev : libbootimg evolutions originally by Tassadar
  • xiaolu : mkbootimg_tools submodule original developer

XDA:DevDB Information
Advanced Development Shell Tools, Tool/Utility for all devices (see above for details)

Contributors
AdrianDC
Source Code: https://github.com/AdrianDC/advanced...nt_shell_tools


Version Information
Status: Stable

Created 2017-06-15
Last Updated 2018-12-23
The Following 19 Users Say Thank You to AdrianDC For This Useful Post: [ View ]
 
 
15th June 2017, 10:15 PM |#2  
AdrianDC's Avatar
OP Recognized Developer
Flag Île-de-France
Thanks Meter: 12,646
 
More
Reserved
[ Previews ] gerritssh : Advanced Gerrit SSH interface

[ Previews ] repochanges : Detect all repo projects differences

[ Previews ] adbp : Advanced recursive adb files pusher

[ Previews ] adbside : ADB sideload helper

[ Previews ] gitlo* : Git logs and search helpers

[ Previews ] gerritreview : Gerrit review uploader

[ Previews ] sepaud : Logs sepolicy analyzer

[ Previews ] adbmrominjector : MultiROM kernel image injector

[ Previews ] gitstat : Git history with remote comparator

[ Previews ] binarysearch,binaryeditor : Binary files parser and searcher/editor
The Following 6 Users Say Thank You to AdrianDC For This Useful Post: [ View ]
15th June 2017, 10:15 PM |#3  
AdrianDC's Avatar
OP Recognized Developer
Flag Île-de-France
Thanks Meter: 12,646
 
More
Reserved
[ Samples ] Committing modifications with git (git_commit)
  • Add new code changes with confirmation (y: Yes / n: No / d: Skip file / q: Stop)
    `gitap`
  • Commit changes (with GPG signing if enabled)
    `gitc`
  • Add Change-Id to the commit (optional, once per project)
    `gitcid`
  • Add all files without patch, including untracked files
    `gitaa`
  • Amend changes to the commit without message changes
    `gitcae`
  • Amend changes and message of the commit
    `gitca`
  • Sign-off the commit with your identifications
    `gitcs`


[ Samples ] Cherry-pick and fix conflicts (git_fetch, git_merge)
  • Cherry-pick a commit SHA1 reference (already fetched)
    `gitcp SHA1_number`
  • Cherry-pick a commit with an URL (GitHub, ...)
    `gitcpup commit_url`
  • Open the merge tool to fix conflicts (with meld for example)
    `gitmt`
  • Open the file editor for manual conflicts fixing
    `gitmte`
  • Commit the picked and resolved commit
    `gitc`

[ Samples ] Rebase commits and cleanup (git_commit, git_rebase)
  • Reorder the last 8 commits (interactively)
    `gitr 8`
  • Reorder since a commit SHA1 reference (interactively)
    `gitrt SHA1_number`
  • Continue the commits rebase
    `gitrc`
  • Skip the commit from rebase
    `gitrs`
  • Abort the commits rebase
    `gitra`
  • Delete all unmerged differences
    `gitcl`
  • Reset to a specific SHA1 reference
    `gitrt SHA1_number`
  • Reset to a FETCH_HEAD after fetching
    `gitrh`
  • Remove the last commit from HEAD
    `gitro`
  • Amend the last comment into the previous one
    `gitsl`

[ Samples ] Search through files (host_grep, tools)
  • Search directory for a word or multiple words
    `gs word_to_search`
    `gs 'words to search`
  • Search in all Android.mk files
    `gca word_to_search`
    `gca 'words to search'`
  • Search inside binary files (like libraries)
    `binarysearch word`
  • Replace inside binary files (like libraries)
    `binaryeditor word new_word`

[ Samples ] Android devices and ROM helpers (repo_helpers, tools)
  • Return to repository root
    `croot`
  • Open repository manifests
    `reporoomserv`
  • Sync repository with optimized flags
    `reposy`
  • Initiate device environments based on AOSP or LineageOS
    `repos device_codename`
  • Switch between multiple local_manifests_* folders
    `reposwitcher`
  • See the CCache status and usage while building
    `repocache`
  • Compare device overlays with their original .xml
    `overlaycompare path/to/overlay.xml`

[ Samples ] Packages and ROM compilations helpers (release_helpers, release_packages)
  • Properly cleanup necessary outputs for rebuilds
    `outdevcl device_name`
  • Build a package quickly without ninja
    `mmo paths_or_module_names`
  • Build a package quickly and install results
    `mmi paths_or_module_names`
  • Build a package quickly and package into .zip
    `mmmzip paths_or_module_names`
  • Package a git commit into a .zip
    `gitzip SHA1_number`
  • Sign a zip for secured recoveries
    `signzip zip_to_sign.zip`
The Following 7 Users Say Thank You to AdrianDC For This Useful Post: [ View ]
Caio99BR
21st June 2017, 09:11 PM |#4  
Guest
Thanks Meter: 0
 
More
WOW... first!

Thanks for these tools, inclusive fbootk and makekernel, the best tools :P
The Following 2 Users Say Thank You to For This Useful Post: [ View ] Gift Ad-Free
24th June 2017, 09:47 AM |#5  
robcore's Avatar
Senior Member
Thanks Meter: 740
 
More
You had me at meld <3
The Following 2 Users Say Thank You to robcore For This Useful Post: [ View ] Gift robcore Ad-Free
5th November 2017, 08:47 PM |#6  
Thank you! This should help greatly! I'll be following this project for sure 👍

Sent from my Samsung SM-J327P using XDA Labs
The Following User Says Thank You to Sands207 For This Useful Post: [ View ] Gift Sands207 Ad-Free
6th November 2017, 12:47 PM |#7  
Senior Member
Thanks Meter: 13
 
More
I'm into programming and I'd love to make my own Android ROM. Where can I learn to start?
The Following User Says Thank You to keeganjk For This Useful Post: [ View ] Gift keeganjk Ad-Free
7th January 2018, 05:37 PM |#8  
AdrianDC's Avatar
OP Recognized Developer
Flag Île-de-France
Thanks Meter: 12,646
 
More
In the recent weeks, the project evolved massively to a new "clustered" structure,
resulting in part of the project being called kits that provide a choice of what you want to use.


[ Previews ] shtoolssync : Download new android_development_shell_tools changes

[ Previews ] shtoolsnews : Display android_development_shell_tools news notifications

[ Previews ] shtoolskits : Toolkits selection for android_development_shell_tools

[ Previews ] shtools- : Options menu for android_development_shell_tools
The Following 8 Users Say Thank You to AdrianDC For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes