The number of mobile applications downloaded recently from Google stores increase steadily. It is believed that mobile applications market revenues will grow fast and receive more attention from software developers. Even though, hardware technologies and operating systems have made a big contribution to improve the battery capacity, power consumption is one of the most important and crucial non-functional properties of mobile applications. Many approaches have been dedicated for analyzing and optimizing the power consumption at different levels. This paper proposes a method for analyzing energy leaks of Android application at the design phase. First, it introduces a formalization of an event-based power consumption model. After that, the paper presents a method to translate this model to Event-B notations. Based on the target model, it is able to check if the application leads to energy leaks or violates the power consumption constraints based on formal proofs. Finally, the motivating examples are shown for the illustration purpose.
This is a preview of subscription content, access via your institution.
Buy single article
Instant access to the full article PDF.
Price includes VAT (USA)
Tax calculation will be finalised during checkout.
Android framework. https://developer.android.com/, 2018
Abrial J-R (1996) The B-book: Assigning Programs to Meanings. Cambridge University Press, New York
Abrial J-R (2010) Modeling in Event-B: System and Software Engineering, 1st edition. Cambridge University Press, New York
Abrial J-R, Butler M, Hallerstede S, Voisin L (2006) An open extensible tool environment for event-b. In: Liu Z, He J (eds) Formal Methods and Software Engineering. Springer Berlin Heidelberg, Berlin, pp 588–605
Abrial J-R, Su W, Zhu H (2012) Formalizing hybrid systems event-B. In: Proc ABZ 2012, volume 7316 of LNCS, pp 178–193
Carroll A, Heiser G, et al. (2010) An analysis of power consumption in a smartphone. In: USENIX annual technical conference, vol 14, pp 21–21. Boston, MA
Couto M, Carcao T, Cunha J, Fernandes JP, Saraiva J (2014) Detecting anomalous energy consumption in android applications. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 8771 LNCS
Datta SK, Bonnet C, Nikaein N (2012) Android power management: Current and future trends. In: Enabling Technologies for Smartphone and Internet of Things (ETSIoT), 2012 First IEEE Workshop on, pp 48–53. IEEE
Kim D-H, Kim J-P, Hong J-E (2011) A power consumption analysis technique using uml-based design models in embedded software development. In: Proceedings of the 37th International conference on current trends in theory and practice of computer science, SOFSEM’11, pp 320–331, Berlin, Heidelberg. Springer-Verlag
Kim KH, Min AW, Gupta D, Mohapatra P, Singh JP (2011) Improving energy efficiency of wi-fi sensing on smartphones. In: 2011 Proceedings IEEE INFOCOM, pp 2930–2938
Le HA, Bui AT, Truong N-T (2019) An approach to modeling and estimating power consumption of mobile applications. Mob Netw Appl 24(1):124–133
Li D, Hao S, Halfond WGJ, Govindan R (2013) Calculating source line level energy information for Android applications. In: Proceedings of the 2013 international symposium on software testing and analysis - ISSTA 2013, pp 78
Liu Y, Wang J, Xu C, Ma X (2017) Navydroid: Detecting energy inefficiency problems for smartphone applications. In: Proceedings of the 9th asia-pacific symposium on internetware, internetware’17, New York, NY, USA. Association for Computing Machinery
Liu Y, Xu C, Cheung S-C, Terragni V (2016) Understanding and detecting wake lock misuses for android applications. FSE 2016, New York, NY, USA. Association for Computing Machinery
Nakajima S (2013) Model-based power consumption analysis of smartphone applications. In: Proceedings of the 6th international workshop on model based architecting and construction of embedded systems co-located with ACM/IEEE 16th international conference on model driven engineering languages and systems (MoDELS 2013), Miami, Florida, USA, September 29th, 2013.
Nakajima S, Ueda Y (2013) Power consumption analysis of smartphone applications using uppaal. In: Proceedings of the IEEE international conference on cyber-physical systems, networks and applications, Taiwan, August 19-20, 2013
Pathak A, Hu YC, Zhang M (2011) Bootstrapping energy debugging on smartphones: A first look at energy bugs in mobile devices. In: Proceedings of the 10th ACM workshop on hot topics in networks, HotNets-X, pp 5:1–5:6, New York, NY, USA. ACM
Pathak A, Hu YC, Zhang M (2012) Where is the energy spent inside my app?: Fine grained energy accounting on smartphones with eprof. In: Proceedings of the 7th ACM european conference on computer systems, EuroSys ’12, pp 29–42, New York, NY, USA. ACM
Pathak A, Jindal A, Hu YC, Midkiff SP (2012) What is keeping my phone awake? characterizing and detecting no-sleep energy bugs in smartphone apps. In: Proceedings of the 10th international conference on mobile systems, applications, and services, MobiSys ’12, pp 267–280, New York, NY, USA. Association for Computing Machinery
Patil PS, Doshi J, Ambawade D (2015) Reducing power consumption of smart device by proper management of wakelocks. In: 2015 IEEE international advance computing conference (IACC), pp 883–887
Vekris P, Jhala R, Lerner S, Agarwal Y (2012) Towards verifying android apps for the absence of no-sleep energy bugs. In: Proceedings of the 2012 USENIX conference on power-aware computing and systems, HotPower’12, pp 3–3, Berkeley, CA, USA. USENIX Association
Yoshimoto R, Kadono T, Hisazumi K, Fukuda A (2016) A software energy analysis method using executableuml. In: 2016 IEEE Region 10 conference (TENCON), pp 218–221
Zhang L, Tiwana B, Dick RP, Qian Z, Mao ZM, Wang Z, Yang L (2010) Accurate online power estimation and automatic battery behavior based power model generation for smartphones. In: 2010 IEEE/ACM/IFIP international conference on hardware/software codesign and system synthesis (CODES+ISSS), pp 105–114
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Le, H. Analyzing Energy Leaks of Android Applications Using Event-B. Mobile Netw Appl 26, 1329–1338 (2021). https://doi.org/10.1007/s11036-021-01764-y
- Energy bugs
- Android apps
- Power consumption