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.2

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.2
File Size Uploaded
adbuart-0.1.2.tar.gz 12.3 kB Details

Built distribution (wheel)

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

Total release size: 22.9 kB

Release files / adbuart-0.1.2.tar.gz

Download URL adbuart-0.1.2.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
942cdf17da757767581ad4429357b37493da8ec40a4b3d59fe0acf5610bdcae2
BLAKE2b-256 checksum
How to use checksums
a5e39fc8f522ecf21bc9cc9ddba30ecd59711e8445279aad8e3eb978a34bb9eb
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.2-py3-none-any.whl

Download URL adbuart-0.1.2-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bd0f488d9abccdc46accadd13e24e1ac826918fc59c55e0b74c930db9670f8b
BLAKE2b-256 checksum
How to use checksums
8daf3edeb4d596283c49f738903a002e1169febf72c517baeacccdf4780bfcf7
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

0.1.3

2 release files

This release

0.1.2 This release

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