Coder Social home page Coder Social logo

adb-multi's Introduction

ADB-multi

A simple ADB wrapper to manage your development needs for multiple devices.

Prerequisites

  • Common sense
  • Basic linux environment knowledge (I don't know what you need ADB for if you don't have it)
  • ADB correctly installed in $PATH
  • ~/bin directory inside $PATH
  • CUSTOM $PATH variable directory inside $PATH (check #L32)
  • multiple ADB enabled devices

What it's for

We all hate it when we try to quickly type an adb command like adb push only to be confronted by this hell:

error: more than one device/emulator

Of course, this is a byproduct of having simultaneously connected a lot of adb enabled devices to our development PC, and adb devices is having a party of unknown and random numbers (No, I don't remember what 008343w18bdde21c is).

ADB-multi is here to solve this.

How it works

It is an adb wrapper/script generation program which wraps around the standard adb commands and provides

  • easier connections between devices
  • valuable info during the programming, like the current connected device

The screenshot speaks for itself!

Script generation

If run with generate as the argument, the script will find your currently connected ADB devices, and create 5 scripts per device inside your CUSTOM $PATH variable directory. You can also specify the device names:

Current scripts:

  • adb-$FILENAME: standard ADB wrapper, with current device info. Expect everything to work as it should (everything is piped through).
  • adb-$FILENAME-push: automates one of the most usual adb push commands, and pushes the file to a specified $ADBDESTDIR directory (script variable). Default is /sdcard:
    adb push $FILE /sdcard
    
  • adb-$FILENAME-screenshot: grabs a screenshot from the device using the screencap utility and saves it into the development's machine $SCREENDIR folder (script variable).
  • adb-$FILENAME-activity: finds out the current activity path shown on the device
  • adb-$FILENAME-install: installs an apk to the device, and handles the infamous case of "-r" argument on its own

Installation

Find a way to place adb-multi inside your $PATH. My preferred method is cloning the repository inside ~/bin and then adding ~/bin/adb-multi and CUSTOM $PATH variable to my $PATH, but you can improvise. As long as you can type adb-multi and the scripts answers, you're good.

it also assumes you have already installed the adb binary.

adb-multi's People

Contributors

kreach3r avatar msfjarvis avatar

Watchers

 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.