RANDR: Record and Replay for Android Applications via Targeted Runtime Instrumentation

The ability to repeat the execution of a program is a fundamental requirement in many areas of computing from computer system evaluation to software engineering. Reproducing executions of mobile apps, in particular, has proven difficult under real-life scenarios due to multiple sources of external inputs and interactive nature of the apps. Previous works that provide record/replay functionality for mobile apps are restricted to particular input sources (e.g., touchscreen events) and present deployment challenges due to intrusive modifications to the underlying software stack. Moreover, due to their reliance on record and replay of device specific events, the recorded executions cannot be reliably reproduced across different platforms. In this paper, we present a new practical approach, RandR, for record and replay of Android applications. RandR captures and replays multiple sources of input (i.e., UI and network) without requiring source code (OS or app), administrative device privileges, or any special platform support. RandR achieves these qualities by instrumenting a select set of methods at runtime within an application's own sandbox. In addition, to enable portability of recorded executions across different platforms for replay, RandR contextualizes UI events as interactions with particular UI components (e.g., a button) as opposed to relying on platform specific features (e.g., screen coordinates). We demonstrate RandR's accurate cross-platform record and replay capabilities using over 30 real-world Android apps across a variety of platforms including emulators as well as commercial off-the-shelf mobile devices deployed in real life.

[1]  Jacques Klein,et al.  FraudDroid: automated ad fraud detection for Android apps , 2017, ESEC/SIGSOFT FSE.

[2]  James Cownie,et al.  PinPlay: a framework for deterministic replay and reproducible analysis of parallel programs , 2010, CGO '10.

[3]  Valerio Costamagna,et al.  ARTDroid: A Virtual-Method Hooking Framework on Android ART Runtime , 2016, IMPS@ESSoS.

[4]  Boyang Li,et al.  Automated Reporting of GUI Design Violations for Mobile Apps , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[5]  Mark Harman,et al.  Crowd intelligence enhances automated mobile testing , 2017, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[6]  Vijay Janapa Reddi,et al.  Mobile CPU's rise to power: Quantifying the impact of generational mobile CPU design trends on performance, energy, and user satisfaction , 2016, 2016 IEEE International Symposium on High Performance Computer Architecture (HPCA).

[7]  David Lie,et al.  Tackling runtime-based obfuscation in Android with TIRO , 2018, USENIX Security Symposium.

[8]  Renée C. Bryce,et al.  Reinforcement learning for Android GUI testing , 2018, A-TEST@ESEC/SIGSOFT FSE.

[9]  Junfeng Yang,et al.  AppFlow: using machine learning to synthesize robust, reusable UI tests , 2018, ESEC/SIGSOFT FSE.

[10]  Qun Li,et al.  MobiPlay: A Remote Execution Based Record-and-Replay Tool for Mobile Applications , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[11]  Alessandro Orso,et al.  Barista: A Technique for Recording, Encoding, and Running Platform Independent Android Tests , 2017, 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[12]  Vijay Janapa Reddi,et al.  Mosaic: cross-platform user-interaction record and replay for the fragmented android ecosystem , 2015, 2015 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS).

[13]  Lixin Zhang,et al.  Moby: A mobile benchmark suite for architectural simulators , 2014, 2014 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS).

[14]  Anuj Pathania,et al.  Integrated CPU-GPU power management for 3D mobile games , 2014, 2014 51st ACM/EDAC/IEEE Design Automation Conference (DAC).

[15]  Ronald G. Dreslinski,et al.  Full-system analysis and characterization of interactive smartphone applications , 2011, 2011 IEEE International Symposium on Workload Characterization (IISWC).

[16]  吉田 則裕,et al.  Android Open Source Projectを対象としたパッチレビュー活動の調査 , 2012 .

[17]  Yongjian Hu,et al.  Versatile yet lightweight record-and-replay for Android , 2015, OOPSLA.

[18]  Christopher Krügel,et al.  Obfuscation-Resilient Privacy Leak Detection for Mobile Apps Through Differential Analysis , 2017, NDSS.

[19]  Doo-Hwan Bae,et al.  Automated model-based Android GUI testing using multi-level GUI comparison criteria , 2016, 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE).

[20]  Todd D. Millstein,et al.  RERAN: Timing- and touch-sensitive record and replay for Android , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[21]  Dong Hoon Lee,et al.  Predictability of Android OpenSSL's pseudo random number generator , 2013, CCS.

[22]  Iulian Neamtiu,et al.  Targeted and depth-first exploration for systematic testing of android apps , 2013, OOPSLA.

[23]  Dam Sunwoo,et al.  A structured approach to the simulation, analysis and characterization of smartphone applications , 2013, 2013 IEEE International Symposium on Workload Characterization (IISWC).

[24]  Min Xu,et al.  A "flight data recorder" for enabling full-system multiprocessor deterministic replay , 2003, ISCA '03.

[25]  Binyu Zang,et al.  Espresso , 2018, ACM SIGPLAN Notices.

[26]  Christopher Krügel,et al.  BootStomp: On the Security of Bootloaders in Mobile Devices , 2017, USENIX Security Symposium.

[27]  Alessandro Orso,et al.  Automatically translating bug reports into test cases for mobile apps , 2018, ISSTA.

[28]  Tao Xie,et al.  Record and replay for Android: are we there yet in industrial cases? , 2017, ESEC/SIGSOFT FSE.

[29]  Satish Narayanasamy,et al.  DoublePlay: parallelizing sequential logging and replay , 2011, ASPLOS XVI.

[30]  Robert O'Callahan,et al.  Engineering Record and Replay for Deployability , 2017, USENIX Annual Technical Conference.

[31]  Hari Balakrishnan,et al.  Mahimahi: Accurate Record-and-Replay for HTTP , 2015, USENIX Annual Technical Conference.