Sable/soot — pull request #4 by Alexandre-Bartel (2012-07-15 16:45:22+00:00)
Title: New -android-jars and -force-android-jar options to select Android API v...

Patch enabling Soot to check the correct api version
needed to analyze the target Android application.

The logic has been implemented in the defaultClassPath() method of the
Scene.

There are two options:
-android-jars
where /path/to/dir/ is the place to look for the correct android.jar
Structure of /path/to/dir must be similar to the directory of the
Android sdk (androiSDK/android-sdk-X.Y/platforms/). In the typical case
users will just target androiSDK/android-sdk-X.Y/platforms/.

-force-android-jar
to force the use of a specific android.jar

Knowing the exact sdk version is not always possible as this
field may be missing from the AndroidManifest.xml. For now, Soot just
assigns a default one in such case (correct behavior according to the
official website: no sdk versions means it runs everywhere.). The logic
is the following:
if (sdkTargetVersion != -1) {
APIVersion = sdkTargetVersion;
} else if (minSdkVersion != -1) {
APIVersion = minSdkVersion;
} else {
APIVersion = defaultSdkVersion;
}

At the moment, only 1 apk can be analyzed at a time using -android-jars.