\subsection{PhoneLab}

\PhoneLab{}~\cite{phonelab} is a public smartphone platform testbed operated
at the University at Buffalo (UB). Approximately 200~UB students, faculty,
and staff use instrumented LG Nexus~5 smartphones as their
primary device and receive discounted service in return for providing data to
smartphone experiments. \PhoneLab{} participants are balanced between genders
and distributed across ages, and thus representative of the broader
smartphone user population. \PhoneLab{} smartphones run a modified version of
the Android Open Source Platform (AOSP) 4.4.4 "KitKat" including
instrumentation and logging developed in collaboration with the mobile
systems community. Participating smartphones log experimental results which
are uploaded to a centralized server when the device is charging.

\subsection{Data Collection and Analysis}

We instrumented the \PhoneLab{} AOSP platform image to log SQLite activity by
modifying the SQLite source code and distributing the updated binary library
as an over-the-air (OTA) platform update to \PhoneLab{} participants.
%
Our logging recorded each SQL statement that was executed, along with its
resulting runtime and the number of rows returned as appropriate.
%
All current \PhoneLab{} instrumentation including our SQLite logging
statements are documented at \url{https://phone-lab.org/experiment/data/}.
%
To protect participant privacy, our instrumentation removes as much
personally-identifying information as possible, as well as recording prepared
statement arguments only as hash values.

Our trace data-set is drawn from publicly-available data provided by
11~\PhoneLab{} developers who willingly
released\footnote{\url{https://phone-lab.org/static/experiment/sample_dataset.tgz}}
complete trace data for their phones for March, 2015. Of the eleven
participants, seven had phones that were participating in the SQLite
experiment every day for the full month, with the remaining phones were
active for 1, 3, 14, and 19 days. A total of 254 phone/days of data were
collected including 45,399,550 SQL statements. Of these, we were unable to
interpret 308,752 statements (representing slightly over half a percent of
the trace) due to a combination of data corruption and the use of unusual SQL
syntax. Results presented in this paper that include SQL interpretation are
based on the 45,090,798 queries that we were able to successfully parse.  

%%  LocalWords:  PhoneLab smartphone testbed UB LG smartphones AOSP
%%  LocalWords:  Android KitKat SQLite OTA
