..

Comparing Android third-party libraries

Following up a university project, we want to study Android third-party libraries (TPL); more precisely, we want to provide objective metrics to developers when choosing a TPL for a given usage.

For instance, nowadays, when a mobile developer wants to import a library to display ads in their application, they’ll probably use Google’s AdMob because of various reasons: users’ count, developer support… None of these reasons usually include system metrics such as CPU usage or battery drain.

Limiting the impact of TPLs on smartphones is even more important when said smartphones have limited CPU, memory and battery capabilities: actually, those limited devices representing an increasing part of the mobile phones market, Google designed a lighter version of its Android OS, named Android Go1.


We are currently studying three categories of libraries:

  • monitoring;
  • advertising;
  • crash reporting.

For each tested library, we create an application and a scenario2.

The application is cloned from a template application (which is specific to library categories), and tested library is integrated within it; template applications are also included in the benchmark.

Scenarios contain a list of adb commands that trigger tested libraries (e.g. to test crash reporting TPLs, crash scenario will simulate a screen tap input on an application button which callback raises an error).

Since energy consumption measurements are skewed when the phone is connected to the computer, scenarios run directly on the phone; USB connection is cut before scenarios are started, and is reestablished after they end to download benchmarking metrics.


  1. Android Go edition webpage: https://www.android.com/versions/go-edition/ 

  2. GitHub organization regrouping benchmarking applications and associated scenarios: https://github.com/Android-TPL-energy-consumption