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.
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
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
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