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.4.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.4.0
File Size Uploaded
re1sid_lib-0.4.0.tar.gz 13.5 kB Details

Built distribution (wheel)

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

Total release size: 29.4 kB

Release files / re1sid_lib-0.4.0.tar.gz

Download URL re1sid_lib-0.4.0.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b7ce5d573bed94bdc309808a9e495fad2ed258b143ad5673c730eb351c2fbcd0
BLAKE2b-256 checksum
How to use checksums
6fc5337467304023f9bb2174bf1fc1571b00040e0d8fbb4d6ba1e1c70a87500a
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.4.0-py3-none-any.whl

Download URL re1sid_lib-0.4.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dafa358464324fc17c2659a2edec4a315882ac44c733b5961db6923580acb4d3
BLAKE2b-256 checksum
How to use checksums
fbce83cc0c17b51113a7b511b313961b4e79334c127d5590f243f4ca0e6bffad
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

This release

0.4.0 This release

2 release files

0.3.2

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