Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2897073.2897086acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Automated re-factoring of Android apps to enhance energy-efficiency

Published: 14 May 2016 Publication History

Abstract

Mobile devices, such as smartphones and tablets, are energy constrained by nature. Therefore, apps targeted for such platforms must be energy-efficient. However, due to the use of energy oblivious design practices often this is not the case. In this paper, we present a light-weight re-factoring technique that can assist in energy-aware app development. Our technique relies on a set of energy-efficiency guidelines that encodes the optimal usage of energy-intensive (hardware) resources in an app. Given a prototype for an app, our technique begins by generating a design-expression for it. A design-expression can be described as a regular-expression representing the ordering of energy-intensive resource usages and invocation of key functionalities (event-handlers) within the app. It also generates a set of defect-expressions, that are design-expressions representing the negation of energy-efficiency guidelines. A nonempty intersection between an app's design-expression and a defect-expression indicates violation of a guideline (and therefore, potential for re-factoring). To evaluate the efficacy of our re-factoring technique we analysed a suite of open-source Android apps using our technique. The resultant re-factoring when applied, reduced the energy-consumption of these apps between 3 % to 29 %. We also present a case study for one of our subject apps, that captures its design evolution over a period of two-years and more than 200 commits. Our framework found re-factoring opportunities in a number of these commits, that could have been implemented earlier on in the development stages had the developer used an energy-aware refactoring technique such as the one presented in this work.

References

[1]
Get started with publishing. http://developer.android.com/distribute/googleplay/start.html.
[2]
Statista. http://www.statista.com/statistics/266210/number-of-available-applications-in-the-google-play-store.
[3]
Monkeyrunner tool. http://developer.android.com/tools/help/MonkeyRunner.html.
[4]
A. Pathak, Y. C. Hu, and M. Zhang. Where is the energy spent inside my app?: fine grained energy accounting on smartphones with eprof. In EuroSys, 2012.
[5]
A. Banerjee, L. K. Chong, S. Chattopadhyay, and A. Roychoudhury. Detecting energy bugs and hotspots in mobile apps. In FSE, 2014.
[6]
F-droid. https://f-droid.org/.
[7]
Abhijeet Banerjee, Lee Kee Chong, Sudipta Chattopadhyay, and Abhik Roychoudhury. Detecting energy bugs and hotspots in mobile apps. In Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2014, 2014.
[8]
J. E. Hopcroft, R. Motwani, and J. D. Ullman. Introduction to Automata Theory, Languages, and Computation (3rd Edition). Addison-Wesley Longman Publishing Co., Inc., 2006.
[9]
A. M. Memon, I. Banerjee, and A. Nagarajan. GUI ripping: Reverse engineering of graphical user interfaces for testing. In WCRE, 2003.
[10]
A. Machiry, R. Tahiliani, and M. Naik. Dynodroid: an input generation system for android apps. In ESEC/SIGSOFT FSE, 2013.
[11]
Hierarchy viewer. http://developer.android.com/tools/help/hierarchy-viewer.html.
[12]
Greenery. https://github.com/ferno/greenery.
[13]
Chessclock. https://f-droid.org/repository/browse/?fdfilter=chessclock.
[14]
Sensorium. https://f-droid.org/repository/browse/?fdfilter=Sensorium&fdid=at.univie.sensorium.
[15]
App category. https://play.google.com/store/apps/category/APPLICATION?hl=en.
[16]
Apache lucene core. https://lucene.apache.org/core/.
[17]
Userhash. https://f-droid.org/repository/browse/?fdfilter=Userhash&fdid=com.threedlite.userhash.location.
[18]
Aripuca. https://f-droid.org/repository/browse/?fdid=com.aripuca.tracker.
[19]
Sharemylocation. https://f-droid.org/repository/browse/?fdfilter=sharemyposition&fdid=net.sylvek.sharemyposition.
[20]
Droidsat. https://f-droid.org/repository/browse/?fdfilter=droidsat&fdid=com.mkf.droidsat.
[21]
Itlogger. https://f-droid.org/repository/browse/?fdfilter=itlogger&fdid=de.tui.itlogger.
[22]
Heart rate monitor. https://f-droid.org/repository/browse/?fdfilter=heartrate&fdid=com.vanderbie.heart_rate_monitor.
[23]
0xbenchmark. https://f-droid.org/repository/browse/?fdid=org.zeroxlab.zeroxbenchmark.
[24]
Ham. https://f-droid.org/repository/browse/?fdfilter=Ham&fdid=com.smerty.ham.
[25]
Soot https://sable.github.io/soot/.
[26]
Rohan Padhye and Uday P. Khedker. Interprocedural data flow analysis in soot using value contexts. In Proceedings of the 2Nd ACM SIGPLAN International Workshop on State Of the Art in Java Program Analysis, SOAP '13, 2013.
[27]
Monsoon power monitor. https://www.msoon.com/LabEquipment/PowerMonitor/.
[28]
Sensorium repository - github. https://github.com/fmetzger/android-sensorium.
[29]
Lide Zhang, B. Tiwana, R. P. Dick, Zhiyun Qian, Z. M. Mao, Zhaoguang Wang, and Lei Yang. Accurate online power estimation and automatic battery behavior based power model generation for smartphones. In Hardware/Software Codesign and System Synthesis (CODES+ISSS), 2010 IEEE/ACM/IFIP International Conference on, 2010.
[30]
T. Hönig, C. Eibel, R. Kapitza, and W. Schröder-Preikschat. SEEP: exploiting symbolic execution for energy-aware programming. HotPower, 2011.
[31]
F. Qian, Z. Wang, A. Gerber, Z. M. Mao, S. Sen, and O. Spatscheck. Profiling resource usage for mobile applications: a cross-layer approach. In MobiSys, 2011.
[32]
S. Hao, D. Li, W. G. J. Halfond, and R. Govindan. Estimating mobile application energy consumption using program analysis. In ICSE, 2013.
[33]
D. Li, S. Hao, W. G. J. Halfond, and R. Govindan. Calculating source line level energy information for android applications. In ISSTA, 2013.
[34]
Yepang Liu, Chang Xu, and Shing-Chi Cheung. Characterizing and detecting performance bugs for smartphone applications. In Proceedings of the 36th International Conference on Software Engineering, ICSE 2014, 2014.
[35]
Aaron Carroll and Gernot Heiser. An analysis of power consumption in a smartphone. In Proceedings of the 2010 USENIX Conference on USENIX Annual Technical Conference, USENIXATC'10, 2010.
[36]
Marius Marcu and Dacian Tudor. Energy consumption model for mobile wireless communication. In Proceedings of the 9th ACM International Symposium on Mobility Management and Wireless Access, MobiWac '11, 2011.
[37]
Mian Dong and Lin Zhong. Self-constructive high-rate system energy modeling for battery-powered mobile systems. In Proceedings of the 9th International Conference on Mobile Systems, Applications, and Services, MobiSys '11, pages 335--348, 2011.
[38]
Radhika Mittal, Aman Kansal, and Ranveer Chandra. Empowering developers to estimate app energy consumption. In Proceedings of the 18th Annual International Conference on Mobile Computing and Networking, Mobicom '12, pages 317--328, 2012.
[39]
Alex Shye, Benjamin Scholbrock, and Gokhan Memik. Into the wild: Studying real user activity patterns to guide power optimizations for mobile architectures. In Proceedings of the 42Nd Annual IEEE/ACM International Symposium on Microarchitecture, MICRO 42, 2009.
[40]
Denzil Ferreira, Anind K. Dey, and Vassilis Kostakos. Understanding human-smartphone concerns: A study of battery life. In Pervasive Computing, volume 6696, pages 19--33. Springer Berlin Heidelberg, 2011.
[41]
Abhinav Pathak, Y. Charlie Hu, Ming Zhang, Paramvir Bahl, and Yi-Min Wang. Fine-grained power modeling for smartphones using system call tracing. In Proceedings of the Sixth Conference on Computer Systems, EuroSys '11, 2011.
[42]
Jason Flinn and M. Satyanarayanan. Powerscope: A tool for profiling the energy usage of mobile applications. In Proceedings of the Second IEEE Workshop on Mobile Computer Systems and Applications, WMCSA '99, pages 2--, 1999.
[43]
A. Pathak, A. Jindal, Y. C. Hu, and S. P. Midkiff. What is keeping my phone awake?: characterizing and detecting no-sleep energy bugs in smartphone apps. In MobiSys, 2012.
[44]
Chaorong Guo, Jian Zhang, Jun Yan, Zhiqiang Zhang, and Yanli Zhang. Characterizing and detecting resource leaks in android applications. In ASE, 2013.
[45]
Y. Liu, C. Xu, S. C. Cheung, and J. Lu. Greendroid: Automated diagnosis of energy inefficiency for smartphone applications. Software Engineering, IEEE Transactions on, 2014.
[46]
Yepang Liu, Chang Xu, and S. C. Cheung. Where has my battery gone? finding sensor related energy black holes in smartphone applications. In Pervasive Computing and Communications (PerCom), 2013 IEEE International Conference on, 2013.
[47]
Adam J. Oliner, Anand P. Iyer, Ion Stoica, Eemil Lagerspetz, and Sasu Tarkoma. Carat: Collaborative energy diagnosis for mobile devices. In Proceedings of the 11th ACM Conference on Embedded Networked Sensor Systems, SenSys '13, pages 10:1--10:14.
[48]
Lide Zhang, Mark S. Gordon, Robert P. Dick, Z. Morley Mao, Peter Dinda, and Lei Yang. Adel: An automatic detector of energy leaks for smartphone applications. In Proceedings of the Eighth IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis, CODES+ISSS '12, 2012.
[49]
Abhijeet Banerjee, Hai-Feng Guo, and Abhik Roychoudhury. Debugging energy-efficiency related field failures in mobile apps. In IEEE/ACM International Conference on Mobile Software Engineering and Systems, MOBILESoft, 16, 2016.
[50]
M. Cohen, H. S. Zhu, E. E. Senem, and Y. D. Liu. Energy types. In OOPSLA, 2012.
[51]
W. Baek and T. M. Chilimbi. Green: a framework for supporting energy-conscious programming using controlled approximation. In PLDI, 2010.
[52]
Irene Manotas, Lori Pollock, and James Clause. Seeds: A software engineer's energy-optimization decision support framework. In Proceedings of the 36th International Conference on Software Engineering, ICSE 2014, 2014.
[53]
A. Banerjee and A. Roychoudhury. Energy-aware design patterns for mobile application development (invited talk). In Proceedings of the 2Nd International Workshop on Software Development Lifecycle for Mobile, DeMobile 2014, 2014.
[54]
Adel Noureddine and Ajitha Rajan. Optimising energy consumption of design patterns. In Proceedings of the 37th International Conference on Software Engineering - Volume 2, ICSE '15, 2015.
[55]
William Martin, Mark Harman, Yue Jia, Federica Sarro, and Yuanyuan Zhang. The app sampling problem for app store mining. In Proceedings of the 12th Working Conference on Mining Software Repositories, MSR '15, 2015.

Cited By

View all
  • (2023)Uncovering Energy-Efficient Practices in Deep Learning Training: Preliminary Steps Towards Green AI2023 IEEE/ACM 2nd International Conference on AI Engineering – Software Engineering for AI (CAIN)10.1109/CAIN58948.2023.00012(25-36)Online publication date: May-2023
  • (2023)A systematic literature review on Android-specific smellsJournal of Systems and Software10.1016/j.jss.2023.111677201:COnline publication date: 1-Jul-2023
  • (2022)A black box technique to reduce energy consumption of Android appsProceedings of the ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging Results10.1145/3510455.3512795(1-5)Online publication date: 21-May-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
MOBILESoft '16: Proceedings of the International Conference on Mobile Software Engineering and Systems
May 2016
326 pages
ISBN:9781450341783
DOI:10.1145/2897073
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 May 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. energy-efficiency
  2. mobile apps
  3. re-factoring

Qualifiers

  • Research-article

Funding Sources

Conference

ICSE '16
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)2
Reflects downloads up to 03 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Uncovering Energy-Efficient Practices in Deep Learning Training: Preliminary Steps Towards Green AI2023 IEEE/ACM 2nd International Conference on AI Engineering – Software Engineering for AI (CAIN)10.1109/CAIN58948.2023.00012(25-36)Online publication date: May-2023
  • (2023)A systematic literature review on Android-specific smellsJournal of Systems and Software10.1016/j.jss.2023.111677201:COnline publication date: 1-Jul-2023
  • (2022)A black box technique to reduce energy consumption of Android appsProceedings of the ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging Results10.1145/3510455.3512795(1-5)Online publication date: 21-May-2022
  • (2022)FlooProceedings of the 20th Annual International Conference on Mobile Systems, Applications and Services10.1145/3498361.3538929(168-182)Online publication date: 27-Jun-2022
  • (2022)A Survey of Performance Optimization for Mobile ApplicationsIEEE Transactions on Software Engineering10.1109/TSE.2021.307119348:8(2879-2904)Online publication date: 1-Aug-2022
  • (2022)Static/Dynamic Analysis of Android Applications to Improve Energy-Efficiency2022 CPSSI 4th International Symposium on Real-Time and Embedded Systems and Technologies (RTEST)10.1109/RTEST56034.2022.9850164(1-8)Online publication date: 30-May-2022
  • (2022)Energy Efficiency Issues in Android Application: A Literature Review2022 24th International Multitopic Conference (INMIC)10.1109/INMIC56986.2022.9972939(1-6)Online publication date: 21-Oct-2022
  • (2022)Black Box Technique to Reduce Energy Consumption of Android Apps2022 IEEE/ACM 44th International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER)10.1109/ICSE-NIER55298.2022.9793522(1-5)Online publication date: May-2022
  • (2022)Automated repair of resource leaks in Android applicationsJournal of Systems and Software10.1016/j.jss.2022.111417192:COnline publication date: 1-Oct-2022
  • (2022)Energy inefficiency diagnosis for Android applications: a literature reviewFrontiers of Computer Science10.1007/s11704-021-0532-417:1Online publication date: 8-Aug-2022
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media