This page explains the setup steps required to test Android TV in a local PC environment. The instructions here cover the setup process using a Mac PC with a physical Android TV device. Note that Windows PC is not supported.
*Not compatible with Fire TV OS, Tizen, or webOS.
*Android TV testing is not officially supported. If any issues arise, we will assist with troubleshooting to the best of our ability; however, there may be cases where an immediate response is not possible. We appreciate your understanding in advance.
* Tested on the following device: SONY KJ-43X8500H
For MagicPod's supported environments, please refer to the Supported Environments page.
Table of Contents
1. PC Setup
Please refer to the "Android setup in the local PC environment" page and complete steps 1 (Java) and 2 (Android SDK setup), including the installation of Android Studio and the Android SDK.
2. Android TV Device
You will need to prepare an Android TV device and enable developer settings.
First, navigate to Settings from the home screen of your Android TV device.
Next, select System, then Device Information. From there, select Android TV OS Build and tap it seven times.
Developer Options will then appear in the System menu. Navigate to it.
Once there, configure the settings as follows:
- Turn Developer Options, Stay Awake, and ADB Debugging ON.
- Turn Monitor ADB-installed Apps (may also appear as "Verify apps installed via ADB/ADT") OFF.
- Set Window Animation Scale, Transition Animation Scale, and Animator Duration Scale to Animation off.
3. USB Cable or ADB Connect
Connect your Android TV device and PC using a USB cable. During test execution, this cable is used to control the device from your PC.
Alternatively, connect your Android TV device and PC to the same Wi-Fi network and run the following command in your terminal to establish a connection:
adb connect xxx.xxx.xxx.xxx:5555
Replace xxx.xxx.xxx.xxx with the IP address of your Android TV device. You can find the IP address under the Network & Internet section on your Android TV device.
With the default settings, the connection is available on port 5555.
4. App to Be Tested
Either install the target app on the device in advance, or prepare the APK file for the app and place it in a convenient location on your PC.
Since APK files are a standard format that any Android developer routinely works with, you should be able to get one by contacting the app's development team.
5. Remote Control Operations
To perform remote control key input, use the "Keyboard Key Input" command, select "Key Code," enter the corresponding keycode, and run the command.
-
KEYCODE_DPAD_UP— Remote ↑ key -
KEYCODE_DPAD_DOWN— Remote ↓ key -
KEYCODE_DPAD_LEFT— Remote ← key -
KEYCODE_DPAD_RIGHT— Remote → key
For other keycodes, please refer to the official Android documentation: Keyboard Devices | Android Open Source Project