androidtvremote2
A Python library for interacting with Android TV using the Android TV Remote protocol v2
What it is and what it does
androidtvremote2 is a Python client for the Android TV Remote protocol v2, the same protocol used by the Google TV mobile app. It lets you send remote control commands (key presses, app launches, voice input) to Android TV devices over the network without needing ADB or developer mode enabled. The library handles the protocol's cryptographic pairing and messaging layer, exposing an async API for sending commands and receiving responses.
The package depends on aiofiles, cryptography, and protobuf to handle asynchronous I/O, protocol encryption, and message serialization. It supports a wide range of commands documented in TvKeys.txt, can open apps via deep links, and accepts PCM audio for voice commands. It's designed for home automation, remote control applications, and integration into systems that need programmatic Android TV control.
Use it for:
- Build a home automation system that controls multiple Android TV devices from a central Python application.
- Create a custom remote control app that sends commands to Android TV without the official mobile app.
- Automate testing of Android TV apps by sending commands and verifying responses programmatically.
- Send voice commands to Android TV as PCM audio from a voice assistant or transcription service.
- Integrate Android TV control into a media center or smart home dashboard application.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python library for controlling Android TV devices over the network using the Android TV Remote protocol v2, without requiring ADB or developer mode.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and fills a specific need for Android TV control without ADB. The Apache-2.0 license is permissive. Install if you need to control Android TV devices from Python; skip if you don't have Android TV devices to control.
Install
androidtvremote2 on PyPI
pip
pip install androidtvremote2uv
uv add androidtvremote2poetry
poetry add androidtvremote2Installing androidtvremote2
Before you install
Low friction install with three straightforward dependencies. Actively maintained with recent commits and no known vulnerabilities.
License in practice
Apache-2.0 permissive license allows free use, modification, and distribution with minimal restrictions.
Quickstart
pip install androidtvremote2
import asyncio
from androidtvremote2 import AndroidTVRemote
async def main():
remote = AndroidTVRemote(host='tv-device')
await remote.connect()
await remote.send_key_command('KEYCODE_HOME')
await remote.disconnect()
asyncio.run(main())
Requires Python 3.10 or later. Target Android TV device must have Android TV Remote Service pre-installed.
Verify before relying
- Whether pairing or authentication setup is required before sending commands.
- Latency and reliability characteristics for real-time remote control use.
- Whether voice command support requires additional system dependencies beyond pip installation.
- Network connectivity requirements and supported Android TV device versions.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — aiofiles, cryptography, protobuf |
| Maintenance | actively maintained — 147 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 102,559/month — #12,861 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: androidtvremote2-0.3.1-py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
python-fullykioskProvides a Python interface to the Fully Kiosk…
permissive · top 15,000 on PyPI
uiautomator2Automates Android device interactions from…
permissive · top 15,000 on PyPI
rokuecpAn asynchronous Python client for controlling…
permissive · top 15,000 on PyPI
adbutilsadbutils is a Python library that communicates…
permissive · top 15,000 on PyPI
adb-shellImplements ADB (Android Debug Bridge) shell and…
permissive · top 15,000 on PyPI
uiautomatorPython wrapper for Android's uiautomator…
permissive · top 15,000 on PyPI
aiowebostvAsync Python library for controlling LG…
permissive · top 15,000 on PyPI
pyatvAn asyncio Python library for controlling Apple…
permissive · top 15,000 on PyPI
pure-python-adbPure-Python ADB client that communicates with…
permissive · top 15,000 on PyPI
samsungtvwsA Python library for remotely controlling…
copyleft · top 15,000 on PyPI