A modern mobile device has synchrony in its input to display path. This synchrony introduces latency inadequate for touchscreens which spatially manifest the latency. The synchrony is necessary for three requirements frame rate, no frame drop, and no tearing effect. Presto is an asynchronous system design of the input to display path to reduce the latency.

This page includes the implementation of Presto for Android.

1. People

2. Publications

  • Min Hong Yun, Songtao He, and Lin Zhong, "Reducing Latency by Eliminating Synchrony," in Proc. the World Wide Web Conference (WWW2017), Apr 2017.

  • Min Hong Yun, Songtao He, and Lin Zhong, "PolyPath: Supporting multiple tradeoffs for interaction latency," Technical Report 2016-08, Rice University, Aug 2016

  • Min Hong Yun, Songtao He, and Lin Zhong, "Forget Synchrony for Low Latency," The Annual Int Workshop on Mobile Computing Systems and Applications (ACM HotMobile) Poster, Feb 2016.

3. Instructions for Presto

3.1. Prerequisite

Presto uses Android as a reference platform. To build Presto, the Android building environment should be installed. Please refer to here for details. This page guides how to build Presto for Nexus 6.

For the in-house application, please install standard iOS and Android SDKs: Android, iOS

3.2. Download

3.2.1. Download AOSP

Download Android source code from AOSP:

  • Android version: 5.0 (Lollipop)

  • Build version: LRX21O

  • Don’t forget download proprietary binaries from here

  • Please refer to here for repo commands

Specifically, you should type:

repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r3.0.1

repo sync

Download Android kernel source code from AOSP:

  • Device: shamu

  • Binary location: device/moto/shamu-kernel

  • Source location: kernel/msm

  • Build configuration: shamu_defconfig

  • Please refer to here for git commands

Specifically, you should type:

git clone this

You may want to install Repo and Git.

3.2.2. Download and Apply Presto_Android and Presto_Kernel patches

Download Presto Android patches from Presto_Android and apply them: Download Presto Kernel patches from Presto_Kernel and apply them:

Presto_Android and Presto_Kernel include multiple patch files for sub-projects. Each patch specifies the directory, so apply them accordingly. For example, apply frameworks.patch to the frameworks directory.

patch -p[num] < presto_android.patch

patch -p[num] < presto_kernel.patch

Use proper num according to your directories.

3.3. Build and Install

Build Presto and Kernel, separately. To make Presto, simply type make in the Presto directory. To make kernel bootimage, type make bootimage in the kernel directory.

Install Presto and Kernel, separately.

fastboot reboot bootloader

fastboot flash system ← in the Presto source directory

fastboot flash bootimage ← in the kernel directory

fastboot reboot

3.4. Setup Presto

After reboot the device, enter the following commands:

adb root

adb shell "setenforce 0"

Wait for 0.5-1 min after the first command if your adbd is not running as root. If the second command fails, wait more and try the second command again. The second command may restart the framework (not kernel) when you enter the command after Android is initialized.

Also, enter the following commands to configure Presto:

adb shell "echo 3333333 0 0 10000 1000 0 > /data/Latency/config"

adb shell "echo 1 1500 0.75 > /data/Latency/position.cfg"

Edit a text file named name.list that includes a application counter in the first line followed by application list. For example,

3

net.thoster.handwrite

com.metamoji.noteanytime

com.wacom.bamboopapertab

The first line indicates that the list contains three applications' package names. The other lines are the package names.

Then, copy the file to the device:

adb push name.list /data/Latency/

4. In-house Application

You can download in-house benchmarks for various platforms here: - Android App - iOS App - Web App

We recommend to use Android Studio for the Android application and XCode for the iOS application. The above links include project files, too.

5. User Study Video

All videos are recorded using GoPro Hero 4 @ 240 fps and downsampled to 60 fps for online upload. We edited the video not to include rebooting and app-switching procedures. Please aware that most participants are unfamiliar with the apps and accidentally touch the screen by their palms or other fingers. Due to the technical difficulty, we couldn’t record participant #3.

Acknowledgments

This work was supported in part by NSF Award #1422312