Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Request: add a field to tell which kind of APK we have #120

Open
AndroidDeveloperLB opened this issue Apr 10, 2020 · 1 comment
Open

Request: add a field to tell which kind of APK we have #120

AndroidDeveloperLB opened this issue Apr 10, 2020 · 1 comment

Comments

@AndroidDeveloperLB
Copy link

I suggest to add a field that says which kind this APK file is :

  • A normal standalone APK - true if not of the other types mentioned below.
  • A base APK of split apks - true if apkFile.apkMeta.isSplitRequired is true or in case it's not defined, if in "application" tag there is a "meta-data" with name that is com.android.vending.splits"
  • A split APK - true if apkFile.apkMeta.split is not null
@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Apr 11, 2020

Seems my algorithm doesn't always do it right.

There is "meta-data" of "com.android.vending.splits" (resource value) which might have a value yet not really mean it has split apks.
There is also a "meta-data" of "com.android.vending.splits.required" (boolean value) which doesn't always exist.
And, there is "meta-data" of "instantapps.clients.allowed" that is another type of split apks.

So, there should be another type:

  • Standalone or base of split APKs (meaning we are sure it's not a split APK, but not sure about more information about it)

And the algorithm should be as such:

  • apkFile.apkMeta.split not null -> a split APK

  • apkMeta.isSplitRequired (check here about an issue related to it) or "meta-data" with value of "com.android.vending.splits.required" set to true - > a base APK of split apks

  • "com.android.vending.splits.required" or "com.android.vending.splits" or "instantapps.clients.allowed" exist -> could be either a base apk or a standalone

  • Otherwise -> standalone APK.

Sample project:

https://github.com/AndroidDeveloperLB/apk-parser

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant