This is for visibility only and will not be updated.
Please view the main repository for Firetastic.
This repository contains the source code for the Firetastic tool developed for, and used in, the paper "The TV is Smart and Full of Trackers: Measuring Smart TV Advertising and Tracking." Firetastic enables automated installation and interaction with Fire TV apps (channels) while logging the Fire TV device's network traffic. For a more detailed description of Firetastic (and Rokustic, Firetastic's sibling tool for Roku), please refer to the aforementioned paper and the project website.
If you create a publication (including web pages, papers published by a third party, and publicly available presentations) using Firetastic and/or the accompanying smart TV dataset, please cite the corresponding paper as follows:
@article{varmarken2020smarttv,
title={{The TV is Smart and Full of Trackers: Measuring Smart TV Advertising and Tracking}},
author={Varmarken, Janus and Le, Hieu and Shuba, Anastasia and Markopoulou, Athina and Shafiq, Zubair},
journal={Proceedings on Privacy Enhancing Technologies},
volume={2020},
number={2},
year={2020},
publisher={De Gruyter Open}
}
We also encourage you to provide us (smarttv.uci@gmail.com) with a link to your publication. We use this information in reports to our funding agencies.
Firetastic uses AntMonitor to collect network traffic (on-device) and a python-based library Droidbot to explore the app. You must set up both tools in order to run Firetastic.
Note: all instructions were tested on Mac OS X
Before using Firetastic, you must:
- Set up your Fire TV device
- Collect apks to test with
- Get AntMonitor and apply our patch to it before building and installing it on the Fire TV device
- Get Droidbot and apply our patch to it before running the app testing script
- Finally, run our app exploration script
- Register your device with an Amazon account to be able to install applications.
- In the settings menu, enable developer mode.
- Within the networks settings, note the IP address of the Fire TV device for later. We will refer to this as
DEVICE_IP
.
To quickly install apps on your Fire TV device, use Amazon's web interface to the app store. First make sure that your Fire TV device is on.
- Go to amazon.com and find the Fire TV app store. Make sure you sign with the account that you registered the Fire TV device with.
- Filter the apps to only your device.
- Go through each app detail's page and click install. This will automatically start installing the application on your device.
- Do this for a batch of apps. We recommend 50 as the Fire TV device has space limitations.
- Wait until all apps have been downloaded and installed on your Fire TV (you can tell by looking at the dashboard of your device).
To extract the apks into a folder on your local machine:
- Open your terminal window and go to a desired directory where yuo want to keep track of the apks.
- Note: Commands below ignore the AntMonitor (edu.uci.calit2.anteatermo) package or any system related packages (android*) so that you don't accidentally extract or uninstall it. Change it accordingly to your use case.
- Then extract the apks:
for package in $(adb -s DEVICE_IP:5555 shell pm list packages -3 | grep -v "edu.uci.calit2.anteatermo" | grep -v "^andoid\r$" | tr -d '\r' | sed 's/package://g'); do apk=$(adb -s DEVICE_IP:5555 shell pm path $package | tr -d '\r' | sed 's/package://g'); echo "Pulling $apk"; adb -s DEVICE_IP:5555 pull -p $apk "$package".apk; done
- Then uninstall the apks:
for package in $(adb -s DEVICE_IP:5555 shell pm list packages -3 | grep -v "edu.uci.calit2.anteatermo" | tr -d '\r' | sed 's/package://g'); do apk=$(adb -s DEVICE_IP:5555 shell pm path $package | tr -d '\r' | sed 's/package://g'); echo "Uninstalling $apk"; adb -s DEVICE_IP:5555 uninstall "$package"; done
- Grab AntMonitor at changeset
1ac9d72274c1fe37858c410d155008dce2e1b33b
- Apply our
patches/firetastic-antmonitor.patch
- Note: These changes are done to not only have AntMonitor work well with Fire TV but to reduce the set up for the user after installation. Do NOT use this patch for other purposes.
- Follow instructions on Antmonitor github to build and install it onto the Fire TV device.
- Once it is installed, open up AntMonitor within Fire TV device and go through the set up.
- Firetastic patch should already enable everything necessary for AntMonitor to work om Fire TV.
Droidbot should be using Python 2.7
- Grab Droidbot at changeset
b60e95826f87f60ecb2837c00a5d7d3efd24c459
- Apply our
patches/firetastic-droidbot.patch
- Follow instructions on Droidbot to install it on your local machine.
Once everything is set up, run the following command to explore apps:
- Make sure Fire TV is connected to your TV and same wifi network as your laptop. Note that the process tests one app at a time. Make sure your Fire TV is clean of apps that you do not want to be installed.
- Run our firetv_automate_apps.py script:
python firetv_automate_apps.py PATH_TO_LOCAL_APKS ADB_DEVICE OUTPUT_PATH PCAPNG_OUTPUT_PATH ONLY_OUTGOING
- PATH_TO_LOCAL_APKS : directory where your APKs is
- ADB_DEVICE: your
DEVICE_IP
and port - OUTPUT_PATH: output directory to store droidbot output
- PCAPNG_OUTPUT_PATH: output directory to store pcapng from Antmonitor
- ONLY_OUTGOING: "true" or "false", this controls whether you extract all traffic or only the outgoing traffic. Using "true" will quicken the extraction process.
Firetastic uses AntMonitor to capture network traffic and thus inherits the platform requirements. It also uses Droidbot to explore FireTV applications and inherits the tool's requirements as well.
Firetastic is licensed under GPLv2.