About DroidRacer

DroidRacer is a dynamic race detection tool for Android applications. It has been built by modifying

and instrumenting android-4.0.1_r1. It implements an offline race detection algorithm [1].

DroidRacer has three components:

(i) UI Explorer : Scans the UI state of the test application during runtime, and automatically exercises

UI events on the test application. It is capable of generating UI events like click, long click, BACK button

press, and text data input, to name a few. The number of events generated is limited by a user defined

bound k and the order of triggering events on a screen is determined by pre-defined event priorities. The

UI of test application is explored in a depth-first search manner by systematically backtracking when the

event-sequence-length bound is reached, or the control goes out of test application.

(ii) Trace Generator : As the UI explorer drives the test application, the Trace Generator logs operations

performed by the application which are relevant for race detection (e.g., read, write, lock, asynchronous

post, fork). DroidRacer only tracks operations within the test application, but Android applications

interact with system process and other application processes which can affect the actions performed

by them. We model the effect of application's environment through special operations. This is necessary

to reduce the number of false positive races reported.

(iii) Race Detector : It takes the trace generated by the race detector as input, constructs a happens-before

graph according to rules given in [1] and detects races.

DroidRacer has been tested on the following applications:

DroidRacer detected several races on the above applications and a few leading to bad behaviours too.

Details on results can be found in [1].

DroidRacer source code

* DroidRacer source and its related files can be cloned as follows:

$git clone https://bitbucket.org/iiscseal/droidracer.git

$git clone https://bitbucket.org/iiscseal/droidracer-related-files.git

* After cloning, read the readme-droidRacer.txt file in droidRacer directory. It gives a step-by-step instructions

to set up DroidRacer.

* In order to test DroidRacer read the readme.txt file in droidracer-related-files directory. We have provided

source code of a sample test application in droidRacer-related-files/sample-app folder. The source code

corresponds to Tomdroid Notes application and can be compiled using Android Developer Tool (ADT)

plugin for eclipse IDE which can be downloaded from http://developer.android.com/sdk/index.html .

* Instructions to reproduce DroidRacer runs corresponding to results reported in our PLDI 2014 paper

"Race Detection for Android Applications" can be found in droidRacer-related-files/readme.txt .

Related Publications

[1] Pallavi Maiya, Aditya Kanade and Rupak Majumdar

Race Detection for Android Applications

35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2014



In case of any queries drop a mail to pallavi dot maiya at csa dot iisc dot ernet dot in


This work is partially supported by the Indo-German Max Planck Center for Computer Science (IMPECS). We also thank IARCS and Microsoft Research India for student travel grants to partially support travel to present this work at PLDI 2014. Pallavi Maiya is supported by a Google PhD Fellowship since July 2014.


DroidRacer is available under the Apache License, version 2.0.