Automatic Debugging of Android Applications
Pedro Miguel Ferreira Machado · Open Repository of the University of Porto (University of Porto) · 2013
In the past few years, we’ve been assisting to an exponential growth of the mobile devices’ market. In 2011 the number of devices shipped exceeded the number of PCs. Despite this market growth and the improvements made to the mobile architectures, debugging mobile apps is still a manual, error-prone and time consuming task. While the reliability of an application can be greatly improved by extensively testing and debugging it, this process often conflicts with market conditions. Automated diagnosis of errors and/or failures detected during software testing can greatly improve the efficiency of the debugging process, thus helping to make applications more reliable. Fault localization has been an active area of research, leading to the creation of several tools, such as Tarantula and GZOLTAR. Spectrum-based Fault Localization (SFL), the technique behind the outlined tools, is a statistical debugging technique that relies on code coverage information. However, the embedded nature of mobile devices poses some particular challenges, thus very few has been reported in the area of mobile software. This thesis proposes an approach to overcome the challenges presented by the mobile devices architecture. This approach, dubbed MZOLTAR, that combines static (using Lint) and dynamic analysis (using SFL) of mobile apps to produce a diagnostic report to help identify potential defects quickly. The approach also offers a graphical representation of the diagnostic report, making it easier to understand. To assess the validity and performance of MZOLTAR, an empirical evaluation was performed, by injecting faults into 4 real open-source Android applications. The results show that the approach requires low runtime overhead (5.75% on average), while the tester needs to inspect 5 components on average to find the fault. Furthermore, it demonstrates that Lint helps revealing bugs that otherwise would go undetected by the SFL fault localization technique. In those cases, the integration with Lint reduced the number of components to inspect by 99.9% on average.