Class AndroidVersionInfo

java.lang.Object
sootup.apk.frontend.main.AndroidVersionInfo

public class AndroidVersionInfo extends Object
Manages Android SDK version information for APK analysis.

This class determines the appropriate Android API version to use when analyzing an APK by:

  1. Extracting the targeted SDK version from the APK's AndroidManifest.xml file
  2. Finding the corresponding android.jar file from the Android platforms directory
  3. Falling back to the latest available android.jar if the targeted version is not available
  4. Using the android.jar file to resolve Android system library references during bytecode analysis
  • Field Details

    • sdkTargetVersion

      public int sdkTargetVersion
    • minSdkVersion

      public int minSdkVersion
    • platformBuildVersionCode

      public int platformBuildVersionCode
  • Constructor Details

    • AndroidVersionInfo

      public AndroidVersionInfo(Path apkPath, String androidPlatformsPath)
      Creates a new AndroidVersionInfo instance.
      Parameters:
      apkPath - the path to the APK file to analyze
      androidPlatformsPath - the path to the Android platforms directory containing Android system libraries (android.jar files) for different API levels. This directory is required to resolve method calls and class references that are not defined in the APK itself, but are part of the Android system libraries. The Android platforms directory can be obtained from https://github.com/Sable/android-platforms
  • Method Details

    • get

      public void get(InputStream manifestIS)
    • getAndroidJarPath

      public void getAndroidJarPath(String jars, Path apk)
    • newFile

      public File newFile(String path)
    • getApi_version

      public int getApi_version()
    • getSdkTargetVersion

      public int getSdkTargetVersion()
    • getMax_api

      public int getMax_api()