Package sootup.apk.frontend.main
Class AndroidVersionInfo
java.lang.Object
sootup.apk.frontend.main.AndroidVersionInfo
Manages Android SDK version information for APK analysis.
This class determines the appropriate Android API version to use when analyzing an APK by:
- Extracting the targeted SDK version from the APK's AndroidManifest.xml file
- Finding the corresponding android.jar file from the Android platforms directory
- Falling back to the latest available android.jar if the targeted version is not available
- Using the android.jar file to resolve Android system library references during bytecode analysis
-
Field Summary
FieldsModifier and TypeFieldDescriptionintintint -
Constructor Summary
ConstructorsConstructorDescriptionAndroidVersionInfo(Path apkPath, String androidPlatformsPath) Creates a new AndroidVersionInfo instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidget(InputStream manifestIS) voidgetAndroidJarPath(String jars, Path apk) intintint
-
Field Details
-
sdkTargetVersion
public int sdkTargetVersion -
minSdkVersion
public int minSdkVersion -
platformBuildVersionCode
public int platformBuildVersionCode
-
-
Constructor Details
-
AndroidVersionInfo
Creates a new AndroidVersionInfo instance.- Parameters:
apkPath- the path to the APK file to analyzeandroidPlatformsPath- 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
-
getAndroidJarPath
-
newFile
-
getApi_version
public int getApi_version() -
getSdkTargetVersion
public int getSdkTargetVersion() -
getMax_api
public int getMax_api()
-