npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-adb

v1.0.0

Published

Expo module for running Android ADB shell commands over a local TCP ADB daemon

Readme

expo-adb

expo-adb is an Expo module that runs Android ADB shell commands through a local ADB daemon exposed on 127.0.0.1:5555.

What it does

  • generates and stores an app-local ADB RSA keypair,
  • connects to local adbd over TCP,
  • opens an ADB shell session,
  • executes one command or a small script.

Requirements

  • Android only (iOS / Web mocks)
  • local ADB daemon reachable on 127.0.0.1:5555
  • device configured to accept the generated ADB key

If the device does not expose local ADB or rejects the key, calls will fail.

Installation

yarn add expo-adb
npm install expo-adb

API

isAvailable(): Promise<boolean>
getAvailabilityDetails(): Promise<{
  available: boolean
  host: string
  port: number
  keyPairPresent: boolean
  errorCode: string | null
  errorClass: string | null
  errorMessage: string | null
  hint: string | null
}>
executeCommand(command: string): Promise<string>
executeCommands(commands: string[]): Promise<string>

Usage

import ExpoAdb from 'expo-adb';

const available = await ExpoAdb.isAvailable();
const details = await ExpoAdb.getAvailabilityDetails();

if (available) {
  const model = await ExpoAdb.executeCommand('getprop ro.product.model');

  const output = await ExpoAdb.executeCommands([
    'getprop ro.product.brand',
    'getprop ro.build.version.release',
  ]);
}

executeCommands() sends every command on a new line and appends exit automatically.

executeCommand() returns a cleaned command result for single-command use cases. It strips shell echo lines such as the input command itself and trailing exit.

Behavior notes

  • executeCommand() returns cleaned output for a single command.
  • executeCommands() returns raw shell output for the whole script. It does not parse command success or failure for you.
  • The RSA keypair is stored in the app sandbox under a directory named expo-adb.
  • isAvailable() only checks transport/auth connectivity to local ADB.
  • getAvailabilityDetails() returns diagnostic information when local ADB is unreachable.
  • On iOS and web, isAvailable() returns false and command methods throw an error.

Example commands

await ExpoAdb.executeCommand('getprop ro.product.model');
await ExpoAdb.executeCommand('pm list packages');
await ExpoAdb.executeCommands(['settings get global adb_enabled', 'getprop service.adb.tcp.port']);

Limitations

  • This is not a replacement for desktop adb.
  • It only talks to a local daemon already available on the Android device.
  • Some commands may still fail because of Android version, OEM policy, shell privileges, or ADB authorization state.

Known issues

  • On some devices, local ADB may not be reachable immediately even when Developer Options are already enabled.
  • Observed on Samsung Galaxy S23: local ADB on 127.0.0.1:5555 initially returned connection_refused, then started working only after the Wireless debugging / pairing flow appeared in system UI.
  • Because of that, isAvailable() and getAvailabilityDetails() can change from failing to working without any code change, depending on the current system ADB state.