26

What protocol does an Android TV Remote use? Seems like Anymote is no longer used. But there are still applications like Android TV Remote Control and Remote Android TV which work quite well with even the newer Android TV's. Can someone please point out any official / unofficial documentation to write such apps?

An Android TV is capable of being controlled over either Bluetooth or over WiFi. It would be great if either one of this follows an open protocol that can be incorporated in to say a Python or Android program.

Few Clarifications based on the various comments and replies:

  • Anymote is most certainly not the protocol in use any more (unless it's hidden and can still be used somehow in an undocumented fashio)

  • The ports that Android TV remote uses currently (6466/6467) is different from the Anymote standard ports (9552)

  • The old open source GoogleTV remote application no longer works with AndroidTV

  • I still do see "_androidtvremote._tcp" being advertised through mDNS - so there is a way to control it over TCP.

Ashwin
  • 393
  • 1
  • 4
  • 10
  • It's controlled over `Wi-Fi` or `Bluetooth` but I don't know the protocol. I found this old question that maybe helps: https://stackoverflow.com/questions/4662236/how-android-remote-control-works-with-google-tv?rq=1 – Iulian Popescu Sep 20 '17 at 09:45
  • Unfortunately, like I mentioned in the question, seems like Anymote is no longer being used (I have tried out options like https://github.com/stevenle/googletv-anymote and https://github.com/entertailion/Anymote-for-Java with no luck). Also, based on the Packet captures of "Android TV Remote Control" app traffic, I think the port for remote control app is talking over TCP port 6466/6467. – Ashwin Sep 20 '17 at 16:30
  • It's appears Android TV remote protocol is not the same as the [Google TV](https://stackoverflow.com/a/8898839/470117) use – mems Sep 23 '17 at 17:19
  • Yep - Google TV has been retired I guess. Anymote and most of the other Google Remote open source code were all for Google TV unfortunately. But AndroidTV too has a remote control application. It advertises a service called _androidtvremote._tcp over mDNS. And like I mentioned in the question "Remote Android TV" - a 3rd party app, seems to be able to pair with my Android TV Set Top Box! Which all hopefully means that Anymote has been replaced with something still open – Ashwin Sep 24 '17 at 04:39
  • @Ashwin Reverse engineer the app. This only way you can know. – Sunny Sep 26 '17 at 05:15
  • 1
    I've found this: https://android.googlesource.com/platform/external/google-tv-pairing-protocol/ According to decompiled sources of original application, this is exactly what we are looking for – Dmytro Rostopira Oct 31 '17 at 22:49
  • I know it's a very old question, but if you found a solution, please share it! Thanks. – AymKdn Feb 17 '21 at 17:36
  • Did you find the solution @Ashwin? Could you please share it? Thank you so much! – Sinh Phan Feb 12 '22 at 16:39
  • Sorry folks - No luck at my end and at some point, gave up - and the protocol itself changed at some point after I posted this question. – Ashwin Feb 14 '22 at 09:19

3 Answers3

4

The Google TV Remote application uses Google's Anymote Protocol, which any application can use to create second screen style applications. There are several pieces to the Anymote Protocol.

vishal jangid
  • 2,967
  • 16
  • 22
1

Not a sufficient answer, but may help anyone looking:

I have recently got in the same situation as you. From my finding, I suspect the pairing protocol is implemented in some Android core library (the com.google.polo.* java package in old references).

At the moment, search engines only yield this one repo archive of legacy code. I tried to adjust the various (obsolete) polo & protobuf versions together, but I always get a different error.

I think the solution would be to locate an up-to-date polo library (from the Android SDK?).

0

I know that you indicate that Anymote is not used in GoogleTV, but from a quick download of its source code, it appears that Anymote is used.

com.google.android.apps.tvremote.protocol.AnymoteSender

The only other "sender" I can see in the protocols is a "DummySender" (noop) and a QueuingSender (delays until a Sender is ready).

The source code for GoogleTV is here. If there is any other protocol available, it will be referenced in this source code.

I would double-check other items to ensure that a pairing issue, the wrong device discover, or another thing isn't blocking your progress with Anymote.

Edwin Buck
  • 69,361
  • 7
  • 100
  • 138
  • 1
    Like I mentioned earlier, GoogleTV itself has been retired and replaced with AndroidTV. The AndroidTV remote operates on a different port and Anymote is no longer advertised through mDNS. Just to confirm, i tried the Google TV remote application that you shared too and it doesn't pair with the Android TV. – Ashwin Sep 27 '17 at 17:36
  • @Ashwin Thank you for the clarification. I hope you have success in solving this problem. – Edwin Buck Sep 27 '17 at 21:26