Skip to main content

buildapp

Cross-Platform script used to recompile APK that was decompiled by apktool
That way, you can decompile an application, patch it's smali-source / resources / manifest / libs / ...
And rebuild it into a new apk you may install in your devices

NOTE that you should use this tool for debugging / educational purposes only!
NOTE that you must accept the LICENSE of the tools listed in the requirements section

Installation

Simply run:

pip install buildapp --upgrade && buildapp_fetch_tools

Make sure to have python scripts folder in your path,
And use the correct version of pip for python3

Decompilation process

Use apktool to decompile your application.

Apktool decompilation syntax:

apktool d <apk_path> -o <output_folder>

Patching process

Just change anything you want, native-elfs in /lib folder, smali-code from smali folders, manifest file AndroidManifest.xml, resources, assets and whatever's out there

Recompilation process

Simply use our tool, the syntax is:

buildapp -d <sources_folder> -o <outout_apk>

For additional flags, ran buildapp -h

  • apktool build
    • Use apktool to rebuild the apk from the sources folder
    • apktool b <sources_folder> -o <output_apk>

  • zip-alignment
    • apk is implemented as a zip file which should have the correct alignment in order to be installed
    • implemented using zipalign
  • obtain keystore
    • our tool will use a default keystore if you won't provide one
    • you may use keytool to generate your own keystores
  • apk signing
    • our tool will sign the apk using the keystore mentioned above
    • implemented using apksigner
  • apk installation
    • if asked to, buildapp will install the signed apk on connected adb device (if there's only one)
      NOTE that if you won't provide the same keystore as the original app already installed on your device, you may not be able to install the apk you built by this script unless you'll uninstall the original app first.
    • implemented using adb

And that's it! Now you have a new apk, waiting to be installed it on your android devices!

Requirements

The project uses these tools (can be fetched using buildapp_fetch_tools after pip install buildapp):

Metadata

Release files for buildapp 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for buildapp 1.5.0
File Size Uploaded
buildapp-1.5.0.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for buildapp 1.5.0
File Interpreter ABI Platform
buildapp-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / buildapp-1.5.0.tar.gz

Download URL buildapp-1.5.0.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0c9e7b17fc662476584f3f89bf9eb28bbdeb8338456b9329e309637f849b908e
BLAKE2b-256 checksum
How to use checksums
aa12541c6789bf3a7e8f746fc0e67bf835d1c4ad0f7c8a915f81dd9db44bca76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Release files / buildapp-1.5.0-py3-none-any.whl

Download URL buildapp-1.5.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc02b4bad7ad898a218bf06d8d4e109d547a5f7c8b49e13b7f5ba9d3115ce80f
BLAKE2b-256 checksum
How to use checksums
6f3613219dc2674aebf0d281bb658ccea96ee0a52ae08ebb2cce7d0960ed3030
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.0

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page