Given an APK, is it possible to determine which version of Android platform it targets?
Android 4.4 (API level 19).
The Target Android Version (also known as targetSdkVersion ) is the API level of the Android device where the app expects to run. Android uses this setting to determine whether to enable any compatibility behaviors – this ensures that your app continues to work the way you expect.
targetSdkVersion is a property that tells the system for which Android version the app was designed and tested on.
Drag an APK or app bundle into the Editor window of Android Studio. Switch to the Project perspective in the Project window and then double-click the APK in the default build/output/apks/ directory. Select Build > Analyze APK in the menu bar and then select your APK or app bundle.
Use aapt
:
aapt list -a package.apk | grep SdkVersion
You will see version numbers in hex. e.g.:
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x3 A: android:targetSdkVersion(0x01010270)=(type 0x10)0xc
For this apk, minSdkVersion
is 0x3
i.e. 3, and targetSdkVersion
is 0xc
i.e. 12.
Use apktool
java -jar apktool.jar d app.apk
Then look in the generated apktool.yml file for this:
sdkInfo: minSdkVersion: '11' targetSdkVersion: '17'
You can match the SDK version to Android version here. In the above example minimum Android version is 3.0 and target version is 4.2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With