Towards self-healing smartphone software via automated patching

Frequent app bugs and low tolerance for loss of functionality create an impetus for self-healing smartphone software. We take a step towards this via on-the-fly error detection and automated patching. Specifically, we add failure detection and recovery to Android by detecting crashes and ``sealing off'' the crashing part of the app to avoid future crashes. In the detection stage, our system dynamically analyzes app execution to detect certain exceptional situations. In the recovery stage, we use bytecode rewriting to alter app behavior as to avoid such situations in the future. When using our implementation, apps can resume operation (albeit with limited functionality) instead of repeatedly crashing. Our approach does not require access to app source code or any system (e.g., kernel-level) modification. Experiments on several real-world, popular Android apps and bugs show that our approach manages to recover the apps from crashes effectively, timely, and without introducing overhead.

[1]  Jaechang Nam,et al.  Automatic patch generation learned from human-written patches , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[2]  George Candea,et al.  Microreboot - A Technique for Cheap Recovery , 2004, OSDI.

[3]  Brian Demsky Data structure repair using goal-directed reasoning , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[4]  Andreas Zeller,et al.  Generating Fixes from Object Behavior Anomalies , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

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

[6]  Saurabh Bagchi,et al.  Characterizing Failures in Mobile OSes: A Case Study with Android and Symbian , 2010, 2010 IEEE 21st International Symposium on Software Reliability Engineering.

[7]  Martin C. Rinard,et al.  Data structure repair using goal-directed reasoning , 2005, ICSE.

[8]  Tao Xie,et al.  Helping users avoid bugs in GUI applications , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[9]  Liviu Iftode,et al.  Recovering Internet service sessions from operating system failures , 2005, IEEE Internet Computing.

[10]  Angelos D. Keromytis,et al.  ASSURE: automatic software self-healing using rescue points , 2009, ASPLOS.

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

[12]  Michael D. Ernst,et al.  Automatically patching errors in deployed software , 2009, SOSP '09.

[13]  Alessandra Gorla,et al.  Automatic workarounds for web applications , 2010, FSE '10.

[14]  Claire Le Goues,et al.  Automatically finding patches using genetic programming , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[15]  Andreas Zeller,et al.  Automated Fixing of Programs with Contracts , 2014 .

[16]  Liviu Iftode,et al.  Remote repair of operating system state using Backdoors , 2004 .