Modern smart televisions, streaming set-top boxes, and automotive infotainment displays running Android TV, Google TV, or Android Automotive OS rely on the TV Input Framework (TIF) to unify disparate broadcast television sources, external hardware ports, and streaming channel applications. Governed by the com.android.server.tv system service, TIF allows developers and manufacturers to integrate physical tuner hardware (DVB-T2, ATSC, ISDB-T), external video inputs (HDMI 1, HDMI 2, Composite, Component), and over-the-top (OTT) IP channels into a standardized Electronic Program Guide (EPG). When debugging channel scanning failures, inspecting tuner hardware lock states, diagnosing HDMI Audio Return Channel (ARC) handshakes, or auditing TV recording sessions, engineers can query the system using Android Debug Bridge (ADB). This article explains how to inspect TV input services, tuner hardware state, and active media sessions using adb shell dumpsys tv_input.
Understanding Android TV Input Framework (TIF) Architecture
The Android TV Input Framework bridges physical hardware decoders with system broadcast presentation components:
- TV Inputs: Independent software or hardware drivers that generate video and audio streams. Physical inputs include hardware tuners (terrestrial, satellite, cable) and auxiliary ports (HDMI, Composite). Software inputs include IP streaming channel apps that plug into the system Live Channels UI.
- TvInputService & Sessions: When a user tunes to an HDMI port or broadcast channel, the system creates an active
TvInputManager.Sessionthat binds the hardware surface to the video decoder pipeline. - Parental Controls & Ratings: The framework parses parental rating descriptors (e.g. MPAA, US TV, BBFC) embedded within broadcast metadata, enforcing pin locks and content restrictions.
- Hardware Tuner and DVR: Manages hardware tuner allocation for live playback versus background digital video recording (DVR) sessions, preventing tuner lock collisions.
Connecting to ADB and Querying dumpsys tv_input
To inspect TV input services, connect to your Android TV or development device via USB or network debugging (adb connect <ip-address>:5555), verify authorization with adb devices, and execute the service dump:
adb shell dumpsys tv_input
To capture the complete diagnostic output for offline analysis or grep filtering, redirect the terminal stream to a text file:
adb shell dumpsys tv_input > tv_input_diagnostics.txt
If executed on standard smartphone or tablet builds that do not include the Android TV Input Framework, the command reports Service tv_input does not exist.
Inspecting Registered TV Inputs and Hardware Ports
At the top of the dumpsys tv_input output, inspect the registered TV input modules:
adb shell dumpsys tv_input | grep -A 15 "TvInputManagerService:"
The output lists all discovered physical and virtual inputs:
Input ID: com.android.tv/.receiver.TvMessageReceiver/HW0
Type: TUNER, IsHardware: true, Connected: true
Input ID: com.android.tv/.receiver.TvMessageReceiver/HW1
Type: HDMI_1, IsHardware: true, Connected: true, HdmiDeviceInfo: logicalAddr=4
Input ID: com.android.tv/.receiver.TvMessageReceiver/HW2
Type: HDMI_2, IsHardware: true, Connected: false
Review the input parameters:
Type: Identifies whether the input is a broadcastTUNER,HDMIport,COMPOSITE, or virtual softwareSTREAM.IsHardware: Confirms whether the input interfaces with native SoC hardware decoders.Connected: Indicates physical cable carrier detection. For HDMI inputs,trueconfirms that an external source device (e.g. gaming console, Blu-ray player) is actively connected and asserting 5V/Hot Plug Detect (HPD).HdmiDeviceInfo: Details HDMI Consumer Electronics Control (CEC) addresses and device types associated with the port.
Auditing Active TV Sessions and Surface Allocation
When live broadcast video or HDMI passthrough is active, the framework details the operational session. Query the session state:
adb shell dumpsys tv_input | grep -A 20 "mSessionMap:"
A representative session entry details:
SessionId&ClientToken: Uniquely identifies the playback session and binds it to the calling application (typicallycom.google.android.tvor the OEM Live TV app).Current Channel URI: Displays the content URI of the active broadcast channel (e.g.content://android.media.tv/channel/42).Surface State: Confirms whether the native rendering surface is attached to the hardware video decoder.Audio Presentation & Track Selection: Details selected audio PID, language descriptors (e.g. English, Descriptive Audio), and subtitle tracks.
Inspecting Parental Controls and Rating Blocks
To verify parental control enforcement and blocked content ratings, inspect the parental control section:
adb shell dumpsys tv_input | grep -A 10 "Parental Controls:"
This section reports whether parental control filtering is active (mParentalControlsEnabled), lists custom rating systems, and displays individual rating tiers that are blocked from unauthenticated viewing.
Monitoring Live Tuner Events via Logcat
To observe dynamic channel tuning, HDMI CEC hot-plug events, and audio track switching in real time, filter logcat alongside the service dump:
adb logcat -s TvInputManagerService:V TvInputHal:V TvInputHardwareManager:V
Reviewing adb shell dumpsys tv_input provides Android TV engineers and multimedia developers with full diagnostic visibility into broadcast tuner orchestration, HDMI input handshakes, and live media session lifecycles.