Developer Console

Viewing secure (SSL/HTTPS) traffic from your app on Fire TV

Travis Ah King Nov 02, 2018
Share:
Fire TV How to
Blog_Header_Post_Img

When integrating features in your app that communicate over the internet, you may need to view SSL/HTTPS traffic for various reasons. For example, if you are implementing analytics in your app and notice data discrepancies with your analytics provider, you could inspect the exact data that is being sent to/from your app to isolate if the root cause of the discrepancy originates from the app. Analytics data is typically encrypted, therefore you need a mechanism to view the encrypted data in plain text to effectively troubleshoot.

With proxy support on Fire TV and using a popular proxy tool such as Charles Proxy, you can set up your Fire TV environment to view SSL/HTTPS traffic in plain text.

Prerequisites

  • Fire OS 6
    • Fire TV (Gen 3)
    • Fire TV Cube
    • Fire TV Edition Toshiba
    • Fire TV Edition Insignia
    • Fire TV Stick 4K
  • Charles Proxy, with SSL proxy support configured
     

1. Setting a proxy on Fire TV

1. Bring up the Developer Tools Menu by one of the following two ways:

a. Remote: 1) Press and hold the Select and Down buttons for five seconds release and then 2) Press the menu button

b. ADB: adb shell am start -n com.amazon.ssm/.ControlPanel

2. Select Network Proxy

a. Select Manual

b. Enter your Charles proxy IP address

c. Enter your Charles proxy port

d. Click Save

Developer Tools Menu - Network Proxy

Developer Tools Menu - Network Proxy

Network Proxy - Enter Proxy information

Network Proxy - Enter Proxy information

2. Embed the Charles Root Certificate in your app

1. Add this file to your app, with the following contents: res/xml/network_security_config.xml

file: res/xml/network_security_config.xml

2. Add the Charles root certificate, in PEM (or DER) format, to res/raw/my_ca

a. Charles Proxy > Help > SSL Proxying > Save Charles Root Certificate...

b. Rename the saved file to my_ca and copy the file to res/raw

 

3. Build your app and check Charles Proxy

References:

Related articles

Sign up for our newsletter

Stay up to date with the latest Amazon Developer news, industry trends and blog posts.