An ADB wrapper made in node js. For mobile debugging

Overview

Adb-Wrapper

An awesome ADB wrapper made in node js to use adb just with functions.
· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

The adb wrapper provides a flexibal API to execute adb commands.
A user can also pass the custom the adb path to it.

(back to top)

Getting Started

If you dont have ADB installed in your system, dont worry. It has inbuilt adb, you could also provide a path for adb explicity, which the module will use.

Prerequisites

Node js and an initialized npm folder

  • npm
    npm install adb-wrapper

See the open issues for a full list of proposed features (and known issues).

(back to top)

Usage

After installation of the module into your project, you can take this simple example.

import ADB from "adb-wrapper";

async function main() {
  var getAdbInstalled = await ADB.isAdbInstalled();

  if (!getAdbInstalled) return console.log("Adb is not installed");

  var deviceList = await ADB.deviceList();

  console.log(`Connected Devices ${JSON.stringify(deviceList)}`);
}

main();

There will be more functions in upcoming days as we are actively developing it. Watch it to get notified whenever we add something new to it. 😉

(back to top)

Methods

Here are the list of methods you can use.

  • deviceList()
    Returns: { type: string, udid: string, port: string} Returns Object of all detected devices by adb.

  • setCurrentActiveDevice()
    Prams: device (device udid)
    set the current active device

  • isAdbInstalled()
    Returns: boolean
    detect if adb is installed or not

  • setAdbExplicitPath()
    Params: path (folder path of the adb)
    if the adb is not installed, you can manually download it and provide the path of the folder where adb.exe exsists

  • killServer()
    kill the adb server

  • startServer()
    start the adb server

  • tcpip()
    Prams: port (port on which to start the adb server listening to)
    adb listen to a port

  • connectRemote()
    Params: {ip( of the remote host), port (of remort host)} (folder path of the adb)
    connect to a device on a remote host

  • disconnectRemote()
    Params: {ip( of the remote host), port (of remort host)} (folder path of the adb)
    disconnect to a device on a remote host

    Please set the current active device to which the command will executed, some function wont work. Do it by calling setCurrentActiveDevice() and providing the udid of the device.
    You can get the devices udid by calling the function deviceList()

  • installApp()
    Params: apkPath (path of the apk)
    Install the app to the current active android device

  • uninstallApp()
    Params: packageId (the package id of the app to uninstall)
    uninstall the app given by the package id

  • execShellCmd()
    Params: shellCmd (shell command) note: dont include shell in it
    its equivalent to adb shell. you can execute the shell commands using it

  • getCurrentOpendedActivity()
    Returns: packageInfo (of the current Activity Openned)
    it will return the info of the current openned activity, including the package id of the app.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Author Name - @amir-alam-44378416b - [email protected]

Project Link: https://github.com/MrSharpp/adb-wrapper-node-js

(back to top)

You might also like...

Quo is a (free) debugging companion app to help you debug dumped variables, the dumped variables will appear in this Quo client instead of the traditional way which is often tedious.

Quo is a (free) debugging companion app to help you debug dumped variables, the dumped variables will appear in this Quo client instead of the traditional way which is often tedious.

Quo is a debugging companion to help you debug dumped variables, the dumped variables will appear in this Quo client instead of via the traditional way which is often tedious.

Dec 25, 2022

GraphErr is an open-source error handling library for GraphQL implementations in Deno. It's a lightweight solution that provides developers with descriptive error messages, reducing ambiguity and improving debugging.

GraphErr is an open-source error handling library for GraphQL implementations in Deno. It's a lightweight solution that provides developers with descriptive error messages, reducing ambiguity and improving debugging.

GraphErr Descriptive GraphQL error handling for Deno/Oak servers. Features Provides additional context to GraphQL's native error messaging for faster

Nov 1, 2022

🛠️ A simple GUI of Ethereum tools and utilities for debugging

Ethereum DevTools GUI A simple GUI of Ethereum tools and utilities for debugging Demo https://lab.miguelmota.com/ethereum-devtools Tools ABI viewer sh

Oct 31, 2022

1kb js library contains development debugging, error monitoring and reporting, user problem localization features

1kb js library contains development debugging, error monitoring and reporting, user problem localization features

1kb js library contains development debugging, error monitoring and reporting, user problem localization features

Dec 22, 2022

MerLoc is a live AWS Lambda function development and debugging tool. MerLoc allows you to run AWS Lambda functions on your local while they are still part of a flow in the AWS cloud remote.

MerLoc is a live AWS Lambda function development and debugging tool. MerLoc allows you to run AWS Lambda functions on your local while they are still part of a flow in the AWS cloud remote.

MerLoc MerLoc is a live AWS Lambda function development and debugging tool. MerLoc allows you to run AWS Lambda functions on your local while they are

Dec 21, 2022

Intuitive and dynamic Chrome Dev Tool Extension for Three.js debugging

Intuitive and dynamic Chrome Dev Tool Extension for Three.js debugging

sceneSniff An intuitive and dynamic Chrome Dev Tool Extension for Three.js debugging sceneSniff is an in browser developer tool for Three.js projects.

Dec 8, 2022

This project is for hacktoberfest to encourage new developer and open source developers to contribute to open source and improve skills which require debugging, write testable code, industry standards, problem solving and many more,

This project is for hacktoberfest to encourage new developer and open source developers to contribute to open source and improve skills which require debugging, write testable code, industry standards, problem solving and many more,

🚀 Blog project for hacktoberfest In this repository, you can find issues related to a blog project that is built on top of Next.js. The project is a

Oct 9, 2022

Debug Extension for debugging backseat (.bs) and bssembler (.bsm) applications.

Debug Extension for debugging backseat (.bs) and bssembler (.bsm) applications.

Backseat Debug Debug Extension for debugging backseat (.bs) and bssembler (.bsm) applications. This project is still a work in progress as are the bac

Oct 15, 2022

Gyazo API wrapper made in TypeScript. *For now, only upload feature.

wrap-gyazo Gyazo API wrapper made in TypeScript. *For now, only upload feature. Installation npm i wrap-gyazo Register an application with Gyazo. Gyaz

Jan 11, 2022
Releases(initial)
Owner
Amir Alam
Indie Game Developer, Backend Web Developer
Amir Alam
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
This is an application that entered the market with a mobile application in real life. We wrote the backend side with node.js and the mobile side with flutter.

HAUSE TAXI API Get Started Must be installed on your computer Git Node Firebase Database Config You should read this easy documentation Firebase-Fires

Muhammet Çokyaman 4 Nov 4, 2021
Smooth mobile touch slider for Mobile WebApp, HTML5 App, Hybrid App

iSlider iSlider is a lightweight, high-performant, no library dependencies cross-platform slide controller. It can help handling most sliding effects,

Baidu BEFE 1.7k Nov 25, 2022
基于React开发的新一代web调试工具,支持React组件调试,类似于Chrome Devtools。A Lightweight, Easy To Extend Web Debugging Tool Build With React

English | 简体中文 基于React开发的移动web调试工具 更新日志 简单易用 功能全面 易扩展 高性能 使用cdn方式,一键接入 类Chrome devtools, 内嵌React开发者工具,支持日志,网络,元素,代理,存储,性能等, 具有更好的网络捕获能力和丰富的日志展现形式 暴露内部

腾讯TNTWeb前端团队 236 Dec 25, 2022
A Knative debugging tool.

__ _____.__ _____/ |__/ ____\ | ______ / ___\ __\ __\| | \____ \

Jeff 9 Oct 28, 2022
Svelte debugging tool for re-rendering components

resvelte README This is the README for your extension "resvelte". After writing up a brief description, we recommend including the following sections.

OSLabs Beta 44 Oct 4, 2022
Quickly create console debugging information for multiple languages.

Debugger for Console Quickly create console debugging information for multiple languages. This plugin uses antfu/starter-vscode as the initial templat

Chestnut 5 Oct 21, 2022
A docker container with a wide variety of tools for debugging and setting up micro-services

Frame One Software Placeholder There are numerous times during the dev ops deployments, that a placeholder container is needed. In the past, Frame One

Frame One Software 8 May 29, 2022
Typescript & Debugging for Bitburner

Bitburner Scripts + Typescript + Local Server A Typescript template project with debugging support, import rewrites and developer convenience. How to

Mio Bambino 8 Nov 28, 2022