Skip to main content

No project description provided

Project description

Stitch

Stitch is a powerful APK patching python library that allows you to inject your own java module into any APK, bundle or XAPK file.

How it works

Will be added soon.

Projects using Stitch:

How to use

Installation

You can install Stitch using pip:

# For now, install the test version from TestPyPI
pip install stitch

Basic Usage

Create an Android Gradle project like my smali_generator (Check it out in on of the examples) that generates the java module you want to inject.

Then, use the following code to patch an APK:

from stitch import Stitch
from stitch.common import ExternalModule
from pathlib import Path

with Stitch(
        apk_path='./input.apk',
        output_apk='./output.apk',
        external_modules=[ExternalModule(Path(__file__).parent / './smali_generator',
                                         'invoke-static {}, Lcom/smali_generator/TheAmazingPatch;->on_load()V')]
) as stitch:
    stitch.patch()

And that's it! Your APK will be patched with the injected module.

Contributing

I will be happy if you want to contribute to this project. Feel free to open issues or submit pull requests.

Disclaimer

For educational purpose only or something like that. I am not responsible for any misuse of this software.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stitch-1.0.1.tar.gz (17.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stitch-1.0.1-py3-none-any.whl (17.1 MB view details)

Uploaded Python 3

File details

Details for the file stitch-1.0.1.tar.gz.

File metadata

  • Download URL: stitch-1.0.1.tar.gz
  • Upload date:
  • Size: 17.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for stitch-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fa8c7d060ef62afbca9f1021c26a77df0bab5b553af529327b255e507bb0f7f1
MD5 12d5285a2e7402fc2481dc12058863b1
BLAKE2b-256 2713fa79a662045656a211cfe7e2af8487e1ee016159dfcd97227a4d7066d01a

See more details on using hashes here.

File details

Details for the file stitch-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: stitch-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for stitch-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0e68996d11dc47ff2a12e59c8552fcb7f517f71b1d62100f5d123351e8a5b5f0
MD5 6c3c4e43cc51d83eed3aef8f132c0939
BLAKE2b-256 e5e15969e496e22d583a4e3c02acce5f0ab43f1f235e2dd548cb7b18fab31601

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page