skillfed

androidtvremote2

A Python library for interacting with Android TV using the Android TV Remote protocol v2

androidtvremote2 v0.3.1 102.6K downloads/30d#12,861 on PyPI128
Permissive license Apache-2.0 Active released

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 androidtvremote2

uv

uv add androidtvremote2

poetry

poetry add androidtvremote2

Installing 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

android tv remote controlgoogle tv protocol pythonandroid tv command libraryremote control android tvandroid tv automationtv remote protocol v2
android-tvhome-automationasync-io

More Networking packages