Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for bundled apks #108

Merged
merged 1 commit into from
Jan 20, 2020
Merged

Add support for bundled apks #108

merged 1 commit into from
Jan 20, 2020

Conversation

kar
Copy link
Contributor

@kar kar commented Jan 14, 2020

They will be available under 'splits' key in result.

They will be available under 'splits' key in result.
@kar kar mentioned this pull request Jan 14, 2020
@kar kar requested a review from NoMore201 January 15, 2020 10:34
@K900
Copy link

K900 commented Jan 16, 2020

Can confirm this works perfectly for downloading split APKs.

Copy link
Owner

@NoMore201 NoMore201 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok to me

@NoMore201 NoMore201 merged commit 1848a61 into NoMore201:master Jan 20, 2020
@jr3074
Copy link

jr3074 commented Feb 2, 2020

waiting for the release

@jr3074
Copy link

jr3074 commented Feb 2, 2020

Btw, can you share how to get splited apk and how to install it to our devices?
@kar

@rscmendes
Copy link

Btw, can you share how to get splited apk and how to install it to our devices?
@kar

This is what worked for me:

To get the splits you can do something like:

app_data = gplay_server.download(app_id)
with open(app_path, 'wb') as f:
    for chunk in app_data.get('file').get('data'):
        f.write(chunk)
splits = app_data.get('splits')
if splits:
    for split in splits:
        split_path = Path(app_path.parent).joinpath(app_path.stem + '.' + split.get('name') + '.split' + app_path.suffix)
        with open(split_path, 'wb') as f:
            for chunk in split.get('file').get('data'):
            f.write(chunk)

To install an app with splits you would do something like:
adb install-multiple app.apk app.split1name.split.apk app.split2name.apk ...
Make sure you install all splits along with the main app or you will get an error.

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

Successfully merging this pull request may close these issues.

5 participants