python-androidtv-wifi
This package is a fork of python-androidtv that adds support for modern ADB Wi-Fi pairing — the 6-digit-code TLS pairing flow introduced in Android 11’s “Wireless debugging” feature, plus the post-pairing TLS data channel and mDNS-based service discovery.
It exists primarily as a testbed for verifying that Wi-Fi pairing support can be added to Home Assistant’s Android TV integration. If you do not need Wi-Fi pairing, install upstream androidtv instead — the upstream package is the canonical home of all non-Wi-Fi functionality.
Original androidtv documentation: https://androidtv.readthedocs.io
About
androidtv_wifi is a Python package that provides state information and control of Android TV and Fire TV devices via ADB, including modern ADB Wi-Fi pairing. It depends on adb-shell-wifi (a corresponding fork of adb-shell).
Installation
pip install androidtv-wifi
To utilize the async version of this code, you must install into a Python 3.7+ environment via:
pip install androidtv-wifi[async]
ADB Wi-Fi (TLS) support
Modern Android (11+) deprecates the legacy adb tcpip flow in favor of ADB Wi-Fi, which uses a one-shot pairing handshake plus a TLS 1.3 data channel on a randomized port advertised over mDNS.
Install with the wifi extra:
pip install androidtv-wifi[wifi]
Then either pass connection_type="tls" to setup() / BaseTVAsync / etc., or construct the device classes directly:
from androidtv_wifi import setup
from androidtv_wifi.wifi import pair, discover_connect_services
# One-time pairing — user opens "Pair device with pairing code"
# in Wireless debugging settings on the TV and reads off the code.
pair(host=PAIR_IP, port=PAIR_PORT, pairing_code="123456",
adbkey="/path/to/adbkey")
# Subsequent connects. Discover the (random) TLS port via mDNS.
services = discover_connect_services(timeout_s=4.0)
tv = setup(host=services[0].host, port=services[0].port,
adbkey="/path/to/adbkey", connection_type="tls")
The legacy connection_type="tcp" path (default) is unchanged — existing users on older Android versions or pre-paired devices using adb tcpip need to do nothing.
ADB Intents and Commands
A collection of useful intents and commands can be found here (credit: mcfrojd).
Acknowledgments
This fork is based on python-androidtv by Jeff Irion, which itself is based on python-firetv by happyleavesaoc and the androidtv component for Home Assistant by a1ex4. This fork depends on adb-shell-wifi (a fork of adb-shell, which is based on python-adb) and pure-python-adb.
Metadata
Release files for androidtv-wifi 0.1.1
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 | |
|---|---|---|---|---|
| androidtv_wifi-0.1.1.tar.gz | 69.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| androidtv_wifi-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 125.5 kB
Release files / androidtv_wifi-0.1.1.tar.gz
| Download URL | androidtv_wifi-0.1.1.tar.gz |
|---|---|
| Size | 69.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03e0f52e5e76910450b3337cf37830fea092b23d3f52c23b4086fc80e144c866
|
|
BLAKE2b-256 checksum How to use checksums |
adc72b08a6cb3e16a733dc930e2ddec0c7126a610479f8ca1dc0c3911d577e4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / androidtv_wifi-0.1.1-py3-none-any.whl
| Download URL | androidtv_wifi-0.1.1-py3-none-any.whl |
|---|---|
| Size | 55.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4051dedaddbf7c1d66d469cfbca01722e6e6a209ad46d4fedde8680918884ce2
|
|
BLAKE2b-256 checksum How to use checksums |
48886fe22e344155c1ca461c8a76e7368f126f2330af9e164526c14d7418a868
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for androidtv-wifi 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.