Loading…

E-APK: Energy pattern detection in decompiled android applications

Energy efficiency is a non-functional requirement that developers must consider, particularly when building software for battery-operated devices like mobile ones: a long-lasting battery is an essential requirement for an enjoyable user experience. In previous studies, it has been shown that many mo...

Full description

Saved in:
Bibliographic Details
Published in:Journal of computer languages (Online) 2023-08, Vol.76, p.101220, Article 101220
Main Authors: Gregório, Nelson, Bispo, João, Fernandes, João Paulo, Queiroz de Medeiros, Sérgio
Format: Article
Language:English
Subjects:
Citations: Items that this one cites
Items that cite this one
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:Energy efficiency is a non-functional requirement that developers must consider, particularly when building software for battery-operated devices like mobile ones: a long-lasting battery is an essential requirement for an enjoyable user experience. In previous studies, it has been shown that many mobile applications include inefficiencies that cause battery to be drained faster than necessary. Some of these inefficiencies result from software patterns that have been catalogued, and for which more energy-efficient alternatives are also known. The existing catalogues, however, assume as a fundamental requirement that one has access to the source code of an application in order to be able to analyse it. This requirement makes independent energy analysis challenging, or even impossible, e.g. for a mobile user or, most significantly, an App Store trying to provide information on how efficient an application being submitted for publication is. We study the viability of looking for known energy patterns in applications by decompiling them and analysing the resulting code. For this, we decompiled and analysed 420 open-source applications by extending an existing tool, which is now capable of transparently decompiling and analysing android applications. With the collected data, we performed a comparative study of the presence of four energy patterns between the source code and the decompiled code. We performed two types of analysis: (i) comparing the total number of energy pattern detections; (ii) comparing the similarity between energy pattern detections. When comparing the total number of detections in source code against decompiled code, we found that 79.29% of the applications reported the same number of energy pattern detections. To test the similarity between source code and APKs, we calculated, for each application, a similarity score based on our four implemented detectors. Of all applications, 35.76% achieved a perfect similarity score of 4, and 89.40% got a score of 3 or more out of 4. Furthermore, only two applications got a score of 0. When viewed in tandem, the results of the two analyses we performed point in a promising direction. They provide initial evidence that static analysis techniques, typically used in source code, can be a viable method to inspect APKs when access to source code is restricted, and further research in this area is worthwhile.
ISSN:2590-1184
2590-1184
DOI:10.1016/j.cola.2023.101220