PINE64

Full Version: Working towards Android TV
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Background:

I bought two 2GB boards with wifi module.

My intention was that one of those boards would replace my Raspberry PI running OpenElec as my media center. I have Kodi and Netflix installed from the play store. My main issue preventing the move is a better control mechanism than a wireless mouse.

So, like others here I would like to get the android remote working. The problem others have reported with that is that the remote doesn't pick up the pine as an android tv. To me, that says that something running on a "real" android tv isn't running on our current android builds. Searching for what that was eventually led me to:

Android Player Binaries

The binaries from Google in that table include 'Remote'. Sounds promising...

Downloading and extracting it gives me three apk files. The one I'm most interested in is AtvRemoteService.apk. I copied all three into my system apps directory of the mounted sd card. I also copied the libiperf.so file into a lib directory.

After booting, the Android TV Remote now detects PINE64 as a TV on my network. Big Grin I click connect, and my phone prompts for a 4 digit code, which is displayed on my TV. Unfortunately, that's when things go wrong. After I enter the code AtvRemoteService crashes. 

Those of you with programming experience will probably realise my error. The .so file I mentioned will be a compiled binary targeting a specific cpu architecture. The nexus player it was for is not a 64bit arm processor, so it isn't going to work on the pine. Fortunately, I've been able to track down that library down as iperf. The down side is that nearly all my programming experience is in the Windows world.

The following commands are as far as I've gone in building iperf for the pine on my ubuntu 14.04 box.

Code:
sudo apt-get install gcc-aarch64-linux-gnu
git clone https://github.com/esnet/iperf.git
./configure --prefix=$prefix --target=aarch64-none-linux
make
make install

I'm not 100% sure that's the right architecture to use etc. My wife is watching the tv, so I can't test the new .so file tonight. I'll post again with any further progress I make.
Are you able to go back to basics a bit on which image you used before installed apps/apks?

Thanks
This is a good find. I went looking at the link and I think the other two APKs (the Launcher and TV) are also main components of Android TV. I've found the launcher (called Android TV Launcher IIRC) on the Play Store but have been unable to get it working so far (it just crashes).
For me, this device is calling to be a GREAT Android TV item.  I think it is unfortunate that they did not get an image out for it.

They advertised 4K TV in the Kickstarter.  

Hopefully someone can get this to us soon.
I'm using android-ver5.1.1-20160505-pine64-8GB.img.

The part of the nexus binaries page I linked to isn't right for that image. Need to find the 5.1.1 binaries to be compatible with that.

Building iperf as my first post and placing the result in the system lib64 directory didn't change the behavior of the remote. It could be for the live TV app instead. (Makes sense to me at least)

I'm currently looking at https://github.com/opengapps/arm64. Lots of binaries sourced from different locations there. It appears one source of arm64 binaries is the shield android tv. The ones marked leanback should be of most interest. In particular the google services I'm still downloading those to see what I can get out of them though.
(06-17-2016, 04:10 AM)tomgeekery Wrote: [ -> ]I'm using android-ver5.1.1-20160505-pine64-8GB.img.

The part of the nexus binaries page I linked to isn't right for that image. Need to find the 5.1.1 binaries to be compatible with that.

Building iperf as my first post and placing the result in the system lib64 directory didn't change the behavior of the remote. It could be for the live TV app instead. (Makes sense to me at least)

I'm currently looking at https://github.com/opengapps/arm64. Lots of binaries sourced from different locations there. It appears one source of arm64 binaries is the shield android tv. The ones marked leanback should be of most interest. In particular the google services I'm still downloading those to see what I can get out of them though.

Leanbacklauncher is the name of the Android TV Launcher package. It may be that the other packages are also needed for it to run and why it was crashing for me.