logo

SCIENCE CHINA Information Sciences, Volume 60, Issue 1: 012104(2017) https://doi.org/10.1007/s11432-015-1015-5

CyanDroid: stable and effective energy inefficiency diagnosis for Android apps

More info
  • ReceivedMay 17, 2016
  • AcceptedAug 12, 2016
  • PublishedNov 17, 2016

Abstract

Smartphones are an indispensable part of people's daily lives. Smartphone apps often use phone sensors to probe their users' physical environmental conditions to provide services. However, sensing operations can be energy-consumptive, and thus the obtained sensory data should be effectively utilized by apps for their users' benefits. Existing studies disclosed that many real-world smartphone apps have poor utilization of sensory data, and this causes serious energy waste. To diagnose such energy bugs, a recent technique GreenDroid automatically generates sensory data, tracks their propagation and analyzes their utilization in an app. However, we observe that GreenDroid's sensory data generation is random and this can negatively affect its stability and effectiveness. Our study reported that GreenDroid might miss energy bugs that require specific sensory data to manifest. To address this problem, we propose a novel approach to systematically generating multi-dimensional sensory data. For effective diagnosis, we also propose to consider app state changes at a finer granularity. We implemented our approach as a prototype tool CyanDroid, and evaluated it using four real-world Android apps and hundreds of their mutants. Our results confirmed that CyanDroid is more stable and effective in energy inefficiency diagnosis for sensory data underutilization issues.


Acknowledgment

Acknowledgments

This work was supported in part by National Basic Research Program of China (973) (Grant No. 2015CB352202) and National Natural Science Foundation of China (Grant Nos. 61472174, 91318301, 61321491). The authors would also like to thank the support of the Collaborative Innovation Center of Novel Software Technology and Industrialization, Jiangsu, China.


References

[1] Carroll A, Heiser G. An analysis of power consumption in a smartphone. In: Proceedings of the USENIX Annual Technical Conference, Boston, 2010. 1--14. Google Scholar

[2] Liu Y P, Xu C, Cheung S C. Where has my battery gone? Finding sensor related energy black holes in smartphone applications. In: Proceedings of IEEE International Conference on Pervasive Computing and Communications (PerCom), San Diego, 2013. 2--10. Google Scholar

[3] Liu Y P, Xu C, Cheung S C, et al. GreenDroid: automated diagnosis of energy inefficiency for smartphone applications. IEEE Trans Softw Eng, 2014, 40: 911-940 CrossRef Google Scholar

[4] Bao T, Zheng Y H, Zhang X Y. White box sampling in uncertain data processing enabled by program analysis. In: Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, Tucson, 2012. 897--914. Google Scholar

[5] Sama M, Rosenblum D S, Wang Z M, et al. Model-based fault detection in context-aware adaptive applications. In: Proceedings of the 16th ACM SIGSOFT International Symposium on Foundations of Software Engineering, Atlanta, 2008. 261--271. Google Scholar

[6] King J C. Symbolic execution and program testing. Commun ACM, 1976, 17: 385-394 Google Scholar

[7] Kemerlis V P, Portokalidis G, Jee K, et al. Libdft: practical dynamic data flow tracking for commodity systems. In: Proceedings of the 8th ACM SIGPLAN/SIGOPS Conference on Virtual Execution Environments, London, 2012. 121--132. Google Scholar

[8] Jia Y, Harman M. An analysis and survey of the development of mutation testing. IEEE Trans Softw Eng, 2011, 37: 649-678 CrossRef Google Scholar

[9] Just R, Jalali D, Inozemtseva L, et al. Are mutants a valid substitute for real faults in software testing? In: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, Hong Kong, 2014. 654--665. Google Scholar

[10] Knuth D E, Moore R W. An analysis of alpha-beta pruning. Artif Intell, 1976, 6: 293-326 Google Scholar

[11] Li X J, Jiang Y Y, Liu Y P, et al. User guided automation for testing mobile apps. In: Proceedings of Asia-Pacific Software Engineering Conference, Jeju, 2014. 27--34. Google Scholar

[12] Machiry A, Tahiliani R, Naik M. Dynodroid: an input generation system for Android apps. In: Proceedings of the 9th Joint Meeting on Foundations of Software Engineering, Saint Petersburg, 2013. 224--234. Google Scholar

[13] Mahmood R, Mirzaei N, Malek S. EvoDroid: segmented evolutionary testing of Android apps. In: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, Hong Kong, 2014. 599--609. Google Scholar

[14] Liu Y P, Xu C, Cheung S C. Characterizing and detecting performance bugs for smartphone applications. In: Proceedings of the 36th International Conference on Software Engineering, Hyderabad, 2014. 1013--1024. Google Scholar

[15] Pathak A, Jindal A, Hu Y C, et al. 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. New York: ACM, 2012. 267--280. Google Scholar

[16] Banerjee A, Chong L K, Chattopadhyay S, et al. Detecting energy bugs and hotspots in mobile apps. In: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, Hong Kong, 2014. 588--598. Google Scholar

[17] Singh D, Kaiser W J. The atom LEAP platform for energy-efficient embedded computing. Technical Report, University of California, Los Angeles. 2010. Google Scholar

[18] Pathak A, Hu Y C, Zhang M. 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, Bern, 2012. 29--42. Google Scholar

[19] Hao S, Li D, Halfond W G J, et al. Estimating mobile application energy consumption using program analysis. In: Proceedings of the International Conference on Software Engineering, San Francisco, 2013. 92--101. Google Scholar

[20] Li D, Hao S, Halfond W G, et al. Calculating source line level energy information for Android applications. In: Proceedings of the International Symposium on Software Testing and Analysis, Lugano, 2013. 78--89. Google Scholar

[21] Sahin C, Tornquist P, McKenna R, et al. How does code obfuscation impact energy usage? In: Proceedings of IEEE International Conference on Software Maintenance and Evolution (ICSME), Victoria, 2014. 131--140. Google Scholar

[22] Li D, Hao S, Gui J P, et al. An empirical study of the energy consumption of Android applications. In: Proceedings of IEEE International Conference on Software Maintenance and Evolution (ICSME), Victoria, 2014. 121--130. Google Scholar

[23] Linares-V{á}squez M, Bavota G, Bernal-C{á}rdenas C, et al. Mining energy-greedy API usage patterns in Android apps: an empirical study. In: Proceedings of the 11th Working Conference on Mining Software Repositories, Hyderabad, 2014. 2--11. Google Scholar

[24] Ma X, Huang P, Jin X X, et al. eDoctor: automatically diagnosing abnormal battery drain issues on smartphones. In: Proceedings of the 10th USENIX Conference on Networked Systems Design and Implementation, Lombard, 2013. 57--70. Google Scholar

[25] Li Y C, Guo Y, Kong J J, et al. Fixing sensor-related energy bugs through automated sensing policy instrumentation. In: Proceedings of IEEE/ACM International Symposium on Low Power Electronics and Design (ISLPED), Rome, 2015. 321--326. Google Scholar

[26] Marvasti F. Nonuniform Sampling: Theory and Practice. New York: Springer Science & Business Media, 2012. Google Scholar

Copyright 2019 Science China Press Co., Ltd. 《中国科学》杂志社有限责任公司 版权所有

京ICP备18024590号-1