How Does Code Obfuscation Impact Energy Usage?

Software piracy is an important concern for application developers. Such concerns are especially relevant in mobile application development, where piracy rates can approach 90%. The most commonly used approach by mobile developers for preventing piracy is code obfuscation. However, the decision to apply such transformations is currently made without regard to the impacts of obfuscations on another area of increasing concern for mobile application developers: energy consumption. Because both software piracy and battery life are important concerns, mobile application developers must strike a balance between protecting their applications and preserving the battery lives of their users' devices. To help them make such choices, we conducted an empirical study of the effects of 18 code obfuscations on the amount of energy consumed by executing a total of 15 usage scenarios spread across 11 Android applications. The results of the study indicate that, while obfuscations can have a statistically significant impact on energy usage and are significantly more likely to increase energy usage than to decrease energy usage, the magnitudes of such impacts are unlikely to impact mobile application users.

[1]  Byung-Gon Chun,et al.  Augmented Smartphone Applications Through Clone Cloud Execution , 2009, HotOS.

[2]  Sharad Malik,et al.  Power analysis of embedded software: a first step towards software power minimization , 1994, IEEE Trans. Very Large Scale Integr. Syst..

[3]  Gustavo Pinto,et al.  Mining questions about software energy consumption , 2014, MSR 2014.

[4]  Mahmut T. Kandemir,et al.  Using complete machine simulation for software power estimation: the SoftWatt approach , 2002, Proceedings Eighth International Symposium on High Performance Computer Architecture.

[5]  Alexander Chatzigeorgiou,et al.  Energy Consumption Analysis of Design Patterns , 2007 .

[6]  Ulrich Kremer,et al.  The design, implementation, and evaluation of a compiler algorithm for CPU energy reduction , 2003, PLDI '03.

[7]  Chi-Ying Tsui,et al.  Low power architecture design and compilation techniques for high-performance processors , 1994, Proceedings of COMPCON '94.

[8]  Ramesh Govindan,et al.  Estimating Android applications' CPU energy usage via bytecode profiling , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

[9]  Lori L. Pollock,et al.  Initial explorations on design pattern energy usage , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

[10]  Amin Vahdat,et al.  ECOSystem: managing energy as a first class operating system resource , 2002, ASPLOS X.

[11]  William G. J. Halfond,et al.  How does code obfuscation impact energy usage? , 2016, J. Softw. Evol. Process..

[12]  Mary Jane Irwin,et al.  Techniques for low energy software , 1997, Proceedings of 1997 International Symposium on Low Power Electronics and Design.

[13]  Lionel C. Briand,et al.  A practical guide for using statistical tests to assess randomized algorithms in software engineering , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[14]  Todd D. Millstein,et al.  RERAN: Timing- and touch-sensitive record and replay for Android , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[15]  Robin Kravets,et al.  Power management techniques for mobile communication , 1998, MobiCom '98.

[16]  Woongki Baek,et al.  Green: a framework for supporting energy-conscious programming using controlled approximation , 2010, PLDI '10.

[17]  Jack W. Davidson,et al.  Memory access coalescing: a technique for eliminating redundant memory accesses , 1994, PLDI '94.

[18]  Mark D. Corner,et al.  Eon: a language and runtime system for perpetual systems , 2007, SenSys '07.

[19]  Diana Marculescu,et al.  Power aware microarchitecture resource scaling , 2001, Proceedings Design, Automation and Test in Europe. Conference and Exhibition 2001.

[20]  Yepang Liu,et al.  Where has my battery gone? Finding sensor related energy black holes in smartphone applications , 2013, 2013 IEEE International Conference on Pervasive Computing and Communications (PerCom).

[21]  Mahmut T. Kandemir,et al.  Energy-conscious compilation based on voltage scaling , 2002, LCTES/SCOPES '02.

[22]  Kathryn S. McKinley,et al.  The latency, accuracy, and battery (LAB) abstraction: programmer productivity and energy efficiency for continuous mobile context sensing , 2013, OOPSLA.

[23]  Samuel P. Midkiff,et al.  What is keeping my phone awake?: characterizing and detecting no-sleep energy bugs in smartphone apps , 2012, MobiSys '12.

[24]  Abram Hindle Green mining: A methodology of relating software change to power consumption , 2012, 2012 9th IEEE Working Conference on Mining Software Repositories (MSR).

[25]  Christian Bunse,et al.  On the Energy Consumption of Design Patterns , 2013, Softwaretechnik-Trends.

[26]  Yu David Liu,et al.  Green Streams for data-intensive software , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[27]  Lori L. Pollock,et al.  How do code refactorings affect energy usage? , 2014, ESEM '14.

[28]  Enric Musoll A Thermal-Friendly Load-Balancing Technique for Multi-Core Processors , 2008, 9th International Symposium on Quality Electronic Design (isqed 2008).

[29]  Henri E. Bal,et al.  Cuckoo: A Computation Offloading Framework for Smartphones , 2010, MobiCASE.

[30]  Dipankar Sarma,et al.  Energy-aware task and interrupt management in Linux , 2009 .

[31]  Ting Cao,et al.  The Yin and Yang of power and performance for asymmetric hardware and managed software , 2012, 2012 39th Annual International Symposium on Computer Architecture (ISCA).

[32]  Mahmut T. Kandemir,et al.  Compiler-directed high-level energy estimation and optimization , 2005, TECS.

[33]  Matt Welsh,et al.  Flask: staged functional programming for sensor networks , 2008, ICFP.

[34]  Luis Ceze,et al.  Characterizing the Performance and Energy Efficiency of Lock-Free Data Structures , 2011, 2011 15th Workshop on Interaction between Compilers and Computer Architectures.

[35]  Yung-Hsiang Lu,et al.  Automatic Run-Time Selection of Power Policies for Operating Systems , 2006, Proceedings of the Design Automation & Test in Europe Conference.

[36]  Yu David Liu,et al.  Energy-efficient synchronization through program patterns , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

[37]  Paolo Falcarin,et al.  A large study on the effect of code obfuscation on the quality of java code , 2015, Empirical Software Engineering.

[38]  Marco Torchiano,et al.  The effectiveness of source code obfuscation: An experimental assessment , 2009, 2009 IEEE 17th International Conference on Program Comprehension.

[39]  Ding Li,et al.  Integrated energy-directed test suite optimization , 2014, ISSTA 2014.

[40]  Y. N. Srikant,et al.  Compiler-directed frequency and voltage scaling for a multiple clock domain microarchitecture , 2008, CF '08.

[41]  Luca Benini,et al.  Requester-aware power reduction , 2000, ISSS '00.

[42]  Ramesh Govindan,et al.  Estimating mobile application energy consumption using program analysis , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[43]  Trevor Mudge,et al.  Dynamic voltage scaling on a low-power microprocessor , 2001 .

[44]  Sam Malek,et al.  Component-Level Energy Consumption Estimation for Distributed Java-Based Software Systems , 2008, CBSE.

[45]  Lam H. Nguyen,et al.  Stereo matching: performance study of two global algorithms , 2011, Defense + Commercial Sensing.

[46]  Michael Cohen,et al.  Energy types , 2012, OOPSLA '12.

[47]  Lori L. Pollock,et al.  Investigating the impacts of web servers on web application energy usage , 2013, 2013 2nd International Workshop on Green and Sustainable Software (GREENS).

[48]  Suman Roychoudhury,et al.  Choosing the "Best" Sorting Algorithm for Optimal Energy Consumption , 2009, ICSOFT.

[49]  Gabriele Bavota,et al.  Mining energy-greedy API usage patterns in Android apps: an empirical study , 2014, MSR 2014.

[50]  Bill Tomlinson,et al.  Green tracker: a tool for estimating the energy consumption of software , 2010, CHI Extended Abstracts.

[51]  Krste Asanovic,et al.  Reducing power density through activity migration , 2003, ISLPED '03.

[52]  Rahul Khanna,et al.  RAPL: Memory power estimation and capping , 2010, 2010 ACM/IEEE International Symposium on Low-Power Electronics and Design (ISLPED).

[53]  Song Liu,et al.  Flikker: saving DRAM refresh-power through critical data partitioning , 2011, ASPLOS XVI.

[54]  W. D. D. Silva,et al.  Evaluation of the impact of code refactoring on embedded software efficiency , 2010 .

[55]  Ramesh Govindan,et al.  Calculating source line level energy information for Android applications , 2013, ISSTA.

[56]  Ding Li,et al.  Detecting Display Energy Hotspots in Android Apps , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[57]  Dan Grossman,et al.  EnerJ: approximate data types for safe and general low-power computation , 2011, PLDI '11.

[58]  Ramon Canal,et al.  Design space exploration for multicore architectures: a power/performance/thermal view , 2006, ICS '06.

[59]  Chen-Mou Cheng,et al.  COCA: Computation Offload to Clouds Using AOP , 2012, 2012 12th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (ccgrid 2012).

[60]  Y. Benjamini,et al.  Controlling the false discovery rate: a practical and powerful approach to multiple testing , 1995 .

[61]  Bharat K. Bhargava,et al.  A Survey of Computation Offloading for Mobile Systems , 2012, Mobile Networks and Applications.

[62]  Thomas D. Burd,et al.  Voltage scheduling in the IpARM microprocessor system , 2000, ISLPED'00: Proceedings of the 2000 International Symposium on Low Power Electronics and Design (Cat. No.00TH8514).

[63]  Ding Li,et al.  An Empirical Study of the Energy Consumption of Android Applications , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[64]  Lori L. Pollock,et al.  SEEDS: a software engineer's energy-optimization decision support framework , 2014, ICSE.

[65]  Krisztián Flautner,et al.  Automatic Performance Setting for Dynamic Voltage Scaling , 2001, MobiCom '01.

[66]  Ulrich Kremer Low-Power/Energy Compiler Optimizations , 2004 .

[67]  Anish Muttreja,et al.  Hybrid simulation for embedded software energy estimation , 2005, Proceedings. 42nd Design Automation Conference, 2005..

[68]  William G. J. Halfond,et al.  Truth in Advertising: The Hidden Cost of Mobile Ads for Software Developers , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[69]  Sam Malek,et al.  An energy consumption framework for distributed java-based systems , 2007, ASE.

[70]  A. Vargha,et al.  A Critique and Improvement of the CL Common Language Effect Size Statistics of McGraw and Wong , 2000 .

[71]  Luis Ceze,et al.  Architecture support for disciplined approximate programming , 2012, ASPLOS XVII.

[72]  Jie Liu,et al.  LittleRock: Enabling Energy-Efficient Continuous Sensing on Mobile Phones , 2011, IEEE Pervasive Computing.

[73]  Ding Li,et al.  Making web applications more energy efficient for OLED smartphones , 2014, ICSE.

[74]  Xiao Ma,et al.  eDoctor : Automatically Diagnosing Abnormal Battery Drain Issues on Smartphones , 2013 .

[75]  William J. Kaiser,et al.  The Atom LEAP Platform For Energy-Efficient Embedded Computing , 2010 .

[76]  Romain Rouvoy,et al.  A preliminary study of the impact of software engineering on GreenIT , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

[77]  Christopher W. Fraser,et al.  Engineering a simple, efficient code-generator generator , 1992, LOPL.

[78]  Daniel A. Jiménez,et al.  Efficient Program Power Behavior Characterization , 2007, HiPEAC.

[79]  Soheil Ghiasi,et al.  Efficient and Scalable Compiler-Directed Energy Optimization for Realtime Applications , 2007, 2007 Design, Automation & Test in Europe Conference & Exhibition.

[80]  Margaret Martonosi,et al.  Wattch: a framework for architectural-level power analysis and optimizations , 2000, Proceedings of 27th International Symposium on Computer Architecture (IEEE Cat. No.RS00201).

[81]  Fred Douglis,et al.  Adaptive Disk Spin-Down Policies for Mobile Computers , 1995, Comput. Syst..