8

There is a well-known question on how to get APKs from an Android device with adb.

However, this fails for split APKs, because there, adb shell pm path com.example.someapp does list you not only one path, but many as shown in this example:

adb shell pm path com.example.someapp
package:/data/app/com.example.someapp-5Vnt5z8Kiyfka4DG7cFr3Q==/base.apk
package:/data/app/com.example.someapp-5Vnt5z8Kiyfka4DG7cFr3Q==/split_config.en.apk
package:/data/app/com.example.someapp-5Vnt5z8Kiyfka4DG7cFr3Q==/split_config.x86.apk
package:/data/app/com.example.someapp-5Vnt5z8Kiyfka4DG7cFr3Q==/split_config.xxhdpi.apk

So how to do that? Do you need to pull all? Or is base.apk (the filename you always get for non-split-apks) e.g. enough? And how to reinstall them then later?

1 Answer 1

5

For a split APK you need all APK files present on your device if you are lucky. If the device you want to install the app on is too different it may happen that the APK files on your device do not match and you are missing a required APK file, e.g. if the source and the target device have a different CPU architecture.

Usually a split APK consists of (can be more):

  • a base APK
  • one APK containing the native libraries for the current platform (if the app uses native libraries)
  • one APK for the preferences / config UI
  • one APK for the translation / localization texts, images,...

If you want to get the APK files without using adb there are apps available that are capable to export all split APK files that belong to an app to a folder on the shared storage of your Android device. One such app is the Open Source File manager Amaze that is available in Google Play Store or FDroid. In Amaze use the "App Manager" to export all split APK files to the app_backup folder in shared storage.

For installing a such a bunch of APK files as one app see this question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .