Abstract
The popularity of Android devices has increased exponentially with an increase in the number of mobile devices. Millions of online apps are used in these devices. Energy consumption of a device is a major concern for end-users, who want a long usage time on a single battery charge. The energy consumed by the app must be optimized by developers, and the available APIs must be used carefully. A wake-lock is used in apps to control the power state of the Android device and often leads to energy leakage. In this study, we detected wake-lock leaks in Android apps using machine learning. We pre-processed apps by extracting wake-lock related APIs to obtain the structural information of wake-lock usage and oversampled the data using the synthetic minority oversampling technique (SMOTE) to balance the dataset. The machine learning algorithms used to detect wake-lock leaks were first optimized using grid search to determine the best parameters. These parameters were then used in training to detect wake-lock leaks in these apps. We employed various machine learning algorithms and divided them into simple and ensemble algorithms to evaluate their efficacy. The support vector machine (SVM) and stochastic gradient boosting (SGB) were the most effective, producing 97 % and 98 % accuracy, respectively.
Highlights
The number of smartphone users worldwide is increasing; they surpass three billion and are expected to increase more [1]
We focused on detecting wake lock energy leaks by first extracting wake lock information and applying a machine learning algorithm to find wake lock leaks and evaluate their accuracy
The call graphs (CG) of an Application Package Kit (APK) contains a large number of different method calls, which means a large number of nodes and edges. It requires more time and computational resources to process; we reduce the size by extracting the function call graphs (FCG)
Summary
The number of smartphone users worldwide is increasing; they surpass three billion and are expected to increase more [1]. The primary function of a mobile device is to connect users to the rest of the world and provide basic functionalities to aid them in performing small tasks These mobile devices have limited resources such as CPU, memory, battery, and display. The Android operating system (OS), iOS, Windows, and most popular apps such as WhatsApp, Facebook, YouTube, and Chrome provide a dark mode to reduce the energy consumption of the device [5]. This shows that big companies are aware of the importance of energy consumption in mobile devices. Removing all resource leaks will lead to an efficient mobile app
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.