10

xapk, apks, or multiple-apks is the new standard for apps that is basically one folder and multiple apks in it.

I know there are apps like apkpure or SAI that can do it, but I want to know how to it manually.

I know we can use adb install-multiple to install signed apks but if they are unsigned how can I do it if I have the root?

I used to be able to copy and paste single apk to /system/priv-app/${folder} to bypass the signature check but simply copying and pasting multiple apks under the same folder doesn't seem to work in this case.

3
  • AFAIK XAPK is no official format by Google, it is more a community driven package format. The official format is "Android App Bundle" (aab) which is installed using the tool bundletool (by Google).
    – Robert
    Feb 13 '20 at 8:29
  • @Robert ok, so if i have multiple apks, is it possible to put them in /system/priv-app/${folder} and get it to work, if not, how can I make an aab a system app? Feb 13 '20 at 9:59
  • What do you mean by but if they are unsigned how can I do it if I have the root? APK files always have to be signed if you want to install them.
    – Robert
    Jul 27 '20 at 13:22
9

For those who are trying to install XAPK files through adb because their XAPK Installer does not work on their Android phone, I've got you covered.

You must have Android Debug Bridge (ADB) set up and working.

XAPK files are basically ZIP Archive files (described by their PK header at the beginning of the file)
This means we are able to open/extract those files using any ZIP tool that we have (I prefer 7-Zip)

Once we have extracted the files from the archive, we are only interested in .APK files.
Open the Command Prompt/Terminal in the folder where you've extracted the archive,
and type the following command: adb install-multiple "AppName.apk" "ConfigA.apk" "ConfigB.apk"

Notes

  • The order of files in the command does not matter.
  • AppName, ConfigA and ConfigB are examples, they will differ depending on the package.
  • There might be more APK files, make sure to include them all.
  • If there are several APK files with different architectures, make sure to check your phones CPU architecture before proceeding with installing the APK.
3

Here is a guide on how to install an XAPK file to your Android device via adb on a Windows machine:

  1. Rename your .xapk file to .zip.
  2. Unzip the file to a new folder.
  3. In the new folder, you will see a few .apk files, and sometimes also a folder Android which includes a .obb file (you can ignore the following files: icon.png and manifast.json).
  4. Open a Command Prompt from within the new folder and run adb install-multiple "com.application.name.apk" "config.one.apk" "config.xxhdpi.apk" (these apk names are just an example; replace them with the apk names you see in your folder).
  5. if your XAPK file contains a .obb file (you should see a folder named Android), then run also the following: adb push Android\obb\com.application.name /storage/emulated/0/Android/obb/ (replace com.application.name with the name of the apk you are installing).
  6. Done!

I also include a few notes from @user337422's excellent answer:

  • There might be more APK files, make sure to include them all.
  • If there are several APK files with different architectures (example: config.arm64_v8a.apk), make sure to check your phone's CPU architecture before proceeding with installing the APK.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.