If you are participating in a test with a streaming device like the Fire TV stick, you will need to attach a crash log file to your bug report in case of an app crash. This article covers the procedure in macOS and Windows.


macOS Logging

  1. At first, you need to install the Android SDK tool. You can download it here.
  2. After the installation is finished, launch Android Studio from the Application folder, select Do not import settings and click the OK button.

3. Finish the downloading process and Open Terminal.
4. In Terminal, type touch .bash_profile and press the Enter key. Type open .bash_profile and press the Enter key. A TXT file will open.
5. Go to the next line and paste the following text:

export ANDROID_HOME="Users/USER/Library/Android/sdk"
export PATH="${PATH}:/$ANDROID_HOME/platform-tools:/$ANDROID_HOME/tools:/$ANDROID_HOME/tools/bin"

6. Replace the word USER with your actual username, save the document, and close it.

7. Quit Terminal and open it again.
8. Type adb and press the Enter key. You've successfully installed the SDK tool if you can see the following output:

9. On your Fire TV Stick, go to Settings > My Fire TV > Developer options and make sure that both ADB debugging and Apps from Unknown Sources are turned ON.
10. On your Fire TV Stick, navigate to Settings > My Fire TV > About > Network and remember your IP address.

11. In Terminal, navigate to the directory where you would like to save your log file (for example by entering cd desktop).

12. In Terminal, type adb kill-server and press the Enter key.
13. Type adb start-server and press the Enter key.
14. Type adb connect 192.XXX.X.XXX (replace with your Fire TV Stick IP address) and press Enter.

15. On your Fire TV Stick, you should see the message Allow USB debugging?. Check Always allow and press the OK button.

16. You are now connected to ADB. In Terminal, type adb logcat > logfile.txt and press Enter. Logging will then start.

17. Reproduce the issue on your Fire TV Stick.
18. Once you are done, press CTRL+C in Terminal. Logging will then stop and the resulting log will be saved in the file you created earlier.


Windows Logging

  1. Install Java. You can download it here. If you are not sure if you already have Java installed, execute java -version in the Command Prompt shell. You should see the following output if it's installed:

2. Install the Android SDK tool. Visit their site, scroll down to Command line tools only and download the package for Windows.
3. Right-click on the downloaded file and select Extract All. Set the path C:\sdk-tools and click the Extract button.
4. In the Command Prompt shell, type cd C:\sdk-tools\tools\bin and press the Enter key.
5. Type sdkmanager.bat "platform-tools" and press Enter.

6. Type y and press Enter.

7. In File Explorer, navigate to Control Panel\System and Security\System and click Advanced system settings on the right. Then click Environmental Variables.
8. In System variables, highlight the Path line, click Edit and select New.

9. Type C:\sdk-tools\platform-tools and click OK.

10. In the Command Prompt shell, type C:\ and press Enter.
11. Type adb and press Enter. You've successfully installed the SDK tool if you can see the following output:

12. On your Fire TV Stick, go to Settings > My Fire TV > Developer options and ensure both ADB debugging and Apps from Unknown Sources are turned ON.
13. On your Fire TV Stick, navigate to Settings > My Fire TV > About > Network and remember your IP address.

14. In the new Command Prompt shell, navigate to the directory where you would like to save you log file (for example by entering cd Downloads).
15. Type adb kill-server and press the Enter key.
16. Type adb start-server and press the Enter key.
17. Type adb connect 192.XXX.X.XXX (replace with your Fire TV Stick IP address) and press the Enter key.

18. On your Fire TV Stick, you should see the message Allow USB debugging?. Check Always allow and press the OK button.

19. You are now connected to ADB. In the Command Prompt, type adb logcat > logfile.txt. Press the Enter key. Logging will then start.
20. Reproduce the issue on your Fire TV Stick.
21. Once the issue is reproduced, press CTRL+C. Logging will then stop and the resulting log will be saved in the file you created earlier.


Related articles and links: 

Did this answer your question?