GoneToneStudio/node-google-play-api

Split APK

dudul opened this issue · 8 comments

dudul commented

Hi,
I'm trying to download a aplit apk app and it looks like it download a single small apk.
For example:
com.supercell.clashofclans
or
com.miniclip.agar.io

apkpure.com shows that this is a split apk (apk+obb) and shows the real file size (as shown on Google Play).

Any suggestions?

Is there a problem?

dudul commented

It looks like the installation works, but failed to run the app (I'm not sure if its the device's issue or the application).
For now, as a workaround, I'm using downloadInfo() and splitDeliveryData to get the additional apks links and download them manually.

googleplay_asset_pack ?

dudul commented

its one of them.
These are all the files:

total 173884
-rw-rw-r-- 1 ubuntu ubuntu 138460724 Sep 10 06:14 com.supercell.clashofclans.apk
-rw-rw-r-- 1 ubuntu ubuntu  11997822 Sep 10 06:14 config.arm64_v8a.apk
-rw-rw-r-- 1 ubuntu ubuntu     41369 Sep 10 06:14 config.en.apk
-rw-rw-r-- 1 ubuntu ubuntu    217466 Sep 10 06:14 config.xxhdpi.apk
-rw-rw-r-- 1 ubuntu ubuntu  27324838 Sep 10 06:14 googleplay_asset_pack.apk

splitDeliveryData includes the additional apk files links and the downloadApk() download the main apk (com.supercell.clashofclans.apk)

So you can install and run the app normally?

I tested is not working, I'm not sure principle, I have not studied this area

dudul commented

It's called "App Bundle" or "Split APK", you can read more about that here:
https://developer.android.com/guide/app-bundle
or here
https://www.cloudsavvyit.com/12544/apk-vs-app-bundle-why-is-google-changing-androids-app-format/

There are few ways to install them:
adb install-multiple "AppName.apk" "ConfigA.apk" "ConfigB.apk"
https://android.stackexchange.com/a/232725

or

pm install-create pm install-write pm install-commit
https://raccoon.onyxbits.de/blog/install-split-apk-adb/

I try to use this app (https://play.google.com/store/apps/details?id=com.aefyr.sai) install split apk, successfully installed!

I will add a function to download all split apk.