The Android Update Problem: an Empirical Study

The Android Update Problem: an Empirical Study

The Android Update Problem: An Empirical Study Mehran Mahmoudi and Sarah Nadi University of Alberta, Edmonton, Alberta {mehran,nadi}@ualberta.ca ABSTRACT vendors are able to access Android’s source code, and can imple- Many phone vendors use Android as their underlying OS, but often ment their own device specifications and drivers [1]. Since Android extend it to add new functionality and to make it compatible with is open source, phone vendors can add their own enhancements, their specific phones. When a new version of Android is released, including new hardware capabilities and new software features. phone vendors need to merge or re-apply their customizations and When a new version of AOSP is released, phone vendors need to changes to the new release. This is a difficult and time-consuming obtain the new version and re-apply their modifications to it. Due to process, which often leads to late adoption of new versions. In this the complexity of this task, the majority of devices that use Android paper, we perform an empirical study to understand the nature may not run on the most recent version right away. Based on data of changes that phone vendors make, versus changes made in the collected by Google in July 2017 [4], 27% of Android-based devices original development of Android. By investigating the overlap of run an Android version that is at least three years old, which is different changes, we also determine the possibility of having auto- especially problematic for security updates [39, 40]. mated support for merging them. We develop a publicly available The process of re-applying changes from an independently mod- tool chain, based on a combination of existing tools, to study such ified version of Android to a newer version of Android is atime- changes and their overlap. As a proxy case study, we analyze the consuming and manually intensive task. This process can be viewed changes in the popular community-based variant of Android, Lin- as a general software merging problem: we want to merge the eageOS, and its corresponding Android versions. We investigate changes made by vendors with the changes made by Android devel- and report the common types of changes that occur in practice. Our opers. However, unlike common merge scenarios in practice, there findings show that 83% of subsystems modified by LineageOS are is no systematic reuse mechanism like branching or forking: vendor also modified in the next release of Android. By taking thenature modifications are applied in a different repository independent of of overlapping changes into account, we assess the feasibility of changes made by Android developers. While developers can use having automated tool support to help phone vendors with the a mix of Application Programming Interface (API) migration and Android update problem. Our results show that 56% of the changes software merging tools to help them with the process, we are not in LineageOS have the potential to be safely automated. aware of any single off-the-shelf tool that can be used to automati- cally accomplish this merging task. However, before attempting to CCS CONCEPTS automate this task, we argue that we first need to understand the changes that vendors make versus those that Android developers • Software and its engineering → Software evolution; make, and whether these changes overlap. KEYWORDS In this paper, we focus on understanding the nature of the changes that occur in a large software system such as Android Android, Software evolution, Software merging, Merge conflicts when compared to an independently modified version of it. If we ACM Reference Format: understand the nature of the changes on a semantic level (e.g., add Mehran Mahmoudi and Sarah Nadi. 2018. The Android Update Problem: method argument), we can identify current tools and techniques An Empirical Study. In MSR ’18: MSR ’18: 15th International Conference on that can address them, or identify technology gaps that need to be Mining Software Repositories , May 28–29, 2018, Gothenburg, Sweden. ACM, filled. We focus on the Java parts of AOSP since Google recently New York, NY, USA, 11 pages. https://doi.org/10.1145/3196398.3196434 announced the introduction of Project Treble [12, 29] which al- lows easier update of the hardware-specific parts implemented inC arXiv:1801.02716v3 [cs.SE] 20 Mar 2018 1 INTRODUCTION through a new architecture of these layers. However, this does not Google’s open-source mobile operating system (OS), Android, is solve the problem of vendor-specific Java changes in AOSP itself. used by the majority of phone vendors [11] and currently has ap- Since we do not currently have access to proprietary vendor- proximately 80% of the market share of smart phones around the specific code, we use a popular community-based variant ofAn- world [42]. Using the Android Open Source Project (AOSP), phone droid, LineageOS, as a proxy for a vendor-based version of Android. For each subsystem in AOSP, we track the method-level changes Permission to make digital or hard copies of all or part of this work for personal or in the source code using a combination of existing code-evolution classroom use is granted without fee provided that copies are not made or distributed analysis tools: SourcererCC [35], ChangeDistiller [22], and Refac- for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM toringMiner [36]. We are interested in changes in two directions. must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, First, between an old version of Android and its subsequent new to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. version. Second, between the old version of Android and the inde- MSR ’18, May 28–29, 2018, Gothenburg, Sweden pendently modified LineageOS version that is based on that old © 2018 Association for Computing Machinery. Android version. We use the term comparison scenario to describe ACM ISBN 978-1-4503-5716-6/18/05...$15.00 https://doi.org/10.1145/3196398.3196434 MSR ’18, May 28–29, 2018, Gothenburg, Sweden Mehran Mahmoudi and Sarah Nadi the combination of these three versions. For each comparison sce- The Android source code is maintained in multiple repositories nario, we first analyze the types of changes that have occurred. We that collectively build up the source-tree. A list of these repositories then analyze the intersection of the two computed sets of changes is maintained in a repository called Android Platform Manifest [3]. to estimate the proportion of changes that can potentially be auto- Android Subsystems. To understand which OS parts are modified, mated. Specifically we answer the following research questions: it would be useful to divide the Android source code into different RQ1 Which parts of Android are frequently modified in AOSP vs. subsystems. In application development for Android, each folder LineageOS? In each comparison scenario analyzed, there that contains an AndroidManifest.xml file is compiled and built into are at least two common subsystems between LineageOS a .apk file, which is later installed on the phone. Conveniently, all and Android in their corresponding lists of top five most- parts of Android that are implemented in Java are considered as changed subsystems. This suggests that both systems often apps, meaning that they have an AndroidManifest.xml file in their need to apply many changes to the same subsystems. source and are packaged into .apk files. Considering this fact, we RQ2 What are the overlapping types of changes between AOSP and decided to define the notion of an Android Java subsystem as a LineageOS modifications? We find that the majority of Lin- folder that contains an AndroidManifest.xml file. eageOS changes (avg: 50.19%, median 49.46%) change a given LineageOS. Because phone vendors do not make the source code method body, while Android does not modify that method. of their customized Android OS version publicly available, we need On the other hand, we find that an average of 16.08% (me- a proxy for a vendor-specific Android variant. There are a number dian: 16.20%) of LineageOS changes modify a given method of community-based Android OS variants available. Since most of body that Android also modifies in the new version. them are open source, it is possible to use them as a proxy for a mod- RQ3 How feasible is it to automatically re-apply LineageOS changes ified vendor-specific version of Android for our research purposes. to AOSP? By considering the semantics of the different changes, LineageOS [5, 24] is a popular alternative operating system for we find that on average, 56% of LineageOS changes have the devices running Android. It offers features and options that are not potential to be automated when integrating AOSP’s changes. a part of the Android OS distributed by phone vendors. These fea- However, for 28% of the cases, developer input would be tures include native Android user interface, CPU overclocking and needed. The automation feasibility of the remaining 16% performance enhancement, root access, more customization options depends on the specifics of the change. over various parts of the user interface, etc. In 2015, LineageOS had In summary, the contributions of this paper are as follows: more than 50 million active users [24] and a community of more • To the best of our knowledge, this is the first research paper than 1,000 developers. It it actually a continuation of Cyanogen- to discuss the Android update problem, i.e., the problem of Mod, a project that was discontinued in December 2016 and that integrating vendor-specific changes with AOSP updates.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us