Tutorial How to turn a split APK into a normal non-split APK

G-Bo ッ

Administrator
Staff member
Administrator
Hey guys,

recently many modders contacting me about how to mod a split APK. We have already many tutorials about how to download or extract the split APKs, mod a split APK as it is and how to use a split APK installer to make the mod apply to the device.

Here some examples of the mentioned tutorials:
- How to mod split APKs (App bundles) - platinmods.com - Android MODs | iOS MODs | Tutorials & More!
- How to backup/export split APK (App bundles) (NO root & root) - platinmods.com - Android MODs | iOS MODs | Tutorials & More!
- How to install/sideload split APKs/zipped .APKS file (NO root) - platinmods.com - Android MODs | iOS MODs | Tutorials & More!


But there is another way to return the split APK into a normal APK again.


Basically, there are 2 types of split APKs.
One type does have 2 split APKs (base APK + config.architecture APK), the other type does have 4 split APKs in total.


Let's start first with the easy one, the 2 split APK:

1. Take the base APK and decompile it.
2. Take the lib folder of the config.arch APK and add it to the decompiled base APK.
3. Now open the AndroidManifest.xml in the decompiled base APK and remove this setup: android:isSplitRequired="true".
4. Compile the base APK, sign it or make it unsigned with the META-INF of the base APK.
5. Done =)



Now to the 4 or more split APK:
This is a bit more complicated.


The 4 split APKs are basically: base APK + config.arch APK + config.mdpi APK + config.random APK

1. Take the base APK and decompile it
2. Take all other split APKs and decompile them
3. Now put all files of the split APKs to the base APK but do not override files (there will be files already existing in the base APK, do not overwrite them!)
4. Open the AndroidManifest.xml in the decompiled base APK and remove this setup: android:isSplitRequired="true"
5. Open the apktool.yml and add in the doNotCompress tag of the base.apk everything you have in the other split APKs
6. Now you have to do the annoying job to check the .xml files in the APK/res/value folder in all the split APKs and add whats missing inside that files from the other split APKs to the base APK .xml files.
-> NOTE: This step is time consuming but it can be skipped on some games. Try first if the game works without this step to save time. If it works, skip it.
7. Compile the base APK, sign it or make it unsigned with the META-INF of the base APK.
8. Done =)


We spent much time in discovering new knowledge. If you share this tutorial to others please do not forget to credit platinmods.com.
 
hello @G-Bo ッ i manage to download it using SAI but i cant open the app any solutions?
 

Attachments

  • WhatsApp Image 2020-04-19 at 3.50.53 PM.jpeg
    WhatsApp Image 2020-04-19 at 3.50.53 PM.jpeg
    21.4 KB · Views: 846
what all things and in what format do i put under the do not compress tag
IMG-20200419-WA0005.jpg
 

Attachments

  • IMG-20200419-WA0005.jpg
    IMG-20200419-WA0005.jpg
    199.4 KB · Views: 581
  • IMG_20200419_205210.jpg
    IMG_20200419_205210.jpg
    238.7 KB · Views: 587
This is awesome ..Many thanks

But When I try to build apktool is throwing this exception .Any help is appreciated .On this for days ...

apktool b com.test

I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: invalid resource directory name: C:\Users\Desktop\android\splitapks-tocombile\com.test\res navigation
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\xx\AppData\Local\Temp\brut_util_Jar_15641814296453761.tmp



Apktool github suugested to use --use-aapt2 .Tried that also .Now getting this exception

W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:14: error: invalid value for type 'style'. Expected a reference.
W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:15: error: invalid value for type 'style'. Expected a reference.
W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:16: error: invalid value for type 'style'. Expected a reference.
W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:17: error: invalid value for type 'style'. Expected a reference.
W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:18: error: invalid value for type 'style'. Expected a reference.
W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:19: error: invalid value for type 'style'. Expected a reference.
W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:20: error: invalid value for type 'style'. Expected a reference.
W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:21: error: invalid value for type 'style'. Expected a reference.
W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:22: error: invalid value for type 'style'. Expected a reference.
W: C:\Users\xx\Desktop\android\xx\splitapks-tocombile\com.xx\res\values-hdpi\styles.xml:23: error: invalid value for type 'style'. Expected a reference.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1):


I noticed that styles.xml values are dummy values .Not sure why ..This is styles.xml


<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Base.Widget.AppCompat.DrawerArrowToggle" parent="" />
<item type="style" name="APKTOOL_DUMMY_0">false</item>
<item type="style" name="APKTOOL_DUMMY_1">false</item>
<item type="style" name="APKTOOL_DUMMY_2">false</item>
<item type="style" name="APKTOOL_DUMMY_3">false</item>
<item type="style" name="APKTOOL_DUMMY_4">false</item>
<item type="style" name="APKTOOL_DUMMY_5">false</item>
<item type="style" name="APKTOOL_DUMMY_6">false</item>
<item type="style" name="APKTOOL_DUMMY_7">false</item>
<item type="style" name="APKTOOL_DUMMY_8">false</item>
<item type="style" name="APKTOOL_DUMMY_9">false</item>
<item type="style" name="APKTOOL_DUMMY_a">false</item>
<item type="style" name="APKTOOL_DUMMY_b">false</item>
<item type="style" name="APKTOOL_DUMMY_c">false</item>
<item type="style" name="APKTOOL_DUMMY_d">false</item>
<item type="style" name="APKTOOL_DUMMY_e">false</item>
<item type="style" name="APKTOOL_DUMMY_f">false</item>
<item type="style" name="APKTOOL_DUMMY_10">false</item>
<item type="style" name="APKTOOL_DUMMY_11">false</item>
<item type="style" name="APKTOOL_DUMMY_12">false</item>
<item type="style" name="APKTOOL_DUMMY_13">false</item>
<item type="style" name="APKTOOL_DUMMY_14">false</item>
<item type="style" name="APKTOOL_DUMMY_15">false</item>
<item type="style" name="APKTOOL_DUMMY_16">false</item>
<item type="style" name="APKTOOL_DUMMY_17">false</item>
<item type="style" name="APKTOOL_DUMMY_18">false</item>
<item type="style" name="APKTOOL_DUMMY_19">false</item>
<item type="style" name="APKTOOL_DUMMY_1a">false</item>
<item type="style" name="APKTOOL_DUMMY_1b">false</item>
<item type="style" name="APKTOOL_DUMMY_1c">false</item>
<item type="style" name="APKTOOL_DUMMY_1d">false</item>
<item type="style" name="APKTOOL_DUMMY_1e">false</item>
<item type="style" name="APKTOOL_DUMMY_1f">false</item>
<item type="style" name="APKTOOL_DUMMY_20">false</item>
<item type="style" name="APKTOOL_DUMMY_21">false</item>
<item type="style" name="APKTOOL_DUMMY_22">false</item>
<item type="style" name="APKTOOL_DUMMY_23">false</item>
<item type="style" name="APKTOOL_DUMMY_24">false</item>
<item type="style" name="APKTOOL_DUMMY_25">false</item>
<item type="style" name="APKTOOL_DUMMY_26">false</item>
<item type="style" name="APKTOOL_DUMMY_27">false</item>
<item type="style" name="APKTOOL_DUMMY_28">false</item>
<item type="style" name="APKTOOL_DUMMY_29">false</item>
<item type="style" name="APKTOOL_DUMMY_2a">false</item>
<item type="style" name="APKTOOL_DUMMY_2b">false</item>
<item type="style" name="APKTOOL_DUMMY_2c">false</item>
<item type="style" name="APKTOOL_DUMMY_2d">false</item>
<item type="style" name="APKTOOL_DUMMY_2e">false</item>
<item type="style" name="APKTOOL_DUMMY_2f">false</item>
<item type="style" name="APKTOOL_DUMMY_30">false</item>
<item type="style" name="APKTOOL_DUMMY_31">false</item>
<item type="style" name="APKTOOL_DUMMY_32">false</item>
<item type="style" name="APKTOOL_DUMMY_33">false</item>
<item type="style" name="APKTOOL_DUMMY_34">false</item>
<item type="style" name="APKTOOL_DUMMY_35">false</item>
<item type="style" name="APKTOOL_DUMMY_36">false</item>
<item type="style" name="APKTOOL_DUMMY_37">false</item>
<item type="style" name="APKTOOL_DUMMY_38">false</item>
<item type="style" name="APKTOOL_DUMMY_39">false</item>
<item type="style" name="APKTOOL_DUMMY_3a">false</item>
<item type="style" name="APKTOOL_DUMMY_3b">false</item>
<item type="style" name="APKTOOL_DUMMY_3c">false</item>
<item type="style" name="APKTOOL_DUMMY_3d">false</item>
<item type="style" name="APKTOOL_DUMMY_3e">false</item>
<item type="style" name="APKTOOL_DUMMY_3f">false</item>
<item type="style" name="APKTOOL_DUMMY_40">false</item>
<item type="style" name="APKTOOL_DUMMY_41">false</item>
<item type="style" name="APKTOOL_DUMMY_42">false</item>
<item type="style" name="APKTOOL_DUMMY_43">false</item>
<item type="style" name="APKTOOL_DUMMY_44">false</item>
<item type="style" name="APKTOOL_DUMMY_45">false</item>
<item type="style" name="APKTOOL_DUMMY_46">false</item>
<item type="style" name="APKTOOL_DUMMY_47">false</item>
<item type="style" name="APKTOOL_DUMMY_48">false</item>
<item type="style" name="APKTOOL_DUMMY_49">false</item>
<item type="style" name="APKTOOL_DUMMY_4a">false</item>
<item type="style" name="APKTOOL_DUMMY_4b">false</item>
<item type="style" name="APKTOOL_DUMMY_4c">false</item>
<item type="style" name="APKTOOL_DUMMY_4d">false</item>
<item type="style" name="APKTOOL_DUMMY_4e">false</item>
<item type="style" name="APKTOOL_DUMMY_4f">false</item>
<item type="style" name="APKTOOL_DUMMY_50">false</item>
<item type="style" name="APKTOOL_DUMMY_51">false</item>
<item type="style" name="APKTOOL_DUMMY_52">false</item>
<item type="style" name="APKTOOL_DUMMY_53">false</item>
<item type="style" name="APKTOOL_DUMMY_54">false</item>
<item type="style" name="APKTOOL_DUMMY_55">false</item>
<item type="style" name="APKTOOL_DUMMY_56">false</item>
<item type="style" name="APKTOOL_DUMMY_57">false</item>
<item type="style" name="APKTOOL_DUMMY_58">false</item>
<item type="style" name="APKTOOL_DUMMY_59">false</item>
<item type="style" name="APKTOOL_DUMMY_5a">false</item>
<item type="style" name="APKTOOL_DUMMY_5b">false</item>
<item type="style" name="APKTOOL_DUMMY_5c">false</item>
<item type="style" name="APKTOOL_DUMMY_5d">false</item>
<item type="style" name="APKTOOL_DUMMY_5e">false</item>
<item type="style" name="APKTOOL_DUMMY_5f">false</item>
<item type="style" name="APKTOOL_DUMMY_60">false</item>
<item type="style" name="APKTOOL_DUMMY_61">false</item>
<item type="style" name="APKTOOL_DUMMY_62">false</item>
<item type="style" name="APKTOOL_DUMMY_63">false</item>
<item type="style" name="APKTOOL_DUMMY_64">false</item>
<item type="style" name="APKTOOL_DUMMY_65">false</item>
<item type="style" name="APKTOOL_DUMMY_66">false</item>
<item type="style" name="APKTOOL_DUMMY_67">false</item>
<item type="style" name="APKTOOL_DUMMY_68">false</item>
<item type="style" name="APKTOOL_DUMMY_69">false</item>
<item type="style" name="APKTOOL_DUMMY_6a">false</item>
<item type="style" name="APKTOOL_DUMMY_6b">false</item>
<item type="style" name="APKTOOL_DUMMY_6c">false</item>
<item type="style" name="APKTOOL_DUMMY_6d">false</item>
<item type="style" name="APKTOOL_DUMMY_6e">false</item>
<item type="style" name="APKTOOL_DUMMY_6f">false</item>
<item type="style" name="APKTOOL_DUMMY_70">false</item>
<item type="style" name="APKTOOL_DUMMY_71">false</item>
<item type="style" name="APKTOOL_DUMMY_72">false</item>
<item type="style" name="APKTOOL_DUMMY_73">false</item>
<item type="style" name="APKTOOL_DUMMY_74">false</item>
<item type="style" name="APKTOOL_DUMMY_75">false</item>
<item type="style" name="APKTOOL_DUMMY_76">false</item>
<item type="style" name="APKTOOL_DUMMY_77">false</item>
<item type="style" name="APKTOOL_DUMMY_78">false</item>
<item type="style" name="APKTOOL_DUMMY_79">false</item>
<item type="style" name="APKTOOL_DUMMY_7a">false</item>
<item type="style" name="APKTOOL_DUMMY_7b">false</item>
<item type="style" name="APKTOOL_DUMMY_7c">false</item>
<item type="style" name="APKTOOL_DUMMY_7d">false</item>
<item type="style" name="APKTOOL_DUMMY_7e">false</item>
<item type="style" name="APKTOOL_DUMMY_7f">false</item>
<item type="style" name="APKTOOL_DUMMY_80">false</item>
<item type="style" name="APKTOOL_DUMMY_81">false</item>
<item type="style" name="APKTOOL_DUMMY_82">false</item>
<item type="style" name="APKTOOL_DUMMY_83">false</item>
<item type="style" name="APKTOOL_DUMMY_84">false</item>
<item type="style" name="APKTOOL_DUMMY_85">false</item>
<item type="style" name="APKTOOL_DUMMY_86">false</item>
<item type="style" name="APKTOOL_DUMMY_87">false</item>
<item type="style" name="APKTOOL_DUMMY_88">false</item>
<item type="style" name="APKTOOL_DUMMY_89">false</item>
<item type="style" name="APKTOOL_DUMMY_8a">false</item>
<item type="style" name="APKTOOL_DUMMY_8b">false</item>
<item type="style" name="APKTOOL_DUMMY_8c">false</item>
<item type="style" name="APKTOOL_DUMMY_8d">false</item>
<item type="style" name="APKTOOL_DUMMY_8e">false</item>
<item type="style" name="APKTOOL_DUMMY_8f">false</item>
<item type="style" name="APKTOOL_DUMMY_90">false</item>
<item type="style" name="APKTOOL_DUMMY_91">false</item>
<item type="style" name="APKTOOL_DUMMY_92">false</item>
<item type="style" name="APKTOOL_DUMMY_93">false</item>
<item type="style" name="APKTOOL_DUMMY_94">false</item>
<item type="style" name="APKTOOL_DUMMY_95">false</item>
<item type="style" name="APKTOOL_DUMMY_96">false</item>
<item type="style" name="APKTOOL_DUMMY_97">false</item>
<item type="style" name="APKTOOL_DUMMY_98">false</item>
<item type="style" name="APKTOOL_DUMMY_99">false</item>
<item type="style" name="APKTOOL_DUMMY_9a">false</item>
<item type="style" name="APKTOOL_DUMMY_9b">false</item>
<item type="style" name="APKTOOL_DUMMY_9c">false</item>
<item type="style" name="APKTOOL_DUMMY_9d">false</item>
<item type="style" name="APKTOOL_DUMMY_9e">false</item>
<item type="style" name="APKTOOL_DUMMY_9f">false</item>
<item type="style" name="APKTOOL_DUMMY_a0">false</item>
<item type="style" name="APKTOOL_DUMMY_a1">false</item>
<item type="style" name="APKTOOL_DUMMY_a2">false</item>
<item type="style" name="APKTOOL_DUMMY_a3">false</item>
<item type="style" name="APKTOOL_DUMMY_a4">false</item>
<item type="style" name="APKTOOL_DUMMY_a5">false</item>
<item type="style" name="APKTOOL_DUMMY_a6">false</item>
<item type="style" name="APKTOOL_DUMMY_a7">false</item>
<item type="style" name="APKTOOL_DUMMY_a8">false</item>
<item type="style" name="APKTOOL_DUMMY_a9">false</item>
<item type="style" name="APKTOOL_DUMMY_aa">false</item>
<item type="style" name="APKTOOL_DUMMY_ab">false</item>
<item type="style" name="APKTOOL_DUMMY_ac">false</item>
<item type="style" name="APKTOOL_DUMMY_ad">false</item>
<item type="style" name="APKTOOL_DUMMY_ae">false</item>
<item type="style" name="APKTOOL_DUMMY_af">false</item>
<item type="style" name="APKTOOL_DUMMY_b0">false</item>
<item type="style" name="APKTOOL_DUMMY_b1">false</item>
<item type="style" name="APKTOOL_DUMMY_b2">false</item>
<item type="style" name="APKTOOL_DUMMY_b3">false</item>
<item type="style" name="APKTOOL_DUMMY_b4">false</item>
<item type="style" name="APKTOOL_DUMMY_b5">false</item>
<item type="style" name="APKTOOL_DUMMY_b6">false</item>
<item type="style" name="APKTOOL_DUMMY_b7">false</item>
<item type="style" name="APKTOOL_DUMMY_b8">false</item>
<item type="style" name="APKTOOL_DUMMY_b9">false</item>
<item type="style" name="APKTOOL_DUMMY_ba">false</item>
</resources>



Any help is appreciated !!
 
thank you so much! im working on a split apk mod and i was looking for a way to merge. i would have hated to have to make people have to download and xapk installer or SAI just to play my mod. this saved me so much trouble.
 
Is it necessary to work with apktool (placing lib folder in base apk and editing androidmanifest)
Or doing same in apk editor also fine???
I tried with 2 apks but games forced stopping just need to check that if i am doing well or missing any step, thank you
 
Back
Top Bottom