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.2

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.2
File Size Uploaded
re1sid_lib-0.3.2.tar.gz 11.6 kB Details

Built distribution (wheel)

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

Total release size: 25.5 kB

Release files / re1sid_lib-0.3.2.tar.gz

Download URL re1sid_lib-0.3.2.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6d89014ab647991d781accc0447352bb0c608ae5a42c2769277ce2732ec6a729
BLAKE2b-256 checksum
How to use checksums
0339a82580303418f6610c326f50797df064a6fe434eef01f1a0e2e7b8f11a86
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.2-py3-none-any.whl

Download URL re1sid_lib-0.3.2-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
692ca265084818a963c616d046d57a0c97a777e4389c7d08fc1ed244df2068af
BLAKE2b-256 checksum
How to use checksums
15b052d06e783524b13b6ebcf9eca7724b8038a3456f2c9ff0af0cad908663ff
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

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

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