225 research outputs found

    Analyzing Android applications for specifications and bugs

    Get PDF
    Android has become one of the leader operating systems for smartphones. Moreover, Android has a big community of developers with over 696500 applications on its market. However, given the complexity of the system, bugs are very common on Android applications--such as security vulnerabilities and energy bugs. Normally Android applications are written using the Java programming language. In contrast to most Java applications, Android applications does not have a single entry point (main function). In addition, these applications can use some system calls and receive events from external entities (such as the user) that affect how their control flows. Therefore, a model of the Android system must be defined in order to understand the behavior of Android applications and define how their control flows. In this thesis, two approaches to define the behavior of Android applications are studied. The first approach is an intra-component analysis that take take in account just the lifecycle of the main components in Android to define control flow of the applications. This approach is evaluated applying a specification miner for energy related specifications on 12 applications from the Android market. We were able to mine 91 specifications on all the applications and 41 of them were validated. For 50% of the applications analyzed, the analysis had less than 40% of false positives specifications. However, for the rest of the applications, the interaction between components was a important factor that increased the false positives. Therefore, the second approach is an inter-component approach that takes in account both, the lifecycle of components and interaction between components to define the control flow of Android applications. We evaluate the approach checking the percentage of code coverage on 8 applications from the Google market. The results are promising with an average coverage of 67%. In addition, we were able to identify bugs related to violations of constraints regarding intecomponent interactions

    Evolution and Fragility of Mobile Automated Test Suites

    Get PDF
    L'abstract è presente nell'allegato / the abstract is in the attachmen

    Categorization and Detection of Energy Bugs and Application Tail Energy Bugs in Smartphones

    Get PDF
    Smartphones are the most ubiquitous and popular hand-held devices because of their rich set of features and wide variety of services. However, their daily use is hampered by their high energy consumption, which forces frequent battery recharging. In smartphones, most energy issues are due to energy bugs (ebugs). These energy bugs are said to exist when smartphone software applications (apps) consume more than expected power while executing or continue to consume energy even after these apps are closed or terminated. Therefore, it is very important to develop energy-efficient applications as these energy bugs severely impact user experience and cause significant user frustration. In the first half of this thesis, we discuss the problem of energy bugs. To develop frameworks and tools that detect energy bugs, we need to characterize the power consuming behaviour of software. To achieve that, we develop an operational definition for energy bugs that can be easily translated to a procedure to detect energy bugs in smartphones. Furthermore, we integrate the proposed definition with a diagnostic framework to provide a step-by-step procedure for application developers to identify different types of energy bugs. Using the proposed testing framework, developers can investigate the existence of energy bugs especially when apps or platforms evolve. We validate the proposed framework with experiments and real-world energy bug examples. The results show that there are energy bugs across different versions of the same app as well as across different versions of Operating systems running on the same smartphone. Being software builders and application support providers, software developers should make energy efficient applications for end-users. Thus in the second half of this thesis, we discuss the relationship between software changes and energy consumption by tracing wakelocks that keep a device awake, and services that might be engaging the CPU silently. Although, computer hardware and software engineers are involved in developing energy efficient mobile systems, unfortunately, the ultimate energy efficiency depends on the software choices and requirements of the end-user. We investigate multiple scenarios demonstrating that an application can consume energy differently when a user closes the app in four different ways (Home, Back, Swipe-out or Force-stop). This difference in energy consumption is also true when the app has different components such as activity or service with or without wakelocks, thus illustrating the trade-offs that end-users can make for the sake of energy consumption. Although these energy bugs trigger during the execution stage, their effect sometimes remain after closing the app. Borrowing a similar concept of tail energy loss from the field of computer networking, we call the loss of battery power, even after the app is closed or terminated, as application tail energy bug (app-tail-ebug). The diagnostic process begin by measuring any difference in energy consumption of the smartphone before and after closing the app by an external power meter, which clearly establishes the existence or absence of application tail energy bug. To verify, we use system utilities such as Android logging system, logcat, bugreport, dumpstate and dumpsys. Our ultimate goal is to design a tool as an app running on the device, which can analyse system information and suggest the presence of energy bugs. However, Android has strengthened the security of its OS after KitKat version 4.4, and now superuser access is required to run system level commands. Furthermore, no user app is allowed to access system level information unless the testing app is installed as a system app. Therefore, we run our tool on a desktop PC. In summary, the results of this work can be used by application developers to make implementation level decisions to appreciably improve energy efficiency of software applications on smartphones

    What the Smell? An Empirical Investigation on the Distribution and Severity of Test Smells in Open Source Android Applications

    Get PDF
    The widespread adoption of mobile devices, coupled with the ease of developing mobile-based applications (apps) has created a lucrative and competitive environment for app developers. Solely focusing on app functionality and time-to-market is not enough for developers to ensure the success of their app. Quality attributes exhibited by the app must also be a key focus point; not just at the onset of app development, but throughout its lifetime. The impact analysis of bad programming practices, or code smells, in production code has been the focus of numerous studies in software maintenance. Similar to production code, unit tests are also susceptible to bad programming practices which can have a negative impact not only on the quality of the software system but also on maintenance activities. With the present corpus of studies on test smells primarily on traditional applications, there is a need to fill the void in understanding the deviation of testing guidelines in the mobile environment. Furthermore, there is a need to understand the degree to which test smells are prevalent in mobile apps and the impact of such smells on app maintenance. Hence, the purpose of this research is to: (1) extend the existing set of bad test-code practices by introducing new test smells, (2) provide the software engineering community with an open-source test smell detection tool, and (3) perform a large-scale empirical study on test smell occurrence, distribution, and impact on the maintenance of open-source Android apps. Through multiple experiments, our findings indicate that most Android apps lack an automated verification of their testing mechanisms. As for the apps with existing test suites, they exhibit test smells early on in their lifetime with varying degrees of co-occurrences with different smell types. Our exploration of the relationship between test smells and technical debt proves that test smells are a strong measurement of technical debt. Furthermore, we observed positive correlations between specific smell types and highly changed/buggy test files. Hence, this research demonstrates that test smells can be used as indicators for necessary preventive software maintenance for test suites

    Detecting wake lock leaks in Android apps using machine learning

    Get PDF
    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

    Supporting Evolution and Maintenance of android Apps

    Get PDF
    Mobile developers and testers face a number of emerging challenges. These include rapid platform evolution and API instability; issues in bug reporting and reproduction involving complex multitouch gestures; platform fragmentation; the impact of reviews and ratings on the success of their apps; management of crowd-sourced requirements; continuous pressure from the market for frequent releases; lack of effective and usable testing tools; and limited computational resources for handheld devices. Traditional and contemporary methods in software evolution and maintenance were not designed for these types of challenges; therefore, a set of studies and a new toolbox of techniques for mobile development are required to analyze current challenges and propose new solutions. This dissertation presents a set of empirical studies, as well as solutions for some of the key challenges when evolving and maintaining android apps. In particular, we analyzed key challenges experienced by practitioners and open issues in the mobile development community such as (i) android API instability, (ii) performance optimizations, (iii) automatic GUI testing, and (iv) energy consumption. When carrying out the studies, we relied on qualitative and quantitative analyses to understand the phenomena on a large scale by considering evidence extracted from software repositories and the opinions of open-source mobile developers. From the empirical studies, we identified that dynamic analysis is a relevant method for several evolution and maintenance tasks, in particular, because of the need of practitioners to execute/validate the apps on a diverse set of platforms (i.e., device and OS) and under pressure for continuous delivery. Therefore, we designed and implemented an extensible infrastructure that enables large-scale automatic execution of android apps to support different evolution and maintenance tasks (e.g., testing and energy optimization). In addition to the infrastructure we present a taxonomy of issues, single solutions to the issues, and guidelines to enable large execution of android apps. Finally, we devised novel approaches aimed at supporting testing and energy optimization of mobile apps (two key challenges in evolution and maintenance of android apps). First, we propose a novel hybrid approach for automatic GUI-based testing of apps that is able to generate (un)natural test sequences by mining real applications usages and learning statistical models that represent the GUI interactions. In addition, we propose a multi-objective approach for optimizing the energy consumption of GUIs in android apps that is able to generate visually appealing color compositions, while reducing the energy consumption and keeping a design concept close to the original

    Enhancing Automated GUI Exploration Techniques for Android Mobile Applications

    Get PDF
    Mobile software applications ("apps") are used by billions of smartphone owners worldwide. The demand for quality to these apps has grown together with their spread. Therefore, effective techniques and tools are being requested to support developers in mobile app quality engineering activities. Automation tools can facilitate these activities since they can save humans from routine, time consuming and error prone manual tasks. Automated GUI exploration techniques are widely adopted by researchers and practitioners in the context of mobile apps for supporting critical engineering tasks such as reverse engineering, testing, and network traffic signature generation. These techniques iteratively exercise a running app by exploiting the information that the app exposes at runtime through its GUI to derive the set of input events to be fired. Although several automated GUI exploration techniques have been proposed in the literature, they suffer from some limitations that may hinder them from a thorough app exploration. This dissertation proposes two novel solutions that contribute to the literature in Software Engineering towards improving existing automated GUI exploration techniques for mobile software applications. The former is a fully automated GUI exploration technique that aims to detect issues tied to the app instances lifecycle, a mobile-specific feature that allows users to smoothly navigate through an app and switch between apps. In particular, this technique addresses the issues of crashes and GUI failures, that consists in the manifestation of unexpected GUI states. This work includes two exploratory studies that prove that GUI failures are a widespread problem in the context of mobile apps. The latter solution is a hybrid exploration technique that combines automated GUI exploration with capture and replay through machine learning. It exploits app-specific knowledge that only human users can provide in order to explore relevant parts of the application that can be reached only by firing complex sequences of input events on specific GUIs and by choosing specific input values. Both the techniques have been implemented in tools that target the Android Operating System, that is today the world’s most popular mobile operating system. The effectiveness of the proposed techniques is demonstrated through experimental evaluations performed on real mobile apps

    Preventing Capability Abuse through Systematic Analysis of Exposed Interface

    Full text link
    Connectivity and interoperability are becoming more and more critical in today’s software and cyber-physical systems. Different components of the system can better collaborate, enabling new innovation opportunities. However, to support connectivity and interoperability, systems and applications have to expose certain capabilities, which inevitably expands their attack surfaces and increases the risk of being abused. Due to the complexity of software systems and the heterogeneity of cyber-physical systems, it is challenging to secure their exposed interfaces and completely prevent abuses. To address the problems in a proactive manner, in this dissertation, we demonstrate that systematic studies of exposed interfaces and their usage in the real world, leveraging techniques such as program analysis, can reveal design-level, implementation-level, as well as configuration-level security issues, which can help with the development of defense solutions that effectively prevent capability abuse. This dissertation solves four problems in this space. First, we detect inconsistent security policy enforcement, a common implementation flaw. Focusing on the Android framework, we design and build a tool that compares permissions enforced on different code paths and identifies the paths enforcing weaker permissions. Second, we propose the Application Lifecycle Graph (ALG), a novel modeling approach to describing system-wide app lifecycle, to assist the detection of diehard behaviors that abuse lifecycle interfaces. We develop a lightweight runtime framework that utilizes ALG to realize fine-grained app lifecycle control. Third, we study real-world programmable logic controller programs for identifying insecure configurations that can be abused by adversaries to cause safety violations. Lastly, we conduct the first systematic security study on the usage of Unix domain sockets on Android, which reveals both implementation flaws and configuration weaknesses.PHDComputer Science & EngineeringUniversity of Michigan, Horace H. Rackham School of Graduate Studieshttps://deepblue.lib.umich.edu/bitstream/2027.42/149960/1/yurushao_1.pd
    • …
    corecore