A script to automatically patch the Android YouTube application with a custom selection of latest patches from ReVanced.
Find a file
2026-03-12 12:42:25 +01:00
apkmirror-downloader@27a7018a71 Add apkmirror dl submodule 2025-10-26 19:37:06 +01:00
revanced-cli@a0189aeaee Add files 2025-10-26 19:52:13 +01:00
.gitignore Send notification, copy patched to fileshare always 2025-10-28 09:00:04 +01:00
.gitmodules Add files 2025-10-26 19:52:13 +01:00
apkmd Add files 2025-10-26 19:52:13 +01:00
LICENSE Initial commit 2025-10-26 19:32:53 +01:00
README.md Update README.md 2025-12-02 12:37:28 +01:00
revanced-cli-5.0.1-all.jar Add files 2025-10-26 19:52:13 +01:00
selected_patches_2025-08-16.json Add "Sanitize sharing links" patch to selection 2025-11-26 21:28:37 +01:00
yt-revanced-autopatcher.sh Exit if curl or wget fail, use wget for yt ver 2026-03-12 12:40:44 +01:00

yt-revanced-autopatcher

A Bash script that makes use of ReVanced CLI and APKMD to patch the latest supported YouTube APK with a selection of patches from Revanced Patches.

The latest version of each dependency is retrieved at runtime if necessary (ReVanced CLI, ReVanced Patches and APKMD).

Use cron to regularly generate a patched APK. The script only patches if necessary (if an APK of the latest supported version patched with the latest ReVanced Patches doesn't already exist at the output).

Before using the script

  • Nextcloud (Docker installation) notifications are enabled to let the user know a new patched APK is available. Comment out the Nextcloud related lines if you don't need this. The notifications unfortunately require the script to be executed as root, since my Docker installation is not rootless.

  • The patched apk is compiled in the script directory and also copied to another directory. Make sure to change the path of that directory or disable the copy step altogether.

  • The keystorename variable should the filename of your keystore, exported from Revanced Manager. The keystore file should be stored next to the script.

Ways it could break

(...and therefore improvements to make)

  • ReVanced CLI changes release filename
  • APKMD changes release filename
  • Another app supported by ReVanced Patches gets a patch named "Copy video URL" (the latest supported version of YT is retrieved from the list of available patches)
  • APKMD stops working
  • ...