How to edit & sign (.aab, .apk) file, how to covert .aab to .apk

Hello Guys,
In the tutorial you will learn:

  • How to build big app.
  • How To overcome the problem of uploading files >= 5mb to the assets.
  • How to add files to your (.aab, .apk) after building.
  • How to sign (.aab, .apk) files.
  • How to covert .aab to .apk after building.
How to export keystone

Download your keystone.

How to edit .aab files

How to edit .aab files.

  • Open WinRAR (a software which allows you to create, manage and control archive files), if you don’t have it you can check online to download it.
  • Locate where you download your .aab file.

  • Double click to open the file, then base, and assets (Example.aab>>base>>assets).

  • Click Add on the left top Conner.

  • Locate and select the files you want to add.

  • Click on ok, and the ok again.

  • After all the files have been added, then you can close WinRAR.
How to sign .aab files.

How to sign .aab files.

  • Go to Github GitHub - kaedea/aab-signer: Android AppBundle aab package signing tool. and download the tool aab-signer
  • Unzip the file into a folder
  • Copy the keystone you downloaded and your project you edited into the aab-signer folder.
  • Create another folder (a subfolder) inside the aab-signer folder and name it [Result] or anything you feel like. (This is where the new file will be stored after signing it)

  • Inside the aab-signer folder you will find a document named [README.md], open this document using Notepad.

  • Copy the below part from it and past it inside another Notepad
java -jar dist/aabresguard_*.jar sign-aab \
    --bundle=<input_aab_path> \
    --output=<output_path_require_not_exist> \
    --storeFile=<keysotre_file> \
    --storePassword=<storePassword> \
    --keyAlias=<keyAlias> \
    --keyPassword=<keyPassword>
  • Now we will edit the Highlighted part as shown in the image below.

006

  • (1) Still inside the aab-signer folder open the folder name [dist], you will find a file inside click on the file to rename it then copy the name with the extension name(.jar) of the file

(NOTE: Don’t rename the file you only want to copy the file name).

  • Replace the first Highlighted part with name you copied. you should have something like this below.

java -jar dist/ aabresguard_0.1.8_r3.jar sign-aab

  • (2) Still inside the aab-signer folder, click on your .aab file and click on copy path at the top left, replace the second Highlight with it(the path).

  • You should have the below result

--bundle="C:\Users\USER\Desktop\Signeraab\Example.aab"

  • (3) in the third Highlight you will replace it with the path where the signed .aab will be stored along with the name of the .aab file. like this below:

--output="C:\Users\USER\Desktop\Signeraab\Result\Example.aab"

  • (4) in the fourth Highlight you will replace it with the path where the keystone is. like this below:

--storeFile="C:\Users\USER\Desktop\Signeraab\android.keystore"

  • (5)(6)(7) in the fifth, sixth and seventh Highlight replace them with the following: as shown below. (By default, the keyAlias is androidkey and password is andriod for the keystone)
--storePassword=android

--keyAlias=androidkey

--keyPassword=android
  • You can now join them together as shown below
    java -jar dist/aabresguard_0.1.8_r3.jar sign-aab --bundle="C:\Users\USER\Desktop\Signeraab\Example.aab" --output="C:\Users\USER\Desktop\Signeraab\Result\Example.aab" --storeFile="C:\Users\USER\Desktop\Signeraab\android.keystore" --storePassword=android --keyAlias=androidkey --keyPassword=android

  • In the aab-signer folder type cmd and press enter to open command prompt for that path

  • Copy and past it in the cmd and press enter
  • Wait for a few moments till the process end
  • You should be having something like the Image below if the process end, now check the output folder [Result] you will find the signed .aab file

How to edit and sign .apk files

How to edit and sign .apk files

  • Open Apk Editor studio, if you don’t have you can check online to download it.

  • Click on Open APK to select/add an Apk file. Wait for a few moments for it to load.

  • Click on open content, click on the assets folder. Now go copy and paste whatever files you want to add to the APK inside the assets folder.

  • Close the folder after adding the files

To sign the edited APK

  • Make a copy of your keystone somewhere and rename the extension as (.ks), so the file will now be named (android.ks)

  • In your Apk Editor studio go to the Tools tab at the top left and select key manager (or click Crtl + k )

  • Add the path to the keystone (android.ks)

  • Enter the keystone password and the key Alias

  • (By default, the keyAlias is androidkey and password is andriod for the keystone)

  • Click ok after adding the Key alias and password.

  • You can now click on Save APK. to store the new apk

How to convert .aab to .apk

How to convert .aab to .apk

  • Select the .aab file path
  • Select the keystone path (android.keystone)
  • Click on custom keystone
  • Enter the keystone password (android)
  • Click on Try Fetch Alias (it should fill the keystone Alias with androidkey)
  • Click on convert
  • Wait for a few moments and you should have the result like in the image below

You will find the APK where the .aab file was selected from.

3 Likes

Nice guide @Anifahm :smiley: