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
- Windows, macOS, or Linux with Python 3.10+ for direct miniterm mode
- A POSIX host for the optional local PTY mode
adbinstalled and available inPATH- An adb-connected Android device where
adb rootis 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.
On Linux or macOS, create a PTY for another serial tool by passing 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, --namecreates/tmp/<name>for use by another serial tool on POSIX hosts; Windows direct mode does not create a virtual COM port.-s, --serialselects an adb device. If omitted, exactly one device must be connected.--remote-ttyselects the target UART device path. Default:/dev/ttyHS1.--baudsets the initial remote UART baud rate. Default:2000000.--cmd-beforeruns a remote shell command before bridging. Repeatable.--cmd-afterruns 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.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| adbuart-0.1.4.tar.gz | 14.0 kB | With provenance | Details for adbuart-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adbuart-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for adbuart-0.1.4-py3-none-any.whl |
Total release size: 25.4 kB
Release files / adbuart-0.1.4.tar.gz
| Download URL | adbuart-0.1.4.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48ec3ef90982f04e4a604b2e4f9eb34a499a98fe401c082b1b2bd0385412b8b3
|
|
BLAKE2b-256 checksum How to use checksums |
97bda536b49bdbca387905481debed5f1c18d247c9e72fd0a25c2cd897e29b21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logRelease files / adbuart-0.1.4-py3-none-any.whl
| Download URL | adbuart-0.1.4-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac4c69e52ac0a83de0f0d9ff27cbf958e6e5ec8608764a7eac5b2a7eef8ed99b
|
|
BLAKE2b-256 checksum How to use checksums |
4f5660706abf3c59f7f1a01d3538eabd914cd045770722432276221b5831f59b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logSecurity for adbuart 0.1.4
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for adbuart-0.1.4.tar.gz
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 Nov 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.