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+
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.
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, --namecreates/tmp/<name>for use by another serial tool instead.-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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| adbuart-0.1.3.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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