GoneToneStudio / node-google-play-api

Access Google Play by logging in and making requests as an Android device!
https://www.npmjs.com/package/@gonetone/google-play-api
MIT License
37 stars 8 forks source link

Split APK #7

Closed dudul closed 3 years ago

dudul commented 3 years ago

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?

GoneTone commented 3 years ago

Is there a problem?

dudul commented 3 years ago

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 splitDeliveryDatato get the additional apks links and download them manually.

GoneTone commented 3 years ago

googleplay_asset_pack ?

dudul commented 3 years ago

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)

GoneTone commented 3 years ago

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 3 years ago

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/

GoneTone commented 3 years ago

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.

GoneTone commented 3 years ago

New version released! https://github.com/GoneToneStudio/node-google-play-api/releases/tag/v1.1.0