View on GitHub


Android Merge Tool

Download this project as a .zip file Download this project as a tar.gz file

Java 8


The Android Merge Tool (AMT) does what the name suggests: it merges arbitrary Android apps into a single merged app. As input it takes a number of Android packages (.apk files) and outputs the merged app as one Android package. Along with this primary output, a report is generated optionally. It contains information about the properties (e.g. taint-flows) changed.

An overview of the whole approach is illustrated in the figure above. On the one hand, the first five steps (1 - 5) represent Phase I, the app merging process. Multiple input apps are merged into a single merged app. On the other hand, Step 6 and 7 stand for Phase II. During this phase it is evaluated how accurately the merged app represents the input apps. In order to guarantee accurately merged benchmarks Phase II becomes indispensable. For more information please take a look at the associated paper (see Publications).


Two steps have to be completed in order to use AMT:

Parameter Meaning
androidPlatforms=/path/to/Android/sdks/platforms The path to the Android platforms directory
apktoolPath=/path/to/apktool ApkTool must be installed and this path has to point to the directory containing ApkTool’s JAR file
apktoolJar=apktool_2.3.4.jar Mostly dependent on ApkTool’s version, the JAR’s filename should be adapted here.
aqlQuery=Flows IN App('%APP_APK%') USES 'FlowDroid' ? When run in check or comparison mode, an AQL-Query to execute must be defined here.
comparisonAqlQuery=Flows IN App('%APP_APK%' \| 'COMBINE') USES 'FlowDroid' ? The query used for the comparison must be defined here.
outputFolder=output Any output is stored in the specified directory
Parameter Meaning
-check Turns on the optional check mode
-comparison Turns on the optional comparison mode
-c %FILE%, -cfg %FILE%, -config %FILE% This parameter can be used to specify a different config file for the underlying AQL-System (By default: config.xml is used)
-debug "X", -d "X", -l "X", -loglevel "X" The output generated during the execution of this tool can be set to different levels. X may be set to: error, warning, debug, detailed, verbose (ascending precision from left to right).



AMT is licensed under the GNU General Public License v3 (see LICENSE).


Felix Pauck (FoelliX)
Paderborn University