Sideload TV Apps Onto Devices

Introduction

This document covers how to sideload a debug or release app build that has been downloaded from Zapp, onto TV devices.

Apple TV

note

This method only works for MACs

  1. Download and install Apple Configurator 2 from the Apple App Store

  1. Ensure your Apple TV and PC are on the same WiFi or wired network
note

Any firewalls may prevent the devices seeing each other. An option is to use a mobile hotspot if the Apple TV device is not shown in the configurator

  1. Ensure that your AppleTV Device has the Pairing option enabled in the "Remote App and Devices" category of the Settings section":

  1. Launch Apple Configurator 2.

  2. Pair your MAC with the Apple TV device as follows

Open Apple Configurator and select Paired Devices from the menu

On Apple TV go to Settings >> Remotes and Devices >> Remote App and Devices and wait for the pairing code to launch. Enter the code displayed on the Apple TV into the pop-up window on your MAC.

  1. When the Apple TV device is found the Apple Configurator screen should show as follows

  1. To sideload a tvOS .ipa app file download it from Zapp then drag and drop into the TV window displayed in Apple Configurator in step 6 above.
note

If you sideload a new version of an app, when you drag and drop into Apple Configurator 2 it will first ask if you want to replace the existing app.

note

If Apple Configurator 2 fails to find the Apple TV device, experience has shown the need to reboot both the Apple TV and your MAC and relaunch Apple Configurator 2.

Android TV and Amazon Fire TV

There is no 3rd party tool to allow sideloading of an Android TV .apk file onto either Android TV or Amazon Fire TV. The only approach is to have Android Studio installed on your pc and use the command line.

  1. Download and install Android Studio.

Once installed this will allow adb commands to be sent from the terminal

If you don't have android studio already... install Brew first:

  • Open the website https://brew.sh/ in your browser and then copy the command shown

  • Or just directly write the following command in Terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)

After installing Brew, then simply write the following command in Terminal:

brew cask install android-platform-tools

You will only need to do this once.

  1. Put your Android TV or Amazon Fire TV device into developer mode
  • Android TV Dev mode
    • Go to “Settings”
    • Select “About”
    • Select “Build” & click OK on this 7 times.
    • Go to “Home” and open “Settings” again, Developer options are now available in System Preferences.

Amazon Fire TV Dev mode https://developer.amazon.com/docs/fire-tv/system-xray-developer-tools.html

You can launch the Developer Tools menu in several ways:

  • Remote Control

    • On the directional pad, press and hold the center and down together (simultaneously) for 5 seconds; then release the buttons and press the remote's menu button.
    • Amazon Game Controller: Press and hold A and Y buttons together (simultaneously) for 5 seconds; then release the buttons and press the controller's menu button.
    • If ADB is already enabled on the Fire TV and a computer is connected, you can run the following command to invoke the dialog box:

    adb shell am start com.amazon.ssm/com.amazon.ssm.ControlPanel

  1. Find the IP address of your Android TV or Amazon Fire TV device. This will be found in the respective network settings of the device.

  2. Open terminal on your pc and enter adb connect ---.---.---.--- replacing ---with the IP address of your device.

note

The first time you do this your TV device will ask for you to allow connections from your pc. Select "always"

note

To check what you are connected to use the adb devices command to return the IP address. You might be connected to more than one device but you can only install an app to one connection. Use adb kill-erver then adb start-server to remove any connections.

  1. To install an app enter adb install then drag in the downloaded .apk file from Zapp.
note

Before installing a new version of an app the old one must be uninstalled from your TV device or the install process will give an error

  1. Sometimes your Android device can loose connection with your pc and give the following error when trying to connect: $ADB_VENDOR_KEYS is not set In which case perform the following:

First try the command adb kill-server followed by adb start-server and try again. If that does not work

  • On your PC go to this directory in Finder: ~/.android/adbkey/
  • Delete the 2 files adbkey and adbkey.pub
  • In terminal type adb kill-server then adb start-server
  • Then type adb connect IPddressofTVdevice
  • Look for the message on the Android TV device to accept the connection
  • Accept the connection and then install your app

LG TV

  1. The only way to side load an app onto an LG WebOS TV is to use the LG tool suite. LG describe the full process of setting up your environment here https://webostv.developer.lge.com/develop/app-test

Once this is done then installing an app on a TV requires the following steps.

  1. Launch the LG Developer App on your TV and sign in with your LG account user name and password. The app uses 2 factor authentication so the first time your sign in it will respond that authentication is required. Check your email and click on the confirm link within it. Then re-enter your username and password in the LG Developer App. It may reboot the TV during this process.

  2. If necessary extend the developer time within the LG Developer App. The app allows 50hrs (absolute time, not run time) before this has to be reset.

App cache can also be cleared from here.

note

Side loaded apps are auto deleted from the TV after 50hrs and need to be reinstalled as required.

  1. Launch the WebOS IDE tool from your PC (installed in step 1 above).

The following window will open. Find your TV device in the lower right hand corner and double click on it (the specific name shown will be as given during the setup step 1 above - here the TV is named webOS_TV). The connection to the TV will be made.

  1. Launch the webOS CLI* Command Line tool

  1. Download your LG TV app .ipk file from Zapp and enter the following command in terminal (change webOS_TV for the exact name given to your TV during the setup process) ares-install -d webOS_TV and drag the .ipk file onto the end of the command. This app will now install in approx 5 seconds and will appear in the app home rail of the TV (usually on the right hand end of the app list).

note

To delete an app off the TV long press OK on the TV remote whilst selecting the app in the app rail. The delete option will now come up. This long press command also allows the app to be moved within the app rail.

Samsung TV

There are 2 possible methods to side load an app onto a Samsung TV

Method 1 USB memory stick

Setup a Samsung Seller account here. https://seller.samsungapps.com/ This will be necessary regardless in order to submit apps to the Samsung store. Once signed up, contact your local Samsung representative (use the 1:1 Q&A tool in the portal) and ask for the USB demo tool permission to be added to your account. Once done (discretion to activate this is under the control of Samsung) a USB install tool will be visible on the home page of your Seller Account portal.

  • Download your Samsung app from Zapp.
  • Unzip the file on your pc to create the .wgt file
  • Make sure this file has no spaces or special characters in it, just alpha numerics
  • Upload the file to the USB demo tool
  • The file will be converted to 2 new files: .tmg and a licence file
  • Download these and add them to a USB memory stick under a folder called userwidget
  • Plug the memory stick into your TV and the app will auto load. There is no need to select any responses seen on the TV screen during the process
note

Experience has shown the USB upload tool can sometimes fail for no obvious reason and it is not possible to debug. Turning the TV off and on again, ensuring there are no other sideloaded apps already installed can help. Sometimes it starts to work again for no reason

Method 2 Command Line

  1. Install the Tizen Studio SDK suite detailed here https://developer.samsung.com/smarttv/develop/getting-started/setting-up-sdk/installing-tv-sdk.html (make sure to include the TV extensions as also explained in the article).

  2. Setup a connection from your PC to your TV

https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html

  • Launch Tizen Device Manager App from your PC

  • Select the Remote Device Manager Introduction

  • Add a new TV device - give it a name and enter the TV's IP address found from the network settings menu of the TV. (Leave port settings as 26101)

  1. Setup a connection from your TV to your PC
  • On your TV go to the Samsung main Apps screen and enter 1,2,3,4,5 on the remote control
  • The following screen should appear.

  • Turn devmode on and enter the IP address of your PC.
  • Select OK and turn the TV off and on
  • The TV should now be in developer mode. Return to the main app screen to check this - it will be indicated at the top of the screen.
  1. Establish the connection between PC and TV
  • Return to Tizen Device Manager and turn the connection on

  1. Download your Samsung TV app from Zapp and unzip it to see the .wgt file.

Make sure this file has no spaces or special characters in it, just alpha numerics

  1. In terminal enter the following command sdb devices The model number of the TV should be returned similar to as below

Enter the command tizen install -t model number --name drag .wgt file here and the app will load on the TV in less than 5 seconds

note

App load failure on Samsung can be down to the following issues

  • App file name has spaces or special characters in it.
  • A previous version of the app is already installed. Delete it first.
  • The TV has no memory left to install the app. Delete some other apps to make space. (Go to the settings icon on the main App screen. This will indicate the memory available). Samsung TV apps have pre-installed apps and on some TV models (notably some 2017 Tizen 5 models) this memory is completely taken up by the pre-installed apps with no space left to download user app. These cannot be deleted. The only solution is to use another TV.
  • If the app is a release build with Samsung Certificates added then the device UID (DUID) of the TV where you wish to install the app must have been added to the distributor certificate during its creation. Follow the process here https://developer.samsung.com/smarttv/develop/getting-started/setting-up-sdk/creating-certificates.html