"Where to find Crash logs on Streaming devices and how to get them?"
In case of crashes on a Streaming device, device logs are mandatory as a key component of your bug report. They can also be useful for app freezes. Only logged information can provide detailed insight into the circumstances of the issue.
In this article, you will find how can you retrieve log information for your Streaming devices. Applying these techniques will allow you to record and attach meaningful log files to your reports.
Getting crash logs on Android TV, Android TV Streaming devices and FireOS
For getting crash logs from Android TV, Android TV Streaming devices, and FireOS we recommend using Android Debug Bridge (ADB).
For Windows in order to get crash logs via ADB, you will need to download SDK Platform Tools. 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 extracted folder, in the Address bar of File explorer click on free space, then when the File path will be shown, type cmd and press ENTER on your keyboard. This will launch cmd (Command Prompt) inside the folder, and in this way, ADB is basically 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.
After Homebrew is finished with the installation, you will need to install android-platform-tools. To install android-platfrom-tools, visit the android-platform-tools Homebrew Formulae website, and copy the Installation command. After you copied 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 commands, this means that the installation was successfully performed.
In order to create logs, you will need to activate USB/ADB Debugging in Developer options on your Android TV / Android TV Streaming device and/or FireOS and execute commands in previously opened cmd (Windows) or Terminal (macOS). If you have already activated those options, and you know the device IP address, you can skip to Part 2.
Part 1a: Activating USB Debugging on your Android TV / Android TV Streaming device 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, find and open Developer options.
6. Find the USB debugging option and enable it by tapping on the toggle button.
7. Navigate back to the Settings screen and open Network & internet.
8. After you opened 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 that you are a developer.
5. Go back to My Fire TV screen and open Developer options.
6. Tap on ADB debugging in order 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: Creating logs
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 TV / Android TV Streaming device or FireOS device. Make sure that your devices are connected to the same network.
3. In opened cmd or in Terminal, type adb connect device_ip_address (example: adb connect 192.168.100.136) 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 make sure that you are not asked over and over again when you try to get crash logs.
4. Now type in cmd or in 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 create a log for the reproducible issues, first clear the log history to remove unnecessary content by entering adb logcat -c and pressing Enter.
6. Now is the time to capture logs.
6a. If you want to create a log in the current folder (where platform tools are on Windows), you can type in cmd adb logcat -v time > crashlog.txt and press Enter on the keyboard. The logging process will start after pressing Enter.
6b. If you want to create a log in some other folder, you need to copy the file path of that folder (On Windows: Navigate to target folder --> Click on free space in the Address bar in File explorer --> Copy file path; On macOS: Select folder which you want --> Right click on it --> Click on Copy), after you have copied file path, in cmd or Terminal type adb logcat –v time > paste_file_path_here\log.txt and press Enter on keyboard (Command on Windows should look like this: adb logcat -v time > D:\testIO\Logs\crashlog.txt ; While on Mac it should look like this: adb logcat -v time > /Users/testIO/log/crashlog.txt). The logging process will start after pressing Enter.
7. Now that you have started logging, reproduce the bug or crash for which you want to create a log, and once you are done, in cmd or Terminal press CTRL + C, this will stop the logging process, and you should be able to see now your log file in the specified folder.
Video explanation: 6a. Creating a log in the current folder where platform tools are
Video explanation: 6b. Creating a log in some other Destination (Windows)
Video explanation: 6b. Creating a log in some other Destination (MacOS)
Getting crash logs on Apple TV
Getting crash logs from your Apple TV device is pretty easy, and everything you will need is a Mac PC or iPhone / iPad, so that you can transfer logs over the AirDrop feature. To do so, proceed as follows:
1. Go to Settings on your Apple TV.
2. Open the General part.
3. Now open the Privacy part.
4. Scroll down to Analytics and Improvements section and open Analytics Data.
5. Here you will see all logs on your Apple TV device. Find and Open the relevant crash log.
6. After you open the relevant crash log, tap on the Share button and share the log via AirDrop to your device.
7. Upload the log to your Bug report.