How to install multiple APKs on Android

A Comprehensive Guide to Manually Installing Split APKs with ADB

Installing split APKs or App Bundles on Android can be intricate and, at times, necessary. This guide offers a detailed, step-by-step approach to manually install these files, aiming to clarify the process and address common issues.

What Are Split APKs?

Traditionally, Android applications are distributed as a single APK file. However, the advent of App Bundles has revolutionized this model. App Bundles break an app into several APK files, each tailored for different device configurations. For instance, devices with smaller screens receive only essential resources, while those with larger screens are provided with additional assets. Although this approach reduces the app’s size, it complicates manual installations, especially when sideloading.

Why Use App Bundles?

The adoption of App Bundles serves purposes beyond simple size reduction. By segmenting apps into multiple APKs, Google may be encouraging users to use the Play Store, given that manually installing these fragmented files can be challenging. Each APK within a bundle is designed to work together, but when installed manually, the Android system may not detect all components, potentially resulting in incomplete installations.

Starting August 2021, new apps must be published using the Android App Bundle on Google Play. Additionally, new apps larger than 200 MB must utilize either Play Feature Delivery or Play Asset Delivery. From June 2023, all new and existing TV apps are also required to be published as App Bundles.

Preparing for Manual Installation

There are various methods for installing multiple APKs. For instance, you can use the ADB command to install multiple APKs simultaneously:

adb install-multiple /path/to/your/APKs

This guide, however, focuses on a programmatic approach similar to what SAI (Split APK Installer) utilizes. You can also create your own installer for managing multiple APKs if necessary.

To manually install split APKs, ensure that all required APK files are transferred to your device. Although you can place them in any directory, this guide assumes they are located in the Download folder. Follow these steps to set up the installation:

  1. Start ADB and Open a Shell: Connect your Android device to your computer and initiate an ADB shell session.
    adb shell
  2. Navigate to the File Directory: Change the directory to where the APK files are stored.
    cd /sdcard/Download # or the appropriate folder on your device
  3. List the APK Files: Display all APK files and their sizes, which is essential for the installation.
    ls -l

Performing the Installation

The installation process involves several steps. These instructions apply to Android versions before Nougat. For newer versions, adjust the syntax as necessary.

  1. Create an Installation Session: Begin by creating a new session with the total size of all APK files.

    pm install-create -S TOTAL_SIZE_OF_ALL_APKS

    You will receive a session ID for use in the subsequent steps.

  2. Stage the APK Files: Each APK must be staged individually. Start with the base APK, but the order can vary. Provide the APK size, session ID, index, and path.

    pm install-write -S APK_SIZE SESSION_ID INDEX PATH

    Repeat this command for each APK file to be installed.

  3. Commit the Installation: Finalize the installation by committing the session.

    pm install-commit SESSION_ID

Example Installation

Consider an app named com.disney.disneyplus with multiple APK files: a base APK, several language-specific APKs, and a high-resolution screen module. The files might be listed as follows:

-rw-rw-rw-@ 1 ChauyanWang  staff        58 Aug 15 23:00 APKM_installer.url
drwxr-xr-x@ 5 ChauyanWang  staff       160 Aug 18 18:18 META-INF
-rw-rw-r--@ 1 ChauyanWang  staff  23346094 Aug 15 22:59 base.apk
-rw-rw-r--@ 1 ChauyanWang  staff    255277 Aug 15 21:08 icon.png
-rw-rw-rw-@ 1 ChauyanWang  staff      1023 Aug 15 23:00 info.json
-rw-rw-r--@ 1 ChauyanWang  staff    254361 Aug 15 22:59 split_config.ar.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 22:59 split_config.de.apk
-rw-rw-r--@ 1 ChauyanWang  staff    876953 Aug 15 22:59 split_config.en.apk
-rw-rw-r--@ 1 ChauyanWang  staff    405913 Aug 15 23:00 split_config.es.apk
-rw-rw-r--@ 1 ChauyanWang  staff    250265 Aug 15 23:00 split_config.et.apk
-rw-rw-r--@ 1 ChauyanWang  staff    254361 Aug 15 22:59 split_config.fi.apk
-rw-rw-r--@ 1 ChauyanWang  staff    336281 Aug 15 23:00 split_config.fr.apk
-rw-rw-r--@ 1 ChauyanWang  staff    258457 Aug 15 22:59 split_config.hi.apk
-rw-rw-r--@ 1 ChauyanWang  staff    254361 Aug 15 23:00 split_config.hu.apk
-rw-rw-r--@ 1 ChauyanWang  staff    250265 Aug 15 22:59 split_config.in.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 23:00 split_config.it.apk
-rw-rw-r--@ 1 ChauyanWang  staff    188825 Aug 15 22:59 split_config.ja.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 22:59 split_config.ko.apk
-rw-rw-r--@ 1 ChauyanWang  staff    250265 Aug 15 23:00 split_config.ms.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 22:59 split_config.nl.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 22:59 split_config.pl.apk
-rw-rw-r--@ 1 ChauyanWang  staff    340377 Aug 15 23:00 split_config.pt.apk
-rw-rw-r--@ 1 ChauyanWang  staff    188825 Aug 15 23:00 split_config.ru.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 23:00 split_config.sv.apk
-rw-rw-r--@ 1 ChauyanWang  staff    258457 Aug 15 22:59 split_config.th.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 23:00 split_config.tr.apk
-rw-rw-r--@ 1 ChauyanWang  staff    254361 Aug 15 22:59 split_config.uk.apk
-rw-rw-r--@ 1 ChauyanWang  staff    250265 Aug 15 22:59 split_config.vi.apk
-rw-rw-r--@ 1 ChauyanWang  staff    860656 Aug 15 22:59 split_config.xhdpi.apk
-rw-rw-r--@ 1 ChauyanWang  staff    549273 Aug 15 23:00 split_config.zh.apk

To install this app, select the base APK, a language module, and a resolution module. Calculate the total size (25,083,703 bytes) and start a new installation session:

pm install-create -S 25083703

After obtaining the installation session ID (assuming it’s 1234), stage each APK file:

pm install-write -S 23346094 1234 0 base.apk
pm install-write -S 876953 1234 1 split_config.en.apk
pm install-write -S 860656 1234 2 split_config.xhdpi.apk

Finalize the installation by committing the session:

pm install-commit 1234

Final Thoughts

Manually installing split APK files demands careful attention but offers a practical solution when traditional methods are unavailable. By following this guide, you can effectively manage App Bundles and ensure successful installation on your Android device. This approach provides enhanced control over the installation process, particularly for fragmented application files.

How to install multiple APKs on Android

A Comprehensive Guide to Manually Installing Split APKs with ADB

Installing split APKs or App Bundles on Android can be intricate and, at times, necessary. This guide offers a detailed, step-by-step approach to manually install these files, aiming to clarify the process and address common issues.

What Are Split APKs?

Traditionally, Android applications are distributed as a single APK file. However, the advent of App Bundles has revolutionized this model. App Bundles break an app into several APK files, each tailored for different device configurations. For instance, devices with smaller screens receive only essential resources, while those with larger screens are provided with additional assets. Although this approach reduces the app’s size, it complicates manual installations, especially when sideloading.

Why Use App Bundles?

The adoption of App Bundles serves purposes beyond simple size reduction. By segmenting apps into multiple APKs, Google may be encouraging users to use the Play Store, given that manually installing these fragmented files can be challenging. Each APK within a bundle is designed to work together, but when installed manually, the Android system may not detect all components, potentially resulting in incomplete installations.

Starting August 2021, new apps must be published using the Android App Bundle on Google Play. Additionally, new apps larger than 200 MB must utilize either Play Feature Delivery or Play Asset Delivery. From June 2023, all new and existing TV apps are also required to be published as App Bundles.

Preparing for Manual Installation

There are various methods for installing multiple APKs. For instance, you can use the ADB command to install multiple APKs simultaneously:

adb install-multiple /path/to/your/APKs

This guide, however, focuses on a programmatic approach similar to what SAI (Split APK Installer) utilizes. You can also create your own installer for managing multiple APKs if necessary.

To manually install split APKs, ensure that all required APK files are transferred to your device. Although you can place them in any directory, this guide assumes they are located in the Download folder. Follow these steps to set up the installation:

  1. Start ADB and Open a Shell: Connect your Android device to your computer and initiate an ADB shell session.
    adb shell
  2. Navigate to the File Directory: Change the directory to where the APK files are stored.
    cd /sdcard/Download # or the appropriate folder on your device
  3. List the APK Files: Display all APK files and their sizes, which is essential for the installation.
    ls -l

Performing the Installation

The installation process involves several steps. These instructions apply to Android versions before Nougat. For newer versions, adjust the syntax as necessary.

  1. Create an Installation Session: Begin by creating a new session with the total size of all APK files.

    pm install-create -S TOTAL_SIZE_OF_ALL_APKS

    You will receive a session ID for use in the subsequent steps.

  2. Stage the APK Files: Each APK must be staged individually. Start with the base APK, but the order can vary. Provide the APK size, session ID, index, and path.

    pm install-write -S APK_SIZE SESSION_ID INDEX PATH

    Repeat this command for each APK file to be installed.

  3. Commit the Installation: Finalize the installation by committing the session.

    pm install-commit SESSION_ID

Example Installation

Consider an app named com.disney.disneyplus with multiple APK files: a base APK, several language-specific APKs, and a high-resolution screen module. The files might be listed as follows:

-rw-rw-rw-@ 1 ChauyanWang  staff        58 Aug 15 23:00 APKM_installer.url
drwxr-xr-x@ 5 ChauyanWang  staff       160 Aug 18 18:18 META-INF
-rw-rw-r--@ 1 ChauyanWang  staff  23346094 Aug 15 22:59 base.apk
-rw-rw-r--@ 1 ChauyanWang  staff    255277 Aug 15 21:08 icon.png
-rw-rw-rw-@ 1 ChauyanWang  staff      1023 Aug 15 23:00 info.json
-rw-rw-r--@ 1 ChauyanWang  staff    254361 Aug 15 22:59 split_config.ar.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 22:59 split_config.de.apk
-rw-rw-r--@ 1 ChauyanWang  staff    876953 Aug 15 22:59 split_config.en.apk
-rw-rw-r--@ 1 ChauyanWang  staff    405913 Aug 15 23:00 split_config.es.apk
-rw-rw-r--@ 1 ChauyanWang  staff    250265 Aug 15 23:00 split_config.et.apk
-rw-rw-r--@ 1 ChauyanWang  staff    254361 Aug 15 22:59 split_config.fi.apk
-rw-rw-r--@ 1 ChauyanWang  staff    336281 Aug 15 23:00 split_config.fr.apk
-rw-rw-r--@ 1 ChauyanWang  staff    258457 Aug 15 22:59 split_config.hi.apk
-rw-rw-r--@ 1 ChauyanWang  staff    254361 Aug 15 23:00 split_config.hu.apk
-rw-rw-r--@ 1 ChauyanWang  staff    250265 Aug 15 22:59 split_config.in.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 23:00 split_config.it.apk
-rw-rw-r--@ 1 ChauyanWang  staff    188825 Aug 15 22:59 split_config.ja.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 22:59 split_config.ko.apk
-rw-rw-r--@ 1 ChauyanWang  staff    250265 Aug 15 23:00 split_config.ms.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 22:59 split_config.nl.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 22:59 split_config.pl.apk
-rw-rw-r--@ 1 ChauyanWang  staff    340377 Aug 15 23:00 split_config.pt.apk
-rw-rw-r--@ 1 ChauyanWang  staff    188825 Aug 15 23:00 split_config.ru.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 23:00 split_config.sv.apk
-rw-rw-r--@ 1 ChauyanWang  staff    258457 Aug 15 22:59 split_config.th.apk
-rw-rw-r--@ 1 ChauyanWang  staff    184729 Aug 15 23:00 split_config.tr.apk
-rw-rw-r--@ 1 ChauyanWang  staff    254361 Aug 15 22:59 split_config.uk.apk
-rw-rw-r--@ 1 ChauyanWang  staff    250265 Aug 15 22:59 split_config.vi.apk
-rw-rw-r--@ 1 ChauyanWang  staff    860656 Aug 15 22:59 split_config.xhdpi.apk
-rw-rw-r--@ 1 ChauyanWang  staff    549273 Aug 15 23:00 split_config.zh.apk

To install this app, select the base APK, a language module, and a resolution module. Calculate the total size (25,083,703 bytes) and start a new installation session:

pm install-create -S 25083703

After obtaining the installation session ID (assuming it’s 1234), stage each APK file:

pm install-write -S 23346094 1234 0 base.apk
pm install-write -S 876953 1234 1 split_config.en.apk
pm install-write -S 860656 1234 2 split_config.xhdpi.apk

Finalize the installation by committing the session:

pm install-commit 1234

Final Thoughts

Manually installing split APK files demands careful attention but offers a practical solution when traditional methods are unavailable. By following this guide, you can effectively manage App Bundles and ensure successful installation on your Android device. This approach provides enhanced control over the installation process, particularly for fragmented application files.