Skip to content

This Python3 tool automates the process required to convert a split APK into a single APK.

License

Notifications You must be signed in to change notification settings

cobbertine/APKMerger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

About

This Python3 tool automates the process required to convert a split APK into a single APK.

Pre-requisites

It is expected that the user is familiar with ADB and decompiling APKs.

Instructions

NOTE: Most of these instructions detail how to pull a split APK off an Android device. If this is already known, skip to step 4 for information about folder naming conventions so the tool works properly.

  1. You must first determine the package name of the APK you wish to pull, running the command "adb shell pm list packages" is one method.
  2. With the package name known, you must get the filepath of the Base APK and its components. For example:
> adb shell pm path com.example.someapp

package:/data/app/com.company.app-rDbi7upLpZlKZLaJkge0jw==/base.apk
package:/data/app/com.company.app-rDbi7upLpZlKZLaJkge0jw==/split_config.arm64_v8a.apk
package:/data/app/com.company.app-rDbi7upLpZlKZLaJkge0jw==/split_config.en.apk
package:/data/app/com.company.app-rDbi7upLpZlKZLaJkge0jw==/split_config.xxhdpi.apk
  1. Create a new folder to hold these APKs and then pull each one into it:
adb pull /data/app/com.company.app-rDbi7upLpZlKZLaJkge0jw==/base.apk
adb pull /data/app/com.company.app-rDbi7upLpZlKZLaJkge0jw==/split_config.arm64_v8a.apk
adb pull /data/app/com.company.app-rDbi7upLpZlKZLaJkge0jw==/split_config.en.apk
adb pull /data/app/com.company.app-rDbi7upLpZlKZLaJkge0jw==/split_config.xxhdpi.apk
  1. Decompile each APK. The folders should look similar to below: (If you use APK Studio, the folders will be named as below automatically)
base.apk-decompiled
split_config.arm64_v8a.apk-decompiled
split_config.en.apk-decompiled
split_config.xxhdpi.apk-decompiled

NOTE: The tool looks for one folder with the substring "base.apk" and any folders with the substring "split_config".

  1. Copy this script into the same directory where the folders above are listed, such that running an "ls" command would look like:
APKMerger.py
base.apk-decompiled
split_config.arm64_v8a.apk-decompiled
split_config.en.apk-decompiled
split_config.xxhdpi.apk-decompiled
  1. Run this tool. python3 APKMerger.py.

  2. Finally, you can now safely delete all of the "split_config" folders and build the "base.apk-decompiled" folder.

About

This Python3 tool automates the process required to convert a split APK into a single APK.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages