Thanks to the python-androidtv
repo, I learned of the dumpsys tv_input
command available in adb shell
. Highly suggest others who land here use this command to gain more information about the options available for their device.
The output was super useful. In my case, it helped me identify how to select the ARC input on my Soundbar.
atom:/ $ dumpsys tv_input
User Ids (Current user: 0):
0
UserState (0):
inputMap: inputId -> TvInputState
com.google.android.videos/.tv.usecase.tvinput.playback.TvInputService: info: TvInputInfo{id=com.google.android.videos/.tv.usecase.tvinput.playback.TvInputService, pkg=com.google.android.videos, service=com.google.android.videos.tv.usecase.tvinput.playback.TvInputService}; state: 0
com.droidlogic.tvinput/.services.AUXInputService/HW17: info: TvInputInfo{id=com.droidlogic.tvinput/.services.AUXInputService/HW17, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.AUXInputService}; state: 0
com.google.android.videos/com.google.android.apps.play.movies.tv.usecase.tvinput.playback.VideoPreviewInputService: info: TvInputInfo{id=com.google.android.videos/com.google.android.apps.play.movies.tv.usecase.tvinput.playback.VideoPreviewInputService, pkg=com.google.android.videos, service=com.google.android.apps.play.movies.tv.usecase.tvinput.playback.VideoPreviewInputService}; state: 0
com.droidlogic.tvinput/.services.Hdmi1InputService/HW5: info: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi1InputService/HW5, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi1InputService}; state: 1
com.droidlogic.tvinput/.services.Hdmi2InputService/HDMI200004: info: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi2InputService/HDMI200004, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi2InputService}; state: 0
com.droidlogic.tvinput/.services.SPDIFInputService/HW15: info: TvInputInfo{id=com.droidlogic.tvinput/.services.SPDIFInputService/HW15, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.SPDIFInputService}; state: 0
com.droidlogic.tvinput/.services.Hdmi2InputService/HW6: info: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi2InputService/HW6, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi2InputService}; state: 1
com.droidlogic.tvinput/.services.ArcInputService/HW18: info: TvInputInfo{id=com.droidlogic.tvinput/.services.ArcInputService/HW18, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.ArcInputService}; state: 0
com.droidlogic.tvinput/.services.Hdmi3InputService/HW7: info: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi3InputService/HW7, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi3InputService}; state: 1
packageSet:
com.google.android.videos
com.droidlogic.tvinput
clientStateMap: ITvInputClient -> ClientState
android.os.BinderProxy@c8093d0: com.android.server.tv.TvInputManagerService$ClientState@c78cdd
sessionTokens:
android.os.Binder@d5b06f0
clientTokens: android.os.BinderProxy@c8093d0
userId: 0
serviceStateMap: ComponentName -> ServiceState
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.Hdmi4InputService}: com.android.server.tv.TvInputManagerService$ServiceState@4d99e12
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@2bdf9e3
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@598bfe0
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.ArcInputService}: com.android.server.tv.TvInputManagerService$ServiceState@3c02299
sessionTokens:
android.os.Binder@d5b06f0
service: android.media.tv.ITvInputService$Stub$Proxy@eaf895e
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@94c513f
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.AV2InputService}: com.android.server.tv.TvInputManagerService$ServiceState@bf9fa0c
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@4e74f55
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@166dd6a
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.Hdmi3InputService}: com.android.server.tv.TvInputManagerService$ServiceState@a3ec25b
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@952aaf8
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@c1a8bd1
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.SPDIFInputService}: com.android.server.tv.TvInputManagerService$ServiceState@28d6636
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@f1d2937
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@9837ea4
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.DTVInputService}: com.android.server.tv.TvInputManagerService$ServiceState@46b140d
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@c1afc2
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@81121d3
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.ADTVInputService}: com.android.server.tv.TvInputManagerService$ServiceState@3cbe110
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@ec1e409
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@3ff060e
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.Hdmi1InputService}: com.android.server.tv.TvInputManagerService$ServiceState@442082f
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@1f5fe3c
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@79bb7c5
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.AV1InputService}: com.android.server.tv.TvInputManagerService$ServiceState@6a9751a
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@3f0f84b
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@e42c228
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.AUXInputService}: com.android.server.tv.TvInputManagerService$ServiceState@c850b41
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@359c8e6
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@54ce27
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.Hdmi2InputService}: com.android.server.tv.TvInputManagerService$ServiceState@415d8d4
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@d561a7d
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@3698d72
bound: true
reconnecting: false
ComponentInfo{com.droidlogic.tvinput/com.droidlogic.tvinput.services.ATVInputService}: com.android.server.tv.TvInputManagerService$ServiceState@53625c3
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@f61ae40
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@52ee179
bound: true
reconnecting: false
sessionStateMap: ITvInputSession -> SessionState
android.os.Binder@d5b06f0: com.android.server.tv.TvInputManagerService$SessionState@1d08052
inputId: com.droidlogic.tvinput/.services.ArcInputService/HW18
client: android.media.tv.ITvInputClient$Stub$Proxy@e4bcf23
seq: 22
callingUid: 10017
userId: 0
sessionToken: android.os.Binder@d5b06f0
session: android.media.tv.ITvInputSession$Stub$Proxy@7760c20
logUri: null
hardwareSessionToken: null
callbackSet:
android.media.tv.TvInputManager$2@a644964
android.media.tv.ITvInputManagerCallback$Stub$Proxy@ac91449
android.media.tv.ITvInputManagerCallback$Stub$Proxy@c9aa7ba
android.media.tv.ITvInputManagerCallback$Stub$Proxy@eee91ee
android.media.tv.ITvInputManagerCallback$Stub$Proxy@79f9cdf
android.media.tv.ITvInputManagerCallback$Stub$Proxy@13930f8
android.media.tv.ITvInputManagerCallback$Stub$Proxy@a1599d1
android.media.tv.ITvInputManagerCallback$Stub$Proxy@d266a22
android.media.tv.ITvInputManagerCallback$Stub$Proxy@9ba1b7c
android.media.tv.ITvInputManagerCallback$Stub$Proxy@995f79d
android.media.tv.ITvInputManagerCallback$Stub$Proxy@b33a05b
android.media.tv.ITvInputManagerCallback$Stub$Proxy@cb89832
android.media.tv.ITvInputManagerCallback$Stub$Proxy@90203ee
android.media.tv.ITvInputManagerCallback$Stub$Proxy@43e4813
android.media.tv.ITvInputManagerCallback$Stub$Proxy@393a77e
android.media.tv.ITvInputManagerCallback$Stub$Proxy@7f6bbc6
android.media.tv.ITvInputManagerCallback$Stub$Proxy@3ba0381
android.media.tv.ITvInputManagerCallback$Stub$Proxy@a2caa50
android.media.tv.ITvInputManagerCallback$Stub$Proxy@15dcfa3
android.media.tv.ITvInputManagerCallback$Stub$Proxy@8256bd
mainSessionToken: android.os.Binder@d5b06f0
TvInputHardwareManager Info:
mConnections: deviceId -> Connection
5: Connection{ mHardwareInfo: TvInputHardwareInfo {id=5, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=1, cable_connection_status=0}, mInfo: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi1InputService/HW5, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi1InputService}, mCallback: android.media.tv.ITvInputHardwareCallback$Stub$Proxy@7331c35, mConfigs: [], mCallingUid: 1000, mResolvedUserId: 0 }
6: Connection{ mHardwareInfo: TvInputHardwareInfo {id=6, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=2, cable_connection_status=0}, mInfo: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi2InputService/HW6, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi2InputService}, mCallback: android.media.tv.ITvInputHardwareCallback$Stub$Proxy@95958ca, mConfigs: [], mCallingUid: 1000, mResolvedUserId: 0 }
7: Connection{ mHardwareInfo: TvInputHardwareInfo {id=7, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=3, cable_connection_status=0}, mInfo: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi3InputService/HW7, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi3InputService}, mCallback: android.media.tv.ITvInputHardwareCallback$Stub$Proxy@a548a3b, mConfigs: [], mCallingUid: 1000, mResolvedUserId: 0 }
15: Connection{ mHardwareInfo: TvInputHardwareInfo {id=15, type=1, audio_type=-2147418112, audio_addr=, cable_connection_status=0}, mInfo: TvInputInfo{id=com.droidlogic.tvinput/.services.SPDIFInputService/HW15, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.SPDIFInputService}, mCallback: android.media.tv.ITvInputHardwareCallback$Stub$Proxy@cbf0558, mConfigs: [TvStreamConfig {mStreamId=1;mType=1;mGeneration=1}], mCallingUid: 1000, mResolvedUserId: 0 }
17: Connection{ mHardwareInfo: TvInputHardwareInfo {id=17, type=1, audio_type=-2147450880, audio_addr=, cable_connection_status=0}, mInfo: TvInputInfo{id=com.droidlogic.tvinput/.services.AUXInputService/HW17, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.AUXInputService}, mCallback: android.media.tv.ITvInputHardwareCallback$Stub$Proxy@b0646b1, mConfigs: [TvStreamConfig {mStreamId=1;mType=1;mGeneration=1}], mCallingUid: 1000, mResolvedUserId: 0 }
18: Connection{ mHardwareInfo: TvInputHardwareInfo {id=18, type=1, audio_type=-2013265920, audio_addr=, cable_connection_status=0}, mInfo: TvInputInfo{id=com.droidlogic.tvinput/.services.ArcInputService/HW18, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.ArcInputService}, mCallback: android.media.tv.ITvInputHardwareCallback$Stub$Proxy@91c3796, mConfigs: [TvStreamConfig {mStreamId=1;mType=1;mGeneration=1}], mCallingUid: 1000, mResolvedUserId: 0 }
mHardwareList:
TvInputHardwareInfo {id=5, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=1, cable_connection_status=0}
TvInputHardwareInfo {id=6, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=2, cable_connection_status=0}
TvInputHardwareInfo {id=7, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=3, cable_connection_status=0}
TvInputHardwareInfo {id=15, type=1, audio_type=-2147418112, audio_addr=, cable_connection_status=0}
TvInputHardwareInfo {id=17, type=1, audio_type=-2147450880, audio_addr=, cable_connection_status=0}
TvInputHardwareInfo {id=18, type=1, audio_type=-2013265920, audio_addr=, cable_connection_status=0}
mHdmiDeviceList:
CEC: logical_address: 0x04 device_type: 4 vendor_id: 16777215 display_name: XBOX power_status: 0 physical_address: 0x3000 port_id: -1
mHardwareInputIdMap: deviceId -> inputId
5: com.droidlogic.tvinput/.services.Hdmi1InputService/HW5
6: com.droidlogic.tvinput/.services.Hdmi2InputService/HW6
7: com.droidlogic.tvinput/.services.Hdmi3InputService/HW7
15: com.droidlogic.tvinput/.services.SPDIFInputService/HW15
17: com.droidlogic.tvinput/.services.AUXInputService/HW17
18: com.droidlogic.tvinput/.services.ArcInputService/HW18
mHdmiInputIdMap: id -> inputId
4: com.droidlogic.tvinput/.services.Hdmi2InputService/HDMI200004
mInputMap: inputId -> inputInfo
com.droidlogic.tvinput/.services.Hdmi1InputService/HW5: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi1InputService/HW5, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi1InputService}
com.droidlogic.tvinput/.services.AUXInputService/HW17: TvInputInfo{id=com.droidlogic.tvinput/.services.AUXInputService/HW17, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.AUXInputService}
com.droidlogic.tvinput/.services.SPDIFInputService/HW15: TvInputInfo{id=com.droidlogic.tvinput/.services.SPDIFInputService/HW15, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.SPDIFInputService}
com.droidlogic.tvinput/.services.Hdmi2InputService/HDMI200004: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi2InputService/HDMI200004, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi2InputService}
com.droidlogic.tvinput/.services.Hdmi2InputService/HW6: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi2InputService/HW6, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi2InputService}
com.droidlogic.tvinput/.services.Hdmi3InputService/HW7: TvInputInfo{id=com.droidlogic.tvinput/.services.Hdmi3InputService/HW7, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.Hdmi3InputService}
com.droidlogic.tvinput/.services.ArcInputService/HW18: TvInputInfo{id=com.droidlogic.tvinput/.services.ArcInputService/HW18, pkg=com.droidlogic.tvinput, service=com.droidlogic.tvinput.services.ArcInputService}
With this information, I learned that the following command selects the ARC input on my JBL Link Bar. Now I can automate all the things!
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.droidlogic.tvinput%2F.services.ArcInputService%2FHW18