Skip to main content

adbuart

Open an Android-device UART in a local miniterm session over adb, or expose it as a local PTY for tools such as minicom, picocom, and pyserial.

This is useful when a device has no host-side USB serial adapter and its console is reachable only through an Android UART device.

Requirements

  • Linux or another POSIX-like host with Python 3.10+
  • adb installed and available in PATH
  • An adb-connected Android device where adb root is allowed
  • Target-side UART device access, defaulting to /dev/ttyHS1

Install

python3 -m pip install adbuart

Usage

Open the UART directly in miniterm:

adbuart

With multiple adb devices attached, pass the adb serial explicitly:

adbuart -s SERIAL

Press Ctrl+] to exit, or Ctrl+T followed by Ctrl+H for miniterm help.

To create a PTY for another serial tool instead, pass a name:

adbuart -n uart-console

This creates /tmp/uart-console and keeps the bridge running in the foreground. Open it from another terminal:

minicom -D /tmp/uart-console -b 2000000
# or
python3 -m serial.tools.miniterm /tmp/uart-console 2000000

Stop PTY mode with Ctrl-C in the bridge terminal. Clean shutdown in either mode restores RTOS logging when it was enabled before startup.

Options

Run:

adbuart --help
adbuart --version

Important options:

  • Without --name, the command opens the UART directly in miniterm.
  • -n, --name creates /tmp/<name> for use by another serial tool instead.
  • -s, --serial selects an adb device. If omitted, exactly one device must be connected.
  • --remote-tty selects the target UART device path. Default: /dev/ttyHS1.
  • --baud sets the initial remote UART baud rate. Default: 2000000.
  • --cmd-before runs a remote shell command before bridging. Repeatable.
  • --cmd-after runs a remote shell command during teardown. Repeatable.

By default the tool sets persist.rtoslogd.uart to 0 before bridging so Android log collection releases the UART. During teardown it restores the property to 1 only when it was 1 at startup.

Operating notes

  • The bridge owns the target UART exclusively while it is running. Stop it before flashing, resetting, or opening the same UART through another tool.
  • In PTY mode, the local node is protected with a lock file, but unrelated tools can still collide at the device UART level.
  • Avoid kill -9; it skips teardown and can leave RTOS logging disabled or, in PTY mode, a stale /tmp/<name> symlink.
  • Serial disconnects during target reset are normal. Restart the bridge after the adb UART stream closes.

Development

python3 -m pip install -e '.[dev]'
pytest -q
python3 -m build

License

MIT

Metadata

Release files for adbuart 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adbuart 0.1.3
File Size Uploaded
adbuart-0.1.3.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adbuart 0.1.3
File Interpreter ABI Platform
adbuart-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 22.9 kB

Release files / adbuart-0.1.3.tar.gz

Download URL adbuart-0.1.3.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5e0eb18095e4de4175a822e487caed01d783f24bd5a7c17b3f53bff0debdc5cb
BLAKE2b-256 checksum
How to use checksums
e898010ada9e22da996a474171197736e2f068afef2f867d7d0202c5ea67f7ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / adbuart-0.1.3-py3-none-any.whl

Download URL adbuart-0.1.3-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1661e6f7cca3c5ce67e2526123fc67daac2868913aa402501b2ceef546ff7e7c
BLAKE2b-256 checksum
How to use checksums
2a5795126bc9cd82bc0d16ba0e7e97e1d5d245512c5f3ae81c81b808865e9e33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page