unfortunately nothing
Same. Using this command "adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.droidlogic.tvinput%2F.services.Hdmi1InputService%2FHW5”…it shows me the current input, but regardless of what I change HW5 to…it doesn’t change.
I know ADB is working, because I can power the TV on demand.
I have a TCL 6-series, by the way.
I can’t quite get it to work just now. If I use:
am start -a android.intent.action.VIEW -d
content://android.media.tv/passthrough/com.mediatek.tvinput%2F.hdmi.HDMIInputService%2FHW5
-n org.droidtv.playtv/.PlayTvActivity -f 0x10000000
Nothing whatsoever happens…
but if I remove the -n org.droidtv.playtv/.PlayTvActivity -f 0x10000000
(which incidentally I have no idea what it means) I get the error: Cannot Find TV Input
I have tried HW1-9 and not a single one works, I always get the same error Cannot Find TV Input. Any Ideas?
I can’t tell if just the formatting on the site but it looks like you have line breaks?
It’s all on a single line, one long command
I was able to get it to work using the following script code:
service: androidtv.adb_command
data:
entity_id: media_player.android_tv
command: "HDMI1"
Hope this helps!
Which TV make and model do you have?
I tried this with my TCL 75R646 and it didn’t work for me.
But thank you for another thing for people to try.
I have a TCL 65S434. In my case:
- HDMI1:
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.droidlogic.tvinput%2F.services.Hdmi1InputService%2FHW5
- HDMI2:
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.droidlogic.tvinput%2F.services.Hdmi2InputService%2FHW6
- HDMI3:
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.droidlogic.tvinput%2F.services.Hdmi3InputService%2FHW7
I learned that these work after running logcat with the following command and then changing inputs via my remote:
adb logcat | grep InputService
Hope this helps some others.
thanks after some research my TCL 55C825 work with:
HDMI1
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.tcl.tvinput%2F.passthroughinput.TvPassThroughService%2FHW1413744128
HDMI2
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.tcl.tvinput%2F.passthroughinput.TvPassThroughService%2FHW1413744384
HDMI3
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.tcl.tvinput%2F.passthroughinput.TvPassThroughService%2FHW1413744640
HDMI4
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.tcl.tvinput%2F.passthroughinput.TvPassThroughService%2FHW1413745664
Is anyone aware of a command that will take the TV to its Home Screen?
if you use Android TV integration, then just use the command “HOME” - it works in my case
Philips TV 55PUS7406:
HDMI 1
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.mediatek.tvinput%2F.hdmi.HDMIInputService%2FHDMI100004
HDMI 2
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.mediatek.tvinput%2F.hdmi.HDMIInputService%2FHW6
HDMI 3
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.mediatek.tvinput%2F.hdmi.HDMIInputService%2FHW7
HDMI 4
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.mediatek.tvinput%2F.hdmi.HDMIInputService%2FHW8
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
Hi everyone, sorry if this has been addressed before but I didn’t find this information anywhere.
I managed to select HDMI inputs (btw, thanks to everyone who contributed to this post!), but the only command I’m missing is… back to normal tv.
it isn’t and HDMI input, of course, and it’s not listed in my “inputs” settings.
It’s there (labeled “TV”) when pushing the input select button on my remote.
did anyone else solve this?
Hi again.
IT looks like it’s a system app called “tv live”, so I’d need to call this app.
Could you point me in the right direction to find the app id?
Try this one. It worked for my TCL tv:
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.tcl.tvinput%2F.TDTVInputService%2FHW1413742848
Here’s the HDM1 command for a Hisense A series TV. Verified working on model 65A65K specifically.
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.hisense.tv.hitvinput%2F.hdmi.HdmiTvInputService%2FHW4
Does anyone know if there are similar commands to change picture modes? (Ex: standard, cinema, game etc)
Hi all. I’m trying to get the correct command to switch the input of my XGMI Horizon Ultra to HDMI2, but I’m not having much luck. I thought the following command might work, but alas no:
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.xgimi.tvinput/.inputservice.Hdmi2TvInputService%2FHW2
I have connected to the projector using ADB and run the “dumpsys tv_input” as others have described in this thread, but I can’t seem to work out the correct command to switch the HDMI input. Annoying I tried the exact same process for my Sony Bravia TV and I can switch HDMI inputs on that TV fine. Which makes me wonder if this functionality isn’t exposed for the XGIMI Horizon Ultra projector?
Anyway, the output of the “dumpsys tv_input” is pasted below. Would someone cleverer than me (most people) mind taking a look and offering a suggestion please? It would be greatly appreciated if I could get this working.
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.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.xgimi.tvinput/.inputservice.Hdmi2TvInputService/HW2: info: TvInputInfo{id=com.xgimi.tvinput/.inputservice.Hdmi2TvInputService/HW2, pkg=com.xgimi.tvinput, service=com.xgimi.tvinput.inputservice.Hdmi2TvInputService}; state: 0
org.videolan.vlc/.PreviewVideoInputService: info: TvInputInfo{id=org.videolan.vlc/.PreviewVideoInputService, pkg=org.videolan.vlc, service=org.videolan.vlc.PreviewVideoInputService}; state: 0
com.xgimi.tvinput/.inputservice.Hdmi1TvInputService/HW1: info: TvInputInfo{id=com.xgimi.tvinput/.inputservice.Hdmi1TvInputService/HW1, pkg=com.xgimi.tvinput, service=com.xgimi.tvinput.inputservice.Hdmi1TvInputService}; state: 1
packageSet:
com.google.android.videos
com.xgimi.tvinput
org.videolan.vlc
clientStateMap: ITvInputClient → ClientState
serviceStateMap: ComponentName → ServiceState
ComponentInfo{com.xgimi.tvinput/com.xgimi.tvinput.inputservice.Hdmi1TvInputService}: com.android.server.tv.TvInputManagerService$ServiceState@2f5f053
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@522cd90
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@7d39689
bound: true
reconnecting: false
ComponentInfo{com.xgimi.tvinput/com.xgimi.tvinput.inputservice.Hdmi3TvInputService}: com.android.server.tv.TvInputManagerService$ServiceState@3eb068e
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@6e53eaf
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@30f32bc
bound: true
reconnecting: false
ComponentInfo{com.xgimi.tvinput/com.xgimi.tvinput.inputservice.Hdmi2TvInputService}: com.android.server.tv.TvInputManagerService$ServiceState@8561245
sessionTokens:
service: android.media.tv.ITvInputService$Stub$Proxy@c94fd9a
callback: com.android.server.tv.TvInputManagerService$ServiceCallback@fd116cb
bound: true
reconnecting: false
sessionStateMap: ITvInputSession → SessionState
mCallbacks:
android.media.tv.ITvInputManagerCallback$Stub$Proxy@cfabea8
android.media.tv.ITvInputManagerCallback$Stub$Proxy@da9249a
android.media.tv.ITvInputManagerCallback$Stub$Proxy@aca8dc1
android.media.tv.ITvInputManagerCallback$Stub$Proxy@5854a7
android.media.tv.ITvInputManagerCallback$Stub$Proxy@f911d54
android.media.tv.ITvInputManagerCallback$Stub$Proxy@219c554
android.media.tv.ITvInputManagerCallback$Stub$Proxy@ab144fd
android.media.tv.ITvInputManagerCallback$Stub$Proxy@e9a7c0e
android.media.tv.ITvInputManagerCallback$Stub$Proxy@7b48abb
android.media.tv.ITvInputManagerCallback$Stub$Proxy@c2b9443
android.media.tv.ITvInputManagerCallback$Stub$Proxy@76c2f3e
android.media.tv.TvInputManager$2@eb87c87
mainSessionToken: null
TvInputHardwareManager Info:
mConnections: deviceId → Connection
1: Connection{ mHardwareInfo: TvInputHardwareInfo {id=1, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=1, cable_connection_status=0}, mInfo: TvInputInfo{id=com.xgimi.tvinput/.inputservice.Hdmi1TvInputService/HW1, pkg=com.xgimi.tvinput, service=com.xgimi.tvinput.inputservice.Hdmi1TvInputService}, mCallback: android.media.tv.ITvInputHardwareCallback$Stub$Proxy@769319f, mConfigs: [], mCallingUid: 1000, mResolvedUserId: 0, mResourceClientProfile: ResourceClientProfile {tvInputSessionId=null, useCase=400} }
2: Connection{ mHardwareInfo: TvInputHardwareInfo {id=2, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=2, cable_connection_status=0}, mInfo: TvInputInfo{id=com.xgimi.tvinput/.inputservice.Hdmi2TvInputService/HW2, pkg=com.xgimi.tvinput, service=com.xgimi.tvinput.inputservice.Hdmi2TvInputService}, mCallback: android.media.tv.ITvInputHardwareCallback$Stub$Proxy@4e2c2ec, mConfigs: [TvStreamConfig {mStreamId=0;mType=1;mGeneration=0}, TvStreamConfig {mStreamId=1;mType=1;mGeneration=0}], mCallingUid: 1000, mResolvedUserId: 0, mResourceClientProfile: ResourceClientProfile {tvInputSessionId=null, useCase=400} }
mHardwareList:
TvInputHardwareInfo {id=1, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=1, cable_connection_status=0}
TvInputHardwareInfo {id=2, type=9, audio_type=-2147483616, audio_addr=, hdmi_port=2, cable_connection_status=0}
mHdmiDeviceList:
mHardwareInputIdMap: deviceId → inputId
1: com.xgimi.tvinput/.inputservice.Hdmi1TvInputService/HW1
2: com.xgimi.tvinput/.inputservice.Hdmi2TvInputService/HW2
mHdmiInputIdMap: id → inputId
mInputMap: inputId → inputInfo
com.xgimi.tvinput/.inputservice.Hdmi2TvInputService/HW2: TvInputInfo{id=com.xgimi.tvinput/.inputservice.Hdmi2TvInputService/HW2, pkg=com.xgimi.tvinput, service=com.xgimi.tvinput.inputservice.Hdmi2TvInputService}
com.xgimi.tvinput/.inputservice.Hdmi1TvInputService/HW1: TvInputInfo{id=com.xgimi.tvinput/.inputservice.Hdmi1TvInputService/HW1, pkg=com.xgimi.tvinput, service=com.xgimi.tvinput.inputservice.Hdmi1TvInputService}
</stop output>
Regards,
Matt
This works for me on a Hisense U8K TV:
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.vt.source.external%2F.hdmi.HdmiTvInputService%2FHW2
where
HDMI 1 = HW2
HDMI 2 = HW3
HDMI 3 = HW4
HDMI 4 = HW5
Hope this is useful to someone.
Can you show the complete code to insert, I do need the service to insert