My Revanced app includes several modifications designed to support multiple apps, rather than using the components from the original Revanced.
This led to builds not working smoothly in the Android Manager app. To resolve this without going through a complex build process on a computer, I created a simple single script.
- Python 3.8+ (tested on macOS/Linux/Windows)
- Java (JRE/JDK) installed and available on PATH
- Check with:
java -version - If you see UnsupportedClassVersionError, install a newer Java (e.g., 17 or 21)
- Check with:
- Python packages:
requestsquestionary
Install Python deps:
pip install -r requirements.txt# 1) Provide the APK you want to patch and a target package name to filter the patches
python build.py --apk /path/to/app.apk --package com.example.app --output out
# 2) Include universal/common patches as well (off by default)
python build.py --apk /path/to/app.apk --package com.example.app --include-universal --output out
# 3) Actually run the patch command after selection (by default it only prints the command)
python build.py --apk /path/to/app.apk --package com.example.app --include-universal --runWhat happens:
- Downloads the latest ReVanced CLI JAR and patches
.rvpintoout/ - Lists compatible patches for the given package (plus universal patches if
--include-universal) - Opens an interactive checklist (Space to select, Enter to confirm)
- If a patch has options, you’ll be prompted to set values (uses defaults if you skip)
- Prints the final CLI command; with
--run, executes it and producesout/patched.apk
--apk PATH(required unless you provide it interactively): The input APK to patch--package NAME: Filter patches that explicitly declare compatibility with this package (e.g.,com.kakao.talk)--include-universal: When used with--package, also show universal/common patches--exclusive/--no-exclusive:--exclusive(default): Only enable the patches you select--no-exclusive: Start from the default patch set and add/remove based on your selection
--output DIR: Output directory (default:output)--run: Execute the patch command after selection
Note:
- The selector pre-checks patches that are “Enabled: true” by default. You can untick them if you don’t want them.
YouTube with only package-specific patches:
python build.py --apk ~/Downloads/KakaoTalk.apk --package com.kakao.talk --output outYouTube including universal/common patches:
python build.py --apk ~/Downloads/KakaoTalk.apk --package com.kakao.talk --include-universal --output outRun end-to-end and produce a patched APK:
python build.py --apk ~/Downloads/KakaoTalk.apk --package com.kakao.talk --include-universal --run- Java check: runs
java -versionto ensure Java is available - Downloads:
- Latest ReVanced CLI (JAR)
- Latest ReVanced patches bundle (
.rvp)
- Lists patches via
revanced-cli list-patches(with packages, versions, and options) - Parses “Index/Name/Description/Enabled/Options/Compatible packages” output
- Interactive selection (Space to toggle, Enter to confirm)
- Option prompts:
- Shows keys, defaults, types, and possible values (if any)
- Choose from provided values or enter a custom value
- Blank input means “null” (translates to
-Okeywithout a value)
- Builds a
revanced-cli patchcommand using--ei(by index) or-e(by name) and-Okey[=value] - Prints the command; runs it if
--runis given
- macOS/Linux:
- Use
python3ifpythonpoints to Python 2 on your system - Ensure you run from a real terminal (Terminal/iTerm, GNOME Terminal, etc.) so the interactive UI renders properly
- Use
- Windows:
- Use
py -3 build.py ...orpythondepending on your setup - Prefer Windows Terminal or PowerShell for proper TUI rendering
- If
javais not recognized, add your Java bin folder to PATH and restart the terminal
- Use
- “Java is not installed or not found in PATH.”:
- Install Java and ensure
java -versionworks in your terminal, then retry
- Install Java and ensure
- “UnsupportedClassVersionError”:
- Your Java is too old for the CLI. Install a newer Java (e.g., 17 or 21)
- Terminal UI issues:
- Run in a real terminal (not an IDE’s limited console). Resize the window if necessary
- Patching fails for specific versions:
- Ensure your APK version is within the patch’s compatible versions (shown in the list)
- Try a different APK version supported by the patch
- Downloads saved to:
output/(or the directory you specify with--output)revanced-cli-*.jarandpatches-*.rvppatched.apkafter a successful run with--run
- This helper focuses on selection and option configuration; installation/uninstallation (ADB) is out of scope
- Use
--no-exclusiveif you want to start from the default patch set instead of only your selections