Skip to main content
Capture Logs from Streaming Devices
Doris Sooläte avatar
Written by Doris Sooläte
Updated over 5 months ago

To capture logs from your Android TVs or Fire TV sticks, you will need to install the SDK platform tools on your computer (Mac or Windows), enable USB debugging in your Android TV settings and use command lines on the computer to capture the network activity from your connected device.

Once this initial setup is completed, you will be able to start capturing and saving logs from your TV or Fire Stick quickly and effortlessly.

Install SDK platform tools - ADB CLI

  • Windows

    1. Download SDK Platform tools from the official download page

    2. Extract SDK Platform tools archive files in a folder

    3. Open Windows command prompt > “adb” command can be used now

  • macOS

    1. Copy the Homebrew installation line (the command line is found on this page under the “Install Homebrew” header) into your macOS terminal (CMD + Space > Search for “Terminal” > Open). Press Enter once you pasted the Homebrew installation link into the Terminal window.

    2. Copy the android-platform-tools command line (the command line is on this page under the “android-platform-tools” header) into the terminal and press Enter.

  • Make sure to connect your Android/Fire TV and computer (Windows or macOS) to the same network

Enable USB Debugging on your TV and getting device IP Address

  • Android TV

    1. Open TV’s Settings menu > Device row > “About” section

    2. Scroll and click on “Build” info several times until “You are now a developer!” message is displayed on the screen

    3. From the Settings menu > Open the “Developer options” page > Enable “USB Debugging”

    4. Open TV’s “Network & Internet” settings section > Click on the WiFi network you are connected to > Take a note of the IP Address displayed

  • Fire TV

    1. Open Settings > My Fire TV > “About” section

    2. Tap on the Fire TV Stick option several times until “You are now a developer!” message is displayed on the screen

    3. Go back to My Fire TV > Developer options > Toggle “ADB Debugging” to ON

    4. Go back to My Fire TV > Network section > Take a note of the IP Address displayed

Capturing device logs on your computer over TCP

  • Open a Command Prompt window (Windows > Search for Command Prompt in your system’s Search bar > Open the Command Prompt app) or Terminal window (macOS > CMD+Space > Search for Terminal > Open Terminal)

  • Type “adb start-server” into your terminal window > Press Enter

    1. In case of any errors at this step, please make sure Android Platform Tools is installed correctly on your device as mentioned in the Pre-requisites above

    2. In case of success, the terminal will return a “daemon started” response

  • Type adb connect [device IP address:5555] (example: adb connect 192.168.123.123:5555) > Press "Enter"

  • On Android TV - Check for a prompt asking to “Allow USB Debugging?” > Make sure you Allow USB Debugging and click OK (if you have enabled USB Debugging, you can ignore the “Failed to authenticate to [Device]” error in your computer terminal.)

  • Type “adb devices” in the terminal > Press "Enter"

    1. If your TV’s IP address is returned in the terminal, the connection was successful

    2. In case of the IP address not appearing, please attempt a new connection following the instructions at point C above

  • Clear the log history to remove previous content by firing command adb logcat -c

  • Copy the file path of folder where you need to create logs file

    • On Windows : Navigate to folder > Click on Address bar in File explorer window > Copy file path

    • On macOS : Select folder > Right click > Click on Copy

  • Start capturing logs by firing command adb logcat -v time > [paste_file_path_from_above_step]\logs.txt

    • For e.g. It would look like adb logcat -v time > C:\testlio\logs.txt on Windows or adb logcat -v time > /Users/yourusername/crashlogs/logs.txt on macOS

  • Start reproducing the bug or crash > Press Ctrl + C to stop logging process in cmd/terminal once done > Log text file should be created in the specified folder

#TestlioBot

Did this answer your question?