Abstract
Current mobile applications (apps) have become increasingly complicated with increasing features that are represented on the graphical user interface associated with application programming interfaces (APIs) to access backend functionality and data. Meanwhile, apps suffer from the “software bloat” in volume. Some app features may be redundant, with respect to those features (from other apps) that the users already desirably and frequently use. However, the current app release model forces users to download and install a full-size installation package rather than optionally choosing only their desired features. Large-size apps can not only increase the local resource consumption, such as CPU, memory, and energy, but also inevitably compromise the user experience, such as the slow load time in the app. In this article, we first conduct an empirical study to characterize the app feature usage when users interact with Android apps, and surprisingly find that users access only a very small subset of app features. Based on these findings, we design a new approach named LegoDroid, which automatically decomposes an Android app for flexible loading and installation, while preserving the expected functionality with a fast and instant app load. With such a method, a slimmer bundle will be downloaded and host the target APIs inside the original app to satisfy users’ requirements. We implement a system for LegoDroid and evaluate it with 1000 real-world Android apps. Compared to the original full-size apps, apps optimized by LegoDroid can substantially improve the load time by reducing the base bundle and feature bundles by 13.06% and 10.93%, respectively, along with the app-package installation size by 44.17%. In addition, we also demonstrate that LegoDroid is quite practical with evolving versions, as it can produce substantial reusable code to alleviate the developers’ efforts when releasing new app versions.
Similar content being viewed by others
References
Quach A, Erinfolami R, Demicco D, et al. A multi-OS cross-layer study of bloating in user programs, kernel and managed execution environments. In: Proceedings of the 2017 Workshop on Forming an Ecosystem Around Software Transformation, Dallas, 2017. 65–70
Li H, Ai W, Liu X, et al. Voting with their feet: inferring user preferences from app management activities. In: Proceedings of the 25th International Conference on World Wide Web, Montreal, 2016. 1351–1362
Ncube C, Oberndorf P, Kark A W. Opportunistic software systems development: making systems from what’s available. IEEE Softw, 2008, 25: 38–41
Balasubramaniam S, Lewis G A, Simanta S, et al. Situated software: concepts, motivation, technology, and the future. IEEE Softw, 2008, 25: 50–55
Guo Y, Li Y, Yang Z, et al. What’s inside my app?: understanding feature redundancy in mobile apps. In: Proceedings of the 26th Conference on Program Comprehension, Gothenburg, 2018. 266–276
Bhardwaj K, Saunders M, Juneja N, et al. Serving mobile apps: a slice at a time. In: Proceedings of the 14th European Conference on Computer Systems, Dresden, 2019. 1–15
Liu Y, Xu E, Ma Y, et al. A first look at instant service consumption with quick apps on mobile devices. In: Proceedings of the 26th International Conference on Web Services, Milan, 2019. 328–335
Ma Y, Hu Z, Gu D, et al. Roaming through the castle tunnels: an empirical analysis of inter-app navigation of Android apps. ACM Trans Web, 2020, 14: 1–24
Li L, Bissyandé T F, Papadakis M, et al. Static analysis of Android apps: a systematic literature review. Inf Software Tech, 2017, 88: 67–95
Octeau D, Luchaup D, Dering M, et al. Composite constant propagation: application to Android inter-component communication analysis. In: Proceedings of the 37th International Conference on Software Engineering, Florence, 2015. 77–88
Zhang Y, Sui Y, Xue J. Launch-mode-aware context-sensitive activity transition analysis. In: Proceedings of the 40th International Conference on Software Engineering, Gothenburg, 2018. 598–608
Ma Y, Hu Z, Liu Y, et al. Aladdin: automating release of deep-link APIs on Android. In: Proceedings of the 27th World Wide Web Conference, Lyon, 2018. 1469–1478
Wang Y, Zhang H, Rountev A. On the unsoundness of static analysis for Android GUIs. In: Proceedings of the 5th SIGPLAN International Workshop on State Of the Art in Program Analysis, 2016. 18–23
Gomez L, Neamtiu I, Azim T, et al. RERAN: timing- and touch-sensitive record and replay for Android. In: Proceedings of the 35th International Conference on Software Engineering, San Francisco, 2013. 72–81
Ma Z, Wang H, Guo Y, et al. LibRadar: fast and accurate detection of third-party libraries in Android apps. In: Proceedings of the 38th International Conference on Software Engineering, Austin, 2016. 653–656
Poeplau S, Fratantonio Y, Bianchi A, et al. Execute this! Analyzing unsafe and malicious dynamic code loading in Android applications. In: Proceedings of the 21st Annual Network and Distributed System Security Symposium, San Diego, 2014
Falsina L, Fratantonio Y, Zanero S, et al. Grab’n run: secure and practical dynamic code loading for Android applications. In: Proceedings of the 31st Annual Computer Security Applications Conference, Los Angeles, 2015. 201–210
Arzt S, Rasthofer S, Fritz C, et al. FlowDroid: precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for Android apps. In: Proceedings of the 35th SIGPLAN Conference on Programming Language Design and Implementation, Edinburgh, 2014. 259–269
Kahn R, Wilensky R. A framework for distributed digital object services. Int J Digit Libr, 2006, 6: 115–123
Ki T, Simeonov A, Jain B P, et al. Reptor: enabling API virtualization on Android for platform openness. In: Proceedings of the 15th Annual International Conference on Mobile Systems, Applications, and Services, Niagara Falls, 2017. 399–412
Azim T, Neamtiu I. Targeted and depth-first exploration for systematic testing of Android apps. In: Proceedings of the 2013 SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, Indianapolis, 2013. 641–660
Nayebi M, Adams B, Ruhe G. Release practices for mobile apps—what do users and developers think? In: Proceedings of the 23rd International Conference on Software Analysis, Evolution, and Reengineering, Suita, 2016. 552–562
Singh I, Krishnamurthy S V, Madhyastha H V, et al. ZapDroid: managing infrequently used applications on smartphones. IEEE Trans Mobile Comput, 2017, 16: 1475–1489
Bhardwaj K, Gavrilovska A, Schwan K. Ephemeral apps. In: Proceedings of the 17th International Workshop on Mobile Computing Systems and Applications, St. Augustine, 2016. 81–86
Gui J, Mcilroy S, Nagappan M, et al. Truth in advertising: the hidden cost of mobile ads for software developers. In: Proceedings of the 37th International Conference on Software Engineering, Florence, 2015. 100–110
Liu B, Liu B, Jin H, et al. Efficient privilege de-escalation for ad libraries in mobile apps. In: Proceedings of the 13th Annual International Conference on Mobile Systems, Applications, and Services, Florence, 2015. 89–103
Rubinov K, Rosculete L, Mitra T, et al. Automated partitioning of Android applications for trusted execution environments. In: Proceedings of the 38th International Conference on Software Engineering, Austin, 2016. 923–934
Zhang Y, Huang G, Liu X, et al. Refactoring Android Java code for on-demand computation offloading. In: Proceedings of the 27th Annual SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, Tucson, 2012. 233–248
Chandrashekhara S, Ki T, Jeon K, et al. BlueMountain: an architecture for customized data management on mobile systems. In: Proceedings of the 23rd Annual International Conference on Mobile Computing and Networking, Snowbird, 2017. 396–408
Jiang Y, Bao Q, Wang S, et al. RedDroid: Android application redundancy customization based on static analysis. In: Proceedings of the 29th International Symposium on Software Reliability Engineering, Memphis, 2018. 189–199
Xie Q, Gong Q, He X, et al. Trimming mobile applications for bandwidth-challenged networks in developing regions. 2019. ArXiv:1912.01328
Huang J, Aafer Y, Perry D M, et al. UI driven Android application reduction. In: Proceedings of the 32nd International Conference on Automated Software Engineering, Urbana, 2017. 286–296
Qian C, Hu H, Alharthi M, et al. RAZOR: a framework for post-deployment software debloating. In: Proceedings of the 28th USENIX Security Symposium, USENIX Security 2019, Santa Clara, 2019. 1733–1750
Mahouachi R. Search-based cost-effective software remodularization. J Comput Sci Technol, 2018, 33: 1320–1336
Bavota G, Lucia A D, Marcus A, et al. Software re-modularization based on structural and semantic metrics. In: Proceedings of the 17th Working Conference on Reverse Engineering, Beverly, 2010. 195–204
Mourad B, Badri L, Hachemane O, et al. Exploring the impact of clone refactoring on test code size in object-oriented software. In: Proceedings of the 16th International Conference on Machine Learning and Applications, Cancun, 2017. 586–592
Acknowledgements
This work was supported by National Key Research and Development Program of China (Grant No. 2020YFB2104100), National Natural Science Foundation of China (Grant Nos. 61725201, 62161146003), Beijing Outstanding Young Scientist Program (Grant No. BJJWZYJH01201910001004), Beijing Nova Program (Grant No. Z211100002121159), and PKU-Baidu Fund Project (Grant No. 2020BD007).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Liu, Y., Ma, Y., Xiao, X. et al. LegoDroid: flexible Android app decomposition and instant installation. Sci. China Inf. Sci. 66, 142103 (2023). https://doi.org/10.1007/s11432-021-3528-7
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11432-021-3528-7