In some cases, a customer might provide the app as a .apk file which you will need to install on your TV to start testing. The quickest way to install .apk files to your Android or Fire TV is by using the Android Debug Bridge (ADB). In this article, you will find out how to install the .apk files to your TV over ADB, so let's start.
Part 1: Launching ADB and Activating USB debugging on Android and Fire TV
To install the .apk file to your Android or Fire TV you will first need the Android Debug Bridge (ADB).
You will need to download SDK Platform Tools to install apps over ADB for Windows. You can download SDK Platform Tools here.
For macOS, you will need to install android-platform-tools using Homebrew. Installation instructions you will find further in this article.
Launching ADB on Windows and macOS
After you download SDK Platform Tools you will need to extract files (folder) from there. When you extract files (folder), you need to open extracted folder. After you open the extracted folder, click on free space in the Address bar of File explorer; then, when the File path is shown, type cmd and press ENTER on your keyboard. This will launch cmd (Command Prompt) inside the folder, and in this way, ADB is started.
The first thing you need to do is to install Homebrew using Terminal, and after that, install android-platform-tools. To install Homebrew on your macOS, visit the Homebrew website and copy the installation link under the Install Homebrew part. After you have copied the installation link, paste it into Terminal and press Enter on your keyboard. The Homebrew will start with installation. Follow the installation instructions to the end.
To install android-platform-tools, visit the android-platform-tools Homebrew Formulae website and copy the Installation command. After you copy the installation command, paste it into Terminal and press Enter on your keyboard. The installation will start then. After the installation is finished, type in Terminal adb and press Enter. If you see ADB's commands, the installation was successfully performed.
Part 1a: Activating USB Debugging on your Android TV and getting the device IP address
1. Open the Settings app.
2. Navigate to Device Preferences.
3. Open the About part.
4. Scroll down and tap on the Build repeatedly until you see a message You are now a developer!
5. Now, when you become a developer, go back to the Device Preferences screen, and find and open Developer options.
6. Find the USB debugging option and enable it by tapping the toggle button.
7. Navigate back to the Settings screen and open Network & internet.
8. After you open Network & Internet screen, tap on the connected Wi-FI network and remember the device's IP address below the IP address section.
Part 1b: Activating ADB Debugging on your FireOS and getting the device IP address
1. Navigate to the Settings section.
2. Open My Fire TV.
3. Open the About part.
4. Tap on Fire TV Stick option repeatedly until you see a message telling you you are a developer.
5. Go back to My Fire TV screen and open Developer options.
6. Tap on ADB debugging to make it ON.
7. Go back to My Fire TV screen and open the About part.
8. Place focus on Network and remember IP Address.
Part 2: Installing the .apk via ADB
1. In previously opened cmd (Windows) or Terminal (macOS), type adb start-server and press Enter on your keyboard. This will start the ADB server.
2. Now, you will need to connect your PC to your Android / Fire TV device. Make sure that your devices are connected to the same network.
3. In opened cmd or Terminal, type adb connect device_ip_address (example: adb connect 192.168.31.35) and press Enter on your keyboard.
3a. If you see a "failed to authenticate to device_ip_address" message in cmd or Terminal, it is probably because a screen Allow USB debugging? is shown on your TV; on that screen, press the OK button. Also, you can check Always allow from this computer, and tap on OK to ensure that you are not asked repeatedly when you try to install the app.
4. Now type in cmd or Terminal, adb devices and press Enter; this will list devices connected to your PC, and make sure that your device is on the list.
5. To install the app, you must type the following command: adb install file_path_to_the_apk and press Enter on your keyboard. After you press Enter on your keyboard, you should see the info message Performing Streamed Install. Now wait a bit, and when you see the info message Success, you will know that your app was successfully installed.
6. Find a previously installed app on your TV and start testing!