packaged by Chainguard
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 freeChainguard 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.
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.
For those with access, this container image is available on cgr.dev:
Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard Registry.
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.
Print the adb version:
Generate an adb RSA key pair in a mounted directory:
adb writes keys/adbkey with mode 0600, owned by UID 65532. To use the key as your own user, change its owner:
Create a user-defined network so that only containers on it can reach the server:
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:
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:
Because the image has no shell, run the adb client directly when you exec into a running server container:
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:
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.
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.
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.
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.
Refer to our Chainguard Containers documentation on Chainguard Academy. Chainguard also offers VMs and Libraries — contact us for access.
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.
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 agreementChainguard 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 ChainguardThis image helps reduce time and effort in establishing PCI DSS 4.0 compliance with low-to-no CVEs.
PCI DSS at Chainguard