DirectorySecurity AdvisoriesPricing
Sign inTry Starter for free
Directory
adb logo

adb

packaged by Chainguard

Last changed
Start with 5 free container images

Catalog Starter gives your team 5 production-grade container images, free forever, with no contract or sales call. Sign up with your work email.

Try Starter for free
Chainguard HarnessHack your app with frontier AI

Chainguard Harness uses frontier models from Anthropic, OpenAI, and Google to attack a copy of your app built on adb. It finds exploitable, validated issues that SAST and DAST tools aren't built to find.

Tags
Overview
Comparison
Provenance
Specifications
SBOM
Vulnerabilities
Advisories

Chainguard Container for adb

Android Debug Bridge (adb), the command-line tool for communicating with Android devices and emulators over USB or TCP

Chainguard Containers are regularly-updated, secure-by-default container images.

Download this Container Image

For those with access, this container image is available on cgr.dev:

docker pull cgr.dev/ORGANIZATION/adb:latest

Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard Registry.

Compatibility Notes

Upstream does not publish an official container image for adb. This image is built from the android-tools standalone build of the AOSP adb sources and contains only the adb client and server binary at /usr/bin/adb, which is the image entrypoint. The image does not include a shell or fastboot.

The image runs as the non-root user nonroot (UID 65532) by default. adb stores its RSA host key in $HOME/.android (/home/nonroot/.android), so any directory you mount there must be writable by UID 65532.

Getting Started

Print the adb version:

docker run --rm cgr.dev/ORGANIZATION/adb:latest version

Generate an adb RSA key pair in a mounted directory:

mkdir -p keys && chmod 0777 keys
docker run --rm -v "$PWD/keys:/keys" cgr.dev/ORGANIZATION/adb:latest keygen /keys/adbkey

adb writes keys/adbkey with mode 0600, owned by UID 65532. To use the key as your own user, change its owner:

sudo chown "$(id -u):$(id -g)" keys/adbkey keys/adbkey.pub

Connecting to a device over TCP

Create a user-defined network so that only containers on it can reach the server:

docker network create adb

Start an adb server on that network. It stays in the foreground, and -a makes it listen on the container's network interface so clients on the adb network can connect. No port is published on the host:

docker run -d --name adb-server --network adb \
  cgr.dev/ORGANIZATION/adb:latest -a nodaemon server start

Connect the server to a device or emulator with TCP debugging enabled (for example, after adb tcpip 5555), and then run commands against it from client containers on the same network by pointing them at the server with -H and -P:

docker run --rm --network adb cgr.dev/ORGANIZATION/adb:latest \
  -H adb-server -P 5037 connect <device-ip>:5555
docker run --rm --network adb cgr.dev/ORGANIZATION/adb:latest \
  -H adb-server -P 5037 devices -l
docker run --rm --network adb cgr.dev/ORGANIZATION/adb:latest \
  -H adb-server -P 5037 -s <device-ip>:5555 shell getprop ro.build.version.release

Because the image has no shell, run the adb client directly when you exec into a running server container:

docker exec adb-server adb devices

To persist the host key across restarts, so a device does not prompt to authorize a new key each time, mount a named volume at /home/nonroot. A new volume copies that directory's 65532 ownership, which a volume at /home/nonroot/.android does not get:

docker run -d --name adb-server --network adb \
  -v adb-home:/home/nonroot \
  cgr.dev/ORGANIZATION/adb:latest -a nodaemon server start

USB devices

To reach USB-attached devices, pass the USB bus through to the server container, for example with --device /dev/bus/usb. The container user needs read and write access to the device nodes.

Configuration

The adb server listens on TCP port 5037. Use -L to change the listening socket, or -a to listen on all interfaces instead of only localhost. Because the server port is unauthenticated, only use -a where the network is restricted to trusted clients, such as a user-defined Docker network without a published port. Refer to adb --help for the full list of global options and commands.

Documentation and Resources

What are Chainguard Containers?

Chainguard's free tier of Starter container images are built with Wolfi, our minimal Linux undistro.

All other Chainguard Containers are built with Chainguard OS, Chainguard's minimal Linux operating system designed to produce container images that meet the requirements of a more secure software supply chain.

The main features of Chainguard Containers include:

For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a development, or -dev, variant.

In all other cases, including Chainguard Containers tagged as :latest or with a specific version number, the container images include only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager.

Although the -dev container image variants have similar security features as their more minimal versions, they include additional software that is typically not necessary in production environments. We recommend using multi-stage builds to copy artifacts from the -dev variant into a more minimal production image.

Need additional packages?

To improve security, Chainguard Containers include only essential dependencies. Need more packages? Chainguard customers can use Custom Assembly to add packages, either through the Console, chainctl, or API.

To use Custom Assembly in the Chainguard Console: navigate to the image you'd like to customize in your Organization's list of images, and click on the Customize image button at the top of the page.

Learn More

Refer to our Chainguard Containers documentation on Chainguard Academy. Chainguard also offers VMs and Libraries — contact us for access.

Trademarks

This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.

Licenses

Chainguard's container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" tag of this image:

  • Apache-2.0

  • BSD-2-Clause

  • BSD-3-Clause

  • GCC-exception-3.1

  • GPL-2.0-only

  • GPL-3.0-or-later

  • LGPL-2.1

For a complete list of licenses, please refer to this Image's SBOM.

Software license agreement

Compliance

Chainguard Containers are SLSA Level 3 compliant with detailed metadata and documentation about how it was built. We generate build provenance and a Software Bill of Materials (SBOM) for each release, with complete visibility into the software supply chain.

SLSA compliance at Chainguard

This image helps reduce time and effort in establishing PCI DSS 4.0 compliance with low-to-no CVEs.

PCI DSS at Chainguard

Category
Application

The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.