Android App Bundles: Getting Started | raywenderlich.com

See how to use App Bundles to reduce the size of the app your user downloads to their device, saving them precious data and storage!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/9043-android-app-bundles-getting-started

Is there a way to share/send an app once it was installed using the app-bundle functionality ?
When publishing an APK alone (no app bundle), it was possible (without root) to just share the APK, which was in “/data/app/…”.
But now when looking at such folders of app-bundle apps, there are multiple, split APK files.
I’ve noticed this behavior of not being able to share the apps way before app-bundles were introduced, when instant-run was added. I saw there are multiple APK files, and that when I share it with a different device, it had serious issues.

This helps as both a power user and developer. As power user, I can backup the APK files so that I could later install them without even Internet connection (useful in case of large app or when needing to backup a lot of apps), and as developer it is useful if I want to send someone an app I’ve made, easily and on-the-go (meaning when I’m not near a PC).

Is there also a way to tell the Play Store to avoid downloading apps this way, and use a normal APK instead?

@amejia481 Can you please help with this when you get a chance? Thank you - much appreciated! :]

Thanks for the help @ shogunkaramazov

Hi @ad_lb!
Hope you’re doing pretty well.

Is there a way to share/send an app once it was installed using the app-bundle functionality?

The Play Store has a share option, you would share the link, with your friends and they can download a lightweight version of your app.

If you just want to test your app with small amount of users you can try to set up an open, closed, or internal test on the Play Store.

Sharing this apk file with other devices if not a good idea. Because It’s very likely that this apk will not work properly or entirely on other phones.

When the Play Store downloads an app using App bundle, it only downloads a custom
version of the apk file that just includes device configuration specific, that necessarily match the other devices. That’s where storage gain came from. Between devices, many configurations can defer letting the app too many issues.

An example could be that the langue that the user had in its phone was French, for this reason, the Play Store only downloaded an apk with just with the French language when you share this apk with other user everything will be in French.

A worst case could be that the devices have different CPUs and instruction sets the apk will not work at all in the other devices.

Is there also a way to tell the Play Store to avoid downloading apps this way, and use a normal APK instead?

I’m not sure if there’s one, but I don’t think that a user can have so much control. I think It’s more like an internal detail of the Play Store.

If you have any questions just let me know!

I asked about sharing an app. Not a link.
Sharing a link means you have to reach the Play Store while having an Internet connection. It also loses possible backup functionality (check backup apps such as Titanium backup).
Test on the Play Store is also irrelevant . It requires an Internet connection. Plus I have to manage it on this website you wrote, even though the app is already available on my device.
It also means I have to publish the app. What if I haven’t, or if the app isn’t of me? What if I want to share it to colleagues? Or if I went home and I want to try my app that I’ve launched at the office - on other devices at home?

So, again:
Is there a way to share/send/backup an app once it was installed using the app-bundle functionality ? I’m not talking about links. I’m talking about real installation files.
I want to be able to backup apps, and also send them to other devices, just like we always could.

1 Like

Hi @ad_lb,
I as far as I know it know. Taking an APK file from one device to another It is not going to work properly work, as I mentioned before. When using App Bundles the play store serves a specific APK file per device configuration making it in some cases incompatible with other devices.

Sharing this apk file with other devices if not a good idea. Because It’s very likely that this apk will not work properly or entirely on other phones.

When the Play Store downloads an app using App bundle, it only downloads a custom
version of the apk file that just includes device configuration specific, that necessarily match the other devices. That’s where storage gain came from. Between devices, many configurations can defer letting the app too many issues.

An example could be that the langue that the user had in its phone was French, for this reason, the Play Store only downloaded an apk with just with the French language when you share this apk with other user everything will be in French.

A worst case could be that the devices have different CPUs and instruction sets the apk will not work at all in the other devices.

If the app is yours you can always generate an universal APK, and distribute it as you like best.

Why shouldn’t it work well, if a device is identical ?
Why shouldn’t I back up my own apps, if they are installed already? It already has all that it needs.
The only question is just how to backup it all, and then restore it all, just like what the IDE and the Play Store do.
The universal APK is not an app-bundle. It’s the one I’ve originally wrote about, that allows to actually share the app as files. This is not a solution. Not even as a developer, because developers use instant-run, which isn’t a universal APK. It works like app-bundle, having split APK files instead.

For identical devices you’re not going to have problems, the problem is when you have devices with different configurations of yours. App Bundle is not a distribution format is only a publishing format, you always end up with an APK file in your device. The difference is that an APK file that came out from the Play Store using App Bundle is only going to have the resources that your specific device needs, taking this APK to the other device is not 100 % secure that is going to work, because of devices configuration differences.

Sharing this apk file with other devices if not a good idea. Because It’s very likely that this apk will not work properly or entirely on other phones.

So, back to the question:
How can I send/share/backup my installed apps into an easy way to install them later? Is there an API for this? Using ADB ? Is there a root option?
BTW, it’s wrong that you have a single APK file when installing an app using app-bundle. That’s part of the problem I wrote. Instead, you get multiple APK files , and you can see it yourself. Install “AirBnb”, and look at the path of “/data/app/com.airbnb.android…” . Even when you install it, you will notice that the Play Store keeps showing&hiding multiple notifications till all are installed.
Attached here what you can see.

device-2019-01-22-224051

So supposed I have all of these APK files. How can I later install them all on current device or on an identical one that has same configurations ?

How can I send/share/backup my installed apps into an easy way to install them later? Is there an API for this? Using ADB ? Is there a root option?

As far as I know, if you copy all the apk files to a new device you’re going to be Ok.
The base.apk has the main functionality and the splits add a particular additional configuration.

I’m not quite familiar with app backup tools, not sure if there is ADB command that can help you with that. An alternative could be contacting the engineer that worked on the App Bundle project Pierre Lecesne

,Anthony Morris and Ibrahim Karahan, maybe they can shed some lights on the topic.

it’s wrong that you have a single APK file when installing an app using app-bundle.

I completely understand you, to improve the storage consumption they made it harder to share apk files across other devices and delegated the process of managing apk file to the to the Play Store. Having only one apk file contradicts the initial idea of App Bundle, that is to save storage for things that you’re not going to need in your device.

@ad_lb additionally you could create an issue on the Bundle Tools Github project asking about the topic, hope it helps!

It doesn’t let me contact him. I created now a new account there and it doesn’t let me

OK I asked about it here:

1 Like

@ad_lb Do you still have issues with this?

It’s not an issue.
It’s a question of how to do it, because nowadays it’s much more complicated.
Given the split APKs, is there an Intent to install them all as an app, just like a normal APK ?

1 Like

This is incorrect. If you have all of the split APK files, and you try (on the device alone, without adb) to install them one by one, only the “base.apk” file will be installed. The rest won’t.
Also, if you start the app, it will most likely crash as it needs the resources.

Is there an Intent to install all of the split APK files of an app?

@amejia481 Do you have any feedback about this? Thank you - much appreciated! :]

I don’t think so, but I may be incorrect. You may try to post it on http://stackoverflow.com/ and to ping someone from the Play Store team [1] or [2].