Abstract
Smartphone apps create and handle a large variety of ``instance'' data that has to persist across runs, such as the current navigation route, workout results, antivirus settings, or game state. Due to the nature of the smartphone platform, an app can be paused, sent into background, or killed at any time. If the instance data is not saved and restored between runs, in addition to data loss, partially-saved or corrupted data can crash the app upon resume or restart. While smartphone platforms offer API support for data-saving and data-retrieving operations, the use of this API is ad-hoc: left to the programmer, rather than enforced by the compiler. We have observed that several categories of bugs---including data loss, failure to resume/restart or resuming/restarting in the wrong state---are due to incorrect handling of instance data and are easily triggered by just pressing the `Home' or `Back' buttons. To help address this problem, we have constructed a tool chain for Android (the KREfinder static analysis and the KREreproducer input generator) that helps find and reproduce such incorrect handling. We have evaluated our approach by running the static analysis on 324 apps, of which 49 were further analyzed manually. Results indicate that our approach is (i) effective, as it has discovered 49 bugs, including in popular Android apps, and (ii) efficient, completing on average in 61 seconds per app. More generally, our approach helps determine whether an app saves too much or too little state.
- Uiapplicationdelegate protocol reference, March 2016.Google Scholar
- https://developer.apple.com/ library/ios/documentation/UIKit/Reference/ UIApplicationDelegate_Protocol/index.html#// apple_ref/doc/uid/TP40006786.Google Scholar
- android-apktool: A tool for reverse engineering android apk files, March 2016.Google Scholar
- https://code.google.com/p/ android-apktool/.Google Scholar
- C. Q. Adamsen, G. Mezzetti, and A. Møller. Systematic execution of android test suites in adverse conditions. In Proceedings of the 2015 International Symposium on Software Testing and Analysis, ISSTA 2015, pages 83–93, New York, NY, USA, 2015. ACM. ISBN 978-1-4503-3620-8. doi: 10.1145/2771783.2771786. Google Scholar
Digital Library
- A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools (2Nd Edition). Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2006. ISBN 0321486811. Google Scholar
Digital Library
- L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994. (DIKU report 94/19).Google Scholar
- Android Open Source Project. Activities, March 2016.Google Scholar
- https://developer.android.com/guide/ components/activities.html.Google Scholar
- Android Open Source Project. Managing the activity lifecycle, July 2016. http://developer.android.com/ training/basics/activity-lifecycle/.Google Scholar
- Android Open Source Project. Platform versions, July 2016.Google Scholar
- https://developer.android.com/about/ dashboards/index.html.Google Scholar
- Android Open Source Project. Pausing and resuming an activity, March 2016. https://developer.android.com/ training/basics/activity-lifecycle/pausing. html.Google Scholar
- Android Open Source Project. Processes and application life cycle, March 2016. https://developer.android.com/ guide/topics/processes/process-lifecycle.html.Google Scholar
- Android Open Source Project. Saving data, March 2016.Google Scholar
- https://developer.android.com/training/ basics/data-storage/index.html.Google Scholar
- S. Arzt, S. Rasthofer, C. Fritz, E. Bodden, A. Bartel, J. Klein, Y. Le Traon, D. Octeau, and P. McDaniel. Flowdroid: Precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for android apps. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’14, pages 259–269, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2784-8. doi: 10.1145/2594291.2594299. Google Scholar
Digital Library
- T. Azim and I. Neamtiu. Targeted and depth-first exploration for systematic testing of android apps. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA ’13, pages 641–660, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2374-1. doi: 10. 1145/2509136.2509549. Google Scholar
Digital Library
- P. Bohannon, R. Rastogi, S. Seshadri, A. Silberschatz, and S. Sudarshan. Detection and recovery techniques for database corruption. Knowledge and Data Engineering, IEEE Transactions on, 15(5):1120–1136, Sept 2003. Google Scholar
Digital Library
- Google Code. Dex2jar. https://code.google.com/p/ dex2jar/.Google Scholar
- Google Code. Scramblednet issue 54: Scramblednet loses game state, March 2016. https://code.google.com/p/ moonblink/issues/detail?id=54.Google Scholar
- Google Code. Ssh tunnel issue 165: Auto connect and auto reconnect not working, March 2016. https://code.google. com/p/sshtunnel/issues/detail?id=165.Google Scholar
- Google Play reviewers. Brightness profiles, March 2016.Google Scholar
- https://play.google.com/store/apps/details?id= com.angrydoughnuts.android.brightprof.Google Scholar
- Google Play reviewers. Souvey musical pro, March 2016. https://play.google.com/store/apps/details?id= com.angrydoughnuts.android.brightprof.Google Scholar
- H. S. Gunawi, A. Rajimwale, A. C. Arpaci-Dusseau, and R. H. Arpaci-Dusseau. Sqck: A declarative file system checker. In Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation, OSDI’08, pages 131–146, Berkeley, CA, USA, 2008. USENIX Association. Google Scholar
Digital Library
- C.-H. Hsiao, J. Yu, S. Narayanasamy, Z. Kong, C. L. Pereira, G. A. Pokam, P. M. Chen, and J. Flinn. Race detection for event-driven mobile applications. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’14, pages 326–336, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2784-8. doi: 10.1145/2594291.2594330. Google Scholar
Digital Library
- C. Hu and I. Neamtiu. Automating gui testing for android applications. In Proceedings of the 6th International Workshop on Automation of Software Test, AST ’11, pages 77– 83, New York, NY, USA, 2011. ACM. ISBN 978-1-4503- 0592-1. doi: 10.1145/1982595.1982612. Google Scholar
Digital Library
- G. Hu, X. Yuan, Y. Tang, and J. Yang. Efficiently, effectively detecting mobile app bugs with appdoctor. In Proceedings of the Ninth European Conference on Computer Systems, EuroSys ’14, pages 18:1–18:15, 2014. Google Scholar
Digital Library
- C. S. Jensen, M. R. Prasad, and A. Møller. Automated testing with targeted event sequence generation. In Proceedings of the 2013 International Symposium on Software Testing and Analysis, ISSTA 2013, pages 67–77, 2013. Google Scholar
Digital Library
- Jinseong Jeon and Kristopher Micinski and Jeffrey S. Foster. Redexer. http://www.cs.umd.edu/projects/PL/ redexer/index.html.Google Scholar
- J. B. Kam and J. D. Ullman. Monotone data flow analysis frameworks. Acta Informatica, 7(3):305–317, 1977. ISSN 1432-0525. doi: 10.1007/BF00290339. Google Scholar
Digital Library
- C.-J. M. Liang, N. D. Lane, N. Brouwers, L. Zhang, B. F. Karlsson, H. Liu, Y. Liu, J. Tang, X. Shan, R. Chandra, and F. Zhao. Caiipa: Automated large-scale mobile app testing through contextual fuzzing. In Proceedings of the 20th Annual International Conference on Mobile Computing and Networking, MobiCom ’14, pages 519–530, 2014. Google Scholar
Digital Library
- P. Maiya, A. Kanade, and R. Majumdar. Race detection for android applications. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’14, pages 316–325, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2784-8. doi: 10. 1145/2594291.2594311. Google Scholar
Digital Library
- D. S. Milo´iˇci´c, F. Douglis, Y. Paindaveine, R. Wheeler, and S. Zhou. Process migration. ACM Comput. Surv., 32(3):241– 299, Sept. 2000. ISSN 0360-0300. doi: 10.1145/367701. Google Scholar
Digital Library
- 367728.Google Scholar
- 367728.Google Scholar
- D. Octeau, S. Jha, and P. McDaniel. Retargeting android applications to java bytecode. In Proceedings of the 20th ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE ’12, pages 6:1–6:11, 2012. ISBN 978-1-4503-1614-9. Google Scholar
Digital Library
- A. Pathak, A. Jindal, Y. C. Hu, and S. P. Midkiff. What is keeping my phone awake?: Characterizing and detecting nosleep energy bugs in smartphone apps. In Proceedings of the 10th International Conference on Mobile Systems, Applications, and Services, MobiSys ’12, pages 267–280, New York, NY, USA, 2012. ACM. ISBN 978-1-4503-1301-8. doi: 10.1145/2307636.2307661. Google Scholar
Digital Library
- L. Ravindranath, S. Nath, J. Padhye, and H. Balakrishnan. Automatic and scalable fault detection for mobile applications. In Proceedings of the 12th Annual International Conference on Mobile Systems, Applications, and Services, MobiSys ’14, pages 190–203, 2014. Google Scholar
Digital Library
- A. Rountev and D. Yan. Static reference analysis for gui objects in android software. In Proceedings of Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO ’14, 2014. Google Scholar
Digital Library
- Stack Overflow. Android activity life cycle - what are all these methods for?, March 2016. http://stackoverflow.com/questions/8515936/ android-activity-life-cycle-what-are-all-these\ -methods-for.Google Scholar
- S. Subramanian, Y. Zhang, R. Vaidyanathan, H. Gunawi, A. Arpaci-Dusseau, R. Arpaci-Dusseau, and J. Naughton. Impact of disk corruption on open-source dbms. In Data Engineering (ICDE), 2010 IEEE 26th International Conference on, pages 509–520, March 2010. doi: 10.1109/ICDE.2010.Google Scholar
Cross Ref
- 5447821.Google Scholar
- J. Yang, P. Twohey, D. Engler, and M. Musuvathi. Using model checking to find serious file system errors. ACM Trans. Comput. Syst., 24(4):393–423, Nov. 2006. ISSN 0734-2071. Google Scholar
Digital Library
Index Terms
Finding resume and restart errors in Android applications
Recommendations
Finding resume and restart errors in Android applications
OOPSLA 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsSmartphone apps create and handle a large variety of ``instance'' data that has to persist across runs, such as the current navigation route, workout results, antivirus settings, or game state. Due to the nature of the smartphone platform, an app can ...
Improving the Android development lifecycle with the VALERA record-and-replay approach
MobileDeLi 2015: Proceedings of the 3rd International Workshop on Mobile Development LifecycleAs smartphones become more and more popular, developers are switching their focus from traditional desktop programs to mobile apps. Recording and replaying the execution of mobile apps is useful in development tasks, from reproducing bugs to profiling ...
Versatile yet lightweight record-and-replay for Android
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsRecording and replaying the execution of smartphone apps is useful in a variety of contexts, from reproducing bugs to profiling and testing. Achieving effective record-and-replay is a balancing act between accuracy and overhead. On smartphones, the act ...







Comments