# adbb

> Android adb command helper utility, for easier Android development.

Latest version **1.2.0** (published 2023-09-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install adbb
pnpm add adbb
yarn add adbb
bun add adbb
```

Provides the command `adbb`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-09-07 |
| First published | 2020-07-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 12 |
| Unpacked size | 107 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Ikenna Agbasimalo |
| Maintainers | ikmich |
| Keywords | adb, adbb, android adb, android debug bridge, android |

## Links

- npm: https://www.npmjs.com/package/adbb
- Repository: https://github.com/ikmich/adbb-cli
- Homepage: https://github.com/ikmich/adbb-cli#readme
- Issues: https://github.com/ikmich/adbb-cli/issues
- npm.io page: https://npm.io/package/adbb

## Dependencies (12)

- [ip](https://npm.io/package/ip.md) ^1.1.8
- [conf](https://npm.io/package/conf.md) ^10.2.0
- [chalk](https://npm.io/package/chalk.md) ^5.0.1
- [clear](https://npm.io/package/clear.md) ^0.1.0
- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [ts-node](https://npm.io/package/ts-node.md) ^10.9.1
- [date-fns](https://npm.io/package/date-fns.md) ^2.29.2
- [inquirer](https://npm.io/package/inquirer.md) ^9.2.10
- [prettier](https://npm.io/package/prettier.md) ^2.7.1
- [cross-env](https://npm.io/package/cross-env.md) ^7.0.3
- [typescript](https://npm.io/package/typescript.md) ^4.8.2
- [ts-node-dev](https://npm.io/package/ts-node-dev.md) ^2.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2023-09-07
- 1.0.0 — 2022-09-04
- 1.1.0-beta — 2020-12-04
- 1.0.2-beta — 2020-07-17
- 1.0.1-beta — 2020-07-17
- 1.0.0-beta — 2020-07-17

## README

`adbb` provides a little boost to the Android ADB command set to make your Android development work easier!

## Usage on Windows OS

- Shell commands specific to Windows OS are not currently implemented. Full support for Windows OS is planned for a
  future release.

## Installation

#### Install with npm

```shell script
npm install -g adbb
```

#### Install with yarn

```shell script
yarn global add adbb
```

## Command summary

```
adbb [command]

Commands:
  adbb devices                List connected devices
  adbb packages               List installed packages
  adbb wifi                   Connect the device via wifi
  adbb clear                  Clear data for application
  adbb emulator               Start an emulator. Shows available emulators for u
                              ser to select
  adbb ip                     Show the device IP address(es)
  adbb restart                Reset adb server
  adbb screenshot             Take screenshot of the device screen
  adbb path                   Get path of installed application package
  adbb ping                   Ping the device ip address to check the wifi conne
                              ction
  adbb unset-default-package  Unset currently set default reference package
  adbb set-default-package    Set default reference package for commands
  adbb restart                Reset the adb connection
  adbb uninstall              Uninstall an application
  adbb screenrecord           Record the screen for maximum of 3 minutes

Options:
      --version          Show version number                           [boolean]
      --verbose          Long output                                   [boolean]
  -f, --filter           Filter to apply to command output              [string]
      --wifi             Connect adb via wifi                          [boolean]
  -x, --disconnect       Disconnect device connected via tcpip (wifi)  [boolean]
  -s, --sid, --serialId  Device serial id                               [string]
      --package, --pkg   Set the target application package             [string]
      --unset            Unset a value                                 [boolean]
  -l, --list             Display items                                 [boolean]
      --open             Open file or resource                         [boolean]
      --get                                                            [boolean]
      --getAll                                                         [boolean]
      --purge                                                          [boolean]
      --help             Show help                                     [boolean]
```

## Commands

#### `devices`

List connected devices

```shell script
adbb devices

# Running `adbb` alone also lists connected devices.
adbb

# Display extra information
adbb devices -v

# Display devices info in json format. Implies the `-v` option
adbb devices -j

# Display devices info in a tabular format. Implies the `-v` option
adbb devices -g
```

#### `wifi`

Connect a device for debugging via Wi-Fi connection.

```shell script
adbb wifi
```

**Options**

- `-x` | `--disconnect`  
  Disconnect the device from the Wi-Fi connection.

#### `pkgs` | `packages`

List application packages installed on the device.

**Options**

- `-f` | `--filter`  
  Applies filter to return packages that contain the specified string.

```shell script
adbb pkgs -f org.app
```

You can also filter using the more convenient filter directive, `:`, as a prefix just before the filter string.  
**Example**

```shell script
adbb pkgs :org.app
```

#### `emu` | `emulator`

Run `adbb emu` without any options to launch an emulator. You are prompted with the list of available emulators to
select from.

**Options**

- `-l` | `--list`  
  List the available emulators without launching any.

#### `set-default-package` | `set-default-pkg`

Specify the reference package name to use while using `adbb` to avoid having to type the package name every time.

**Options**

- `--unset`  
  Passing this option deletes a previously set reference package.

**Example**

```shell script
# Set
adbb set-pkg org.app.cool_app
adbb set-pkg --unset
```

#### `unset-default-package` | `unset-default-pkg`

Deletes a previously set reference package name.

##### Example

```shell script
adbb unset-pkg
```

#### `clear <package>`

Clear application data for specified package. If no package is specified, you will be prompted to input the intended
application package.

**Options**

- `--package` | `--pkg`  
  The package name of the application whose data is to be cleared. This option can be used to specify the package if
  the **package** argument is not passed.

**Example**

```shell script
adbb clear org.app.cool_app
```

**Applying a filter**  
Using the `clear` command with a filter, you are shown a list of packages to choose from, to apply the `clear` command
to.

```shell script
# Apply filter
adbb clear -f cool_

# Apply filter using the ':' filter directive
adbb clear :cool_
```

#### `ip`

Get the device IP address(es).

#### `restart`

Kill and restart the adb server. It's recommended to run this with the device connected via USB.

#### `uninstall <package>`

Uninstalls the application with the specified package argument. If you don't provide a package argument, you will be
prompted to enter the intended application package. If a reference package has been set (via `adbb pkg <package>`), user
will be asked if they want to continue with that package.

**Applying a filter**  
Using the `uninstall` command together with a filter, you are shown a list of packages (that match the filter string)
to choose from, to apply the `uninstall` command to.

```shell script
adbb uninstall -f org.app.pack

# Or use with the more convenient ':' filter directive
adbb uninstall :org.app.pack
```

#### `ping`

Pings the device's IP address. You can run this command to check that the device can be reached over the network for a
tcp connection.

```shell script
adbb ping
```

#### `screenshot`

Take a screenshot of the device's currently active screen. The image file will be saved in the current directory from
which this command was run.

```shell script
adbb screenshot
adbb scrshot

# Open the image file after screen capture
adbb screenshot --open
```

#### `screenrec`

Take a recording of the device screen for a max of 3 minutes. The video file will be saved on the device. You can
extract the video recording files using various options of the `screenrec` command.
```shell
# Initiate recording
adbb screenrec

# Extract the latest recording from device to host computer and delete from device.
adbb screenrec pull

# Extract all the recordings from device to host computer and delete from device.
adbb screenrec pull --all

# Remove all recording files
adbb screenrec clear
adbb screenrec purge
```

#### `path <package>`

Gets the installed path for the specified application package.

```shell script
adbb path org.app.cool_app

# Get path for applications that match a filter
adbb path :cool
```

# Changelogs

## 1.0.0

- Bugfix: ScreenshotCommand logging wrong screenshot file path
- Rename command: set-package(set-pkg) -> set-default-package (set-default-pkg)
- Rename command: unset-package(unset-pkg) -> unset-default-package (unset-default-pkg)
- Discard use of moment library in favour of date-fns

---
_Source: https://npm.io/package/adbb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
