Skip to main content

Add your description here

Project description

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

Installation

  1. Clone the repository.
  2. Install Python dependencies:
pip install httpx lxml pyaxmlparser
  1. Configure paths in src/re1sid_lib/common.py:
PATCHES_PATH = ".revanced_res/patches.rvp"
CLI_PATH = ".revanced_res/revanced-cli.jar"

Usage

Download ReVanced assets

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

from re1sid_lib.downloader import Downloader

downloader = Downloader()
downloader.download_all()

Or download individual assets:

from re1sid_lib.downloader 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.patcher 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.patcher 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)

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.

Project structure

  • src/re1sid_lib/downloader.py - Download helper for ReVanced CLI and patches.
  • src/re1sid_lib/patcher.py - Patch helper and CLI output parser.
  • src/re1sid_lib/common.py - Common path configuration.

License

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

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

re1sid_lib-0.1.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

re1sid_lib-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file re1sid_lib-0.1.1.tar.gz.

File metadata

  • Download URL: re1sid_lib-0.1.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for re1sid_lib-0.1.1.tar.gz
Algorithm Hash digest
SHA256 52af8661fc51f558314cdf9f99f2a0b6174da9385003a5753ba4ccd210571ea8
MD5 9010e9178efe9cfdad3a50700893c92f
BLAKE2b-256 d805929003813794c3fae68b804b14f1fbfed1209a3650bf2f5ff10687f40433

See more details on using hashes here.

File details

Details for the file re1sid_lib-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: re1sid_lib-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for re1sid_lib-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a957fba5f809c1904f8f7ae3e4bd088f21d1956366334dc2efa4a4414de2c92
MD5 4832738dcf96cc2c93aa43d45a16875e
BLAKE2b-256 0c9beeb49ef52c3ea8e0ec3ddc55941879c260ce30fa4a154f7143148a2184b5

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