Welcome to the AndroidTV driver for myServer 6.
AndroidTV is a highly popular media management content player. Now, you can add a user interface within your myServer system where you can launch AndroidTV installed apps like Kodi, Plex or Netflix.
The AndroidTV driver is very flexible. It works with most AndroidTV based media devices, like the FireTV stick. You can choose which player you would like to launch. Control the AndroidTV transport controls. And of course the user interface is completely configurable using myDesigner!
Big Feature: As the AndroidTV boxes support "CEC" control, you can control a CEC compatible TV functions (Power, volume, input source etc) without need for the dumb TV to be connected directly to myServer (traditionally via serial, IR or TCPIP). Simplifies the setup significantly. Just plug a FireTV stick into the TV, connect FireTV to WiFi, and control the TV via myServer events and user interfaces.
How it Works:
myServer 6 connects to the AndroidTV device via ethernet (wired or WiFi). myServer then looks up the coverart from our Internet sources. Since myServer also support many physical remote controls, the user can also use an integrated remote for the transport functions - even if the AndroidTV stick is not in the same room - even over the Internet!
System Requirements:
- myServer v6 (latest as of 4/14/2022 +)
- Latest myDesigner (as of 4/14/2022+)
- FireTV (running AndroidTV OS) stick installed and on same network as myServer controller.
- Kodi (v17), Plex or Netflix application running on the AndroidTV stick.
App Installation:
- Shutdown myServer 6.
- Download and run the AndroidTV driver installer from myInstaller on the primary myServer 6 PC.
- Download and install latest myDesigner. Run it and Update Project Files on all HTML projects.
- Restart myServer 6.
FireTV installation (example):
- Unpack FireTV4K Max stick and accessories
- Install batteries in FireTV handheld remote
- Plug FireTV HDMI into HDMI monitor
- Best is to use an ethernet adapter to FireTV Power connection and not use Wifi for reliability (optional hardware purchase)
- Boot the FireTV stick
- Click FireTV remote. Click the Play / Pause button when advised.
- Select your Language / Market
- Wifi will search for your Wifi Access Point (if no ethernet connection)
- Select your Wifi access point and add your Wifi Password
- The FireTV stick will then download and install software updates from FireTV server (not myServer). Do not disconnect from power during this upgrade.
- FireTV stick will reboot with latest OS installed. Will make another check for Updates and install.
- You will be asked to either Login or create an account. If you choose to Login, you will be provided an Activation Code to be used on amazon.com/code
- Once you register your device with your Amazon account via the website, the FireTV stick will try to login to your account.
- Allow the system to register the device to your account.
- You will be asked if you want to add your historic apps / settings.
- You will be asked if you want to enable Parental Controls.
- You will be asked what TV you are using. If you are using myServer 6 to control your TV directly, then the FireTV doesn't need to "know" what type of TV you are using it with.
- After your TV choice you might be asked to check volume support by clicking volume up / down. If you accept that this is working, the setup should then be complete.
FireTV ADB Configuration:
- Ensure AndroidTV stick is on same network as myServer 6.
- Click on the My FireTV settings within the AndroidTV Settings menu
- Click on About AndroidTV. Click on Developer Options. Click on Enable ADB. Save.
- Restart AndroidTV stick to ensure your settings are in effect.
1. Goto Settings on the Shield.
2. Go across to About in Device.
App Configuration:
- Configure your chosen app (Kodi, Plex, Netflix) as per that apps documentation
AndroidTV Driver Commands:
Use Command Builder to see the current supported commands and their syntax.
The driver natively knows how to launch Kodi, Tablo, Games, YouTube and Prime Video. Additionally it supports a custom launch command that will let you integrate any new app you find in the future. (However, if it is an app with wide appeal still tell us about it)
To use the custom launcher the command looks like
AV|<<id>>~Launch~<<app name>>
e.g.
AV|12~Launch~monkey -p com.google.android.youtube.tv 1
notice you do not need to include the "adb shell" bits.
Some Tidbits:
The AndroidTV driver uses "ADB" (Android Development Bridge). You can read more here: https://developer.android.com/studio/command-line/adb
This allows ability to control the Android application running on the AndroidTV stick. It also allows control of a CEC compatible device (like the TV).
You can also use ADB to install / uninstall an application (like Kodi or myUI.apk) remotely on the AndroidTV device (like a FireTV stick). Note there is also a Install Digital Signage...this is software that installs to a FireTV 4K stick that enables Allonis's myDigitalSignage system.
ADB is downloadable here: https://developer.android.com/sdk/index.html
Note that ADB is already installed on myServer with the AndroidTV installation. myUI and Kodi.apk and DigitalSignage are already installed to the myServer\downloads\apk directory. Don't move these files directly into the downloads directory. Keep them in the apk directory.
- On the myServer PC, shutdown myServer. This is because only one instance of ADB can be connected to a device at one time.
- Download to the myServer\adb\files directory the app you would like to install. (note: for FireTV stick - download the 32bit Android version of the wanted app)
- Restart the AndroidTV box to clear any prior ADB sessions.
- Ensure ADB is enabled in the Android About Developer's menu
- From the myServer PC, open an Administrator's Command Prompt.
- cd c:\Program Files (x86)\Allonis\myServer\ADB
- type: adb connect <<IP address of the AndroidTV device>> Sometimes you have to do this twice...
- type: .\adb install <<path to apk file>> example: .\adb install files\kodi-18.0-Leia_rc5.2-armeabi-v7a.apk
- Your apk file should install on the AndroidTV device. In a few minutes it should say "Success"
- Once your app is installed, you can do a "adb disconnect" to have the AndroidTV box release the Command Prompt device connection.
- Start myServer.
- Restart the AndroidTV device. You likely will be asked on the AndroidTV box if you want to enable ADB on XXXX device. Select Always and Yes. This should be re-enabling the connection to myServer's ADB instance.
- You can also "adb uninstall <<application name>>" When you are ADB connected to the device.
- You can also do a "adb devices" command to see what devices are currently connected to your Command Prompt device (not the AndroidTV device).
For easy remote management of the AndroidTV box, try using Teamviewer Host app: https://www.teamviewer.com/en/download/mobile-apps/
You can install Teamviewer host initially via ADB (see above) and then connect via your desktop PC via TeamViewer.
CEC remote control:
Here is how things connect: myServer running AndroidTV driver <> Ethernet <> Wifi Access Point <> WiFi <> FireTV stick <> HDMI cable <> Dumb CEC compatible TV
CEC compatible functions:
const int KEY_TV_ANTENNA_CABLE = 242;
const int KEY_TV_AUDIO_DESCRIPTION = 252;
const int KEY_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254;
const int KEY_TV_AUDIO_DESCRIPTION_MIX_UP = 253;
const int KEY_TV_CONTENTS_MENU = 256;
const int KEY_TV_DATA_SERVICE = 230;
const int KEY_TV_INPUT = 178;
const int KEY_TV_INPUT_COMPONENT_1 = 249;
const int KEY_TV_INPUT_COMPONENT_2 = 250;
const int KEY_TV_INPUT_COMPOSITE_1 = 247;
const int KEY_TV_INPUT_COMPOSITE_2 = 248;
const int KEY_TV_INPUT_HDMI_1 = 243;
const int KEY_TV_INPUT_HDMI_2 = 244;
const int KEY_TV_INPUT_HDMI_3 = 245;
const int KEY_TV_INPUT_HDMI_4 = 246;
const int KEY_TV_INPUT_VGA_1 = 251;
const int KEY_TV_MEDIA_CONTEXT_MENU = 257;
const int KEY_TV_NETWORK = 241;
const int KEY_TV_NUMBER_ENTRY = 234;
const int KEY_TV_POWER = 177;
const int KEY_TV_RADIO_SERVICE = 232;
const int KEY_TV_SATELLITE = 237;
const int KEY_TV_SATELLITE_BS = 238;
const int KEY_TV_SATELLITE_CS = 239;
const int KEY_TV_SATELLITE_SERVICE = 240;
const int KEY_TV_TELETEXT = 233;
const int KEY_TV_TERRESTRIAL_ANALOG = 235;
const int KEY_TV_TERRESTRIAL_DIGITAL = 236;
const int KEY_TV_TIMER_PROGRAMMING = 258;
const int KEY_TV_ZOOM_MODE = 255;
Example of CEC command: AV|75~CEC~Power~Off
You can now install the myServer Kodi Application to play a movie. Click HERE
Connectivity via ADB
sudo nmap -p- 192.168.1.41 Checks if any ports are open. ADB default is 5555
adb tcpip 5555 If connected via a USB cable, sends ADB via ethernet
adb connect 192.168.1.44:5555 Connects the computer to the ADB device.
Documentation below in in process and not to be used (yet)