Bug #3016

parse minSdkVersion from APK to set <sdkver>

Added by hans almost 4 years ago. Updated over 3 years ago.

Status:ClosedStart date:03/01/2014
Priority:HighDue date:
Assignee:-% Done:

0%

Category:-
Target version:improved security/usability
Component:

Description

one key value in the FDroid metadata is <sdkver> which is android:minSdkVersion in the AndroidManifest.xml. Unfortunately, ApplicationInfo only has targetSdkVersion. So we need to find a way to read this directly from the APK, I suppose.

Here is one potential source of code to do this:

Associated revisions

Revision b0bf6b4a
Added by hans almost 4 years ago

hard-code APK's minSdkVersion, targetSdkVersion is different

ApplicationInfo.targetSdkVersion provides the "minimum target version",
which is the version that the build was targeted to. This is different
than the minSdkVersion, which is the minimum version that the APK will run
on. It seems that the only way to get the minSdkVersion from the APK is to
parse it out of the AndroidManifest.xml... sigh...

refs #3016

Revision a9db3d34
Added by hans almost 4 years ago

parse minSdkVersion from AndroidManifest.xml

PackageManager doesn't give us minSdkVersion, so we have to parse it.

fixes #3016 https://dev.guardianproject.info/issues/3016

History

#1 Updated by hans almost 4 years ago

Unfortunately the Android docs are not very clear on this:

"The minimum SDK version this application targets" is different from "the minimum SDK version this application can run on it"

#2 Updated by hans over 3 years ago

  • Status changed from New to Resolved

Applied in changeset kerplapp|commit:a9db3d34e561b1d09f52ca6d4222fcc49216a97c.

#3 Updated by hans over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF