No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.mvn/wrapper
maven-repository/com/android/update/analysis
python
sourcerercc
src/main/java/ca/ualberta/mehran/androidevolution
.gitignore
.travis.yml
LICENSE
README.md
mvnw
mvnw.cmd
pom.xml

README.md

Android Update Analysis Build Status

A project for comparing changes between Android's proprietary updates and other independently modified versions of it, such as the OS distributed by phone vendors or community-based variants.

The master branch contains the latest changes. You can check out the code used for our MSR '18 submission.

System requirements

  • Linux or macOS
  • git
  • Java 8

How to run

Running the code from scratch involves multiple steps.

1. Mutual repositories

You should first fetch the list of mutual repositories between corresponding Android and custom system versions. This can be achieved by running the repo.py script. This script requires repos_config.xml as in input. This file includes the list of Android-based systems you want to study ("projects"), and the URL to the manifest file that includes the list of required repositories for each version. A sample file is provided in the repo which includes only 1 project, LieangeOS, and the latest 8 versions of it. You can add additional projects to this file by adding a new <project> tag.

This script will create a csv file for each pair of Android and "project" version, containing a list of repositories and their AOSP and "project" URLs. These files will be used as the input of the Java code which performs the analysis. A sample folder named CM already exists.

After the scripts finishes running, please copy each projects folder (For example CM) to input/csv/.

2. Build the project

Run the following command to compile the project and create an executable JAR file:

./mvnw clean compile assembly:single clean

This command will create android-update-analysis.jar file in the root directory.

3. Run the JAR file

You can run the JAR file with the following command:

java -jar android-update-analysis.jar

4. Process results & draw plots

This repository contains instructions on how to create plots using the results. You can also view the data we used in our MSR '18 submission there. The results we used in our paper were obtained by running the Java code for LineageOS with the provided repos_config.xml file. They are available in the results directory.

Input and output files

csv input files

This section further explains the structure of csv input files generated by repo.py and required by the Java code. You do not need to know this if you want to simply run the program. This program needs the version names and URLs of the Android subsystems that should be analyzed as csv files. All this information are passed to the program via csv files. The program searches its current directory for all CSV files and processes them.

Each line in the CSV file could be either a combination of three versions, a subsystem or a comment:

  1. Version line begins with versions: and follow by three version names: Android old version, Android new version and the LineageOS version that is based on the old version of Android. These names correspond to tag names in Android repositories and branch names in LineageOS.
  2. Subsystem lines consist of three parts. The first part is the name of subsystem, the second part is the URL address of the Android repository of that subsystem, and the third part is URL address of the CM repository of the subsystem.
  3. Comment lines can either start with #, ! or /.

A csv input file example:

versions:android-4.2_r1,android-4.3_r1,cm-10.1
versions:android-4.3_r1,android-4.4_r1,cm-10.2
versions:android-4.4_r1,android-5.0.0_r1,cm-11.0
versions:android-5.0.0_r1,android-5.1.0_r1,cm-12.0
versions:android-5.1.0_r1,android-6.0.0_r1,cm-12.1
versions:android-6.0.0_r1,android-7.0.0_r1,cm-13.0
versions:android-7.0.0_r1,android-7.1.0_r1,cm-14.0
packages_apps_Gallery2,https://android.googlesource.com/platform/packages/apps/Gallery2,https://review.lineageos.org/LineageOS/android_packages_apps_Gallery2
development,https://android.googlesource.com/platform/development,https://review.lineageos.org/LineageOS/android_development
packages_apps_KeyChain,https://android.googlesource.com/platform/packages/apps/KeyChain,https://review.lineageos.org/LineageOS/android_packages_apps_KeyChain
#packages_providers_UserDictionaryProvider,https://android.googlesource.com/platform/packages/providers/UserDictionaryProvider,https://review.lineageos.org/LineageOS/android_packages_providers_UserDictionaryProvider

Output

For each subsystem and each tuple of versions, a csv file will be generated in the output folder, in the current path.

Each csv output file includes information regarding the three versions of a subsystem. These three versions are the old Android version (Android Old or AO), the new Android version that is based on AO (Android New or AN), and a independently modified variant of the subsystem that is based on AO (Modified or MO).

The first line includes the number of method is AO, AN and MO. The last line includes the number of new methods in AN, MO and methods with same signature and different body that are added to both AN and MO; the number in parenthesis is the number of identical new methods between MO and AN (same signature and body). The remaining lines between the first and last line constitute the results table for methods in AO, and their status in AN and MO. They layout of the table follows the the changesets table (Table 1) in the paper.

There might be numbers written in parenthesis for the intersections with the same change type in AN and MO. Those are the number of method that had an identical type of change, and were purged from the total number of methods in that category. The number before parenthesis does not include the number in the parenthesis, so the numbers in parenthesis can be simply ignored in most cases.

How to Cite

If you are using this project in your research, please cite the following paper:

@inproceedings{AndroidUpdateProblem,
 author = {Mahmoudi, Mehran and Nadi, Sarah},
 title = {The Android Update Problem: An Empirical Study},
 booktitle = {Proceedings of the 15th International Conference on Mining Software Repositories},
 series = {MSR '18},
 year = {2018},
 isbn = {978-1-4503-5716-6},
 location = {Gothenburg, Sweden},
 pages = {220--230},
 numpages = {11},
 url = {http://doi.acm.org/10.1145/3196398.3196434},
 doi = {10.1145/3196398.3196434},
 acmid = {3196434},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {Android, merge conflicts, software evolution, software merging},
} 

Publications

License

This project is available under GNU General Public License v3.0. Third party libraries used are licensed as follows:

Team