debugging for Fire TV
charles proxy
For Fire TV, we are able to debug only debug builds using Charles Proxy. We also need an SSL certificate specifically for the Fire TV apps that we are testing.
First, we need to install Charles Proxy on our computer (https://www.charlesproxy.com/download/). Then we have to do a few more things to complete set up:
Install the SSL certificate that we downloaded for the Fire TV on our machine.
Enable SSL Proxying (enter * as the host).
Enable Transparent HTTP Proxying (enter 8888 as the port).
Enter * in the host field for Recording Settings to make sure all traffic is being recorded.
manual proxy on the fire tv
We now have to enable the manual proxy on the Fire TV itself to send traffic to Charles on our PC:
Open Command Prompt on your PC.
Point to your platform-tools folder (ex. cd c:/Users/user/android-sdks/platform-tools).
Connect to your Fire TV (adb connect FIRETVIPADDRESS).
Make sure you’re connect by typing in adb devices (this will show the list of devices connected).
Type in adb shell am start com.amazon.ssm/com.amazon.ssm.ControlPanel and hit enter.
The control panel should now appear on your Fire TV.
Scroll down to the Network Proxy option and select it.
Select the Manual option.
Enter the IP address of your PC (Charles -> help -> local IP address).
Enter 8888 into the Proxy port.
You might have to leave the “Bypass proxy for” empty or enter something in there in case certain app functionalities are blocked by this (ex. “localhost” to unblock live playback).
Fire TV app traffic
Now we can launch Charles and then the app we want to test and debug. We should immediately see traffic appearing for the app (config, screens, video player calls, etc). If we drill down through the calls we’re interested in we can view the info for the requests and responses. We can also view this info in Charles in two different ways:
Sequence display where you can view the requests in the order that they occur.
Structure display which shows requests sorted by the host name which can be expanded to show folders.
Remember to reopen the control panel on your Fire TV and disable the proxy when you’re done and replace the Fire TV SSL certificate with the one for your PC.