Open Hjord opened 6 years ago
It is possible judging from the Android TV remote app.
GET activities/current
returns
{'component': {'className': 'com.google.android.apps.youtube.tv.cobalt.activity.ShellActivity', 'packageName': 'com.google.android.youtube.tv'}}
POST activities/launch
That payload needs to be send to the TV.
The TV should then execute the following code:
intent.setComponent(new ComponentName(pkgName, classPathToActivity)
So exactly the same thing the get is returning.
But I get a Bad Request 400, when posting it like this.
Anyone got any luck running apps remotely?
Any luck @fliphess ? Tried also MITM the hell out of the Android app, but I just can't get it to work
I was thinking about deploying some kind of web service onto TV that would run those intents. Over HTTP.
Hey, I managed to figure this out, you need to send the whole intent to the endpoint.
To fetch all the available applications, do a GET applications
request. There the interesting part is intent
. Once that is sent to POST applications/launch
, the application actually launches.
For example, the application for Finnish channel MTV is presented like this in the applications
endpoint (prettified for your pleasure):
{
"id": "fi.mtvkatsomo.androidtv.MainActivity-fi.mtvkatsomo",
"type": "app",
"intent": {
"action": "empty",
"component": {
"className": "fi.mtvkatsomo.androidtv.MainActivity",
"packageName": "fi.mtvkatsomo"
}
},
"order": 0,
"label": "MTV Katsomo"
}
To change to Katsomo app, POST
request must be done to the applications/launch
-endpoint with content
{
"intent": {
"action": "empty",
"component": {
"className": "fi.mtvkatsomo.androidtv.MainActivity",
"packageName": "fi.mtvkatsomo"
}
}
}
Amazing! Thanks so much :grin:
Started playing around with this again Actually it is "activities/launch" endpoint to start the app (at least on 43pus6401) with the payload you shared 💯
Oh, sorry. That was a typo in my previous message.
Is it possible to start installed apps with this?