Skip to main content

sid

re1sid-lib

A small Python library for working with ReVanced CLI and patch bundles. It provides helpers to download required ReVanced assets and to patch APK files programmatically.

Features

  • Download the latest ReVanced CLI jar and patches.rvp bundle.
  • List available patches and options using ReVanced CLI output parsing.
  • Patch APK files with enabled/disabled patches and patch options.
  • Preserve multi-line descriptions and compatibility metadata.

Requirements

  • Python 3.9+
  • Java runtime installed and available in PATH
  • Python packages:
    • httpx
    • lxml
    • pyaxmlparser
    • textual

Installation

pip install re1sid-lib

Usage

Download ReVanced assets

Use the downloader helper to fetch the latest CLI jar and patches bundle.

from re1sid_lib import Downloader

downloader = Downloader()
downloader.download_all()

Or download individual assets:

from re1sid_lib import Downloader

downloader = Downloader()
downloader.download_cli()
downloader.download_patches_rvp()

List patches

Use the patcher helper to parse the patch list and inspect options.

from re1sid_lib import Patcher

patcher = Patcher()
patches = patcher.list_patches(package_name="com.spotify.music")
for patch in patches:
    print(patch["Name"], patch["Enabled"])

Patch an APK

Patch an APK file with specific enabled/disabled patches and options.

from re1sid_lib import Patcher

patcher = Patcher()
output = patcher.patch_apk(
    apk_path="input.apk",
    output_path="patched.apk",
    enabled_patches=["remove-ads", 12],
    disabled_patches=["log-timestamp"],
    options={"theme": "dark", "ads": False},
    exclusive=False,
    force=True,
    bypass_verification=True,
    purge=True,
)
print(output)

Patch an APK via terminal user interface

Patch an APK file with tui via uv

uv tool run re1sid-lib

screenshot

Notes

  • Downloader.download_all() removes the .revanced_res directory before downloading fresh assets.
  • Patcher.list_patches() can also accept an APK path and will read its package name automatically.
  • The library expects the ReVanced CLI jar and patches bundle to exist at the configured paths.

License

Use this project according to the appropriate license terms for ReVanced and its dependencies.

Metadata

Release files for re1sid-lib 0.3.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 re1sid-lib 0.3.0
File Size Uploaded
re1sid_lib-0.3.0.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for re1sid-lib 0.3.0
File Interpreter ABI Platform
re1sid_lib-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.3 kB

Release files / re1sid_lib-0.3.0.tar.gz

Download URL re1sid_lib-0.3.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
295a96435efe860d377e324a9475ed6e4b1e5e2166b5ffbd03ab43647f4ca5e0
BLAKE2b-256 checksum
How to use checksums
e39b55cd3aa863f2b69f87fa2847d78cc54b305ce57401303497bbcd0c789930
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / re1sid_lib-0.3.0-py3-none-any.whl

Download URL re1sid_lib-0.3.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a913c184823ec0f23abcf1df06677e29075f0aa2e7e2b4937001c2cddd1eae0c
BLAKE2b-256 checksum
How to use checksums
959ac254b9fc87f27c5ab593ad192b22a317f01a92520e7a04fe523c92a14cc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

This release

0.3.0 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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