A script to automatically patch the Android YouTube application with a custom selection of latest patches from Morphe.
Find a file
2026-04-03 17:12:40 +02:00
apkmirror-downloader@27a7018a71 Add apkmirror dl submodule 2025-10-26 19:37:06 +01:00
.gitignore Migrate to Morph and imprive err. handling 2026-03-31 20:14:25 +02:00
.gitmodules Migrate to Morph and imprive err. handling 2026-03-31 20:14:25 +02:00
LICENSE Initial commit 2025-10-26 19:32:53 +01:00
options.json Migrate to Morph and imprive err. handling 2026-03-31 20:14:25 +02:00
README.md Update README following migration to Morphe 2026-03-31 21:35:42 +02:00
yt-morphe-autopatcher.sh Correct working directory 2026-04-03 17:12:09 +02:00

yt-revanced-autopatcher

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

The latest version of each dependency is retrieved at runtime if necessary (Morphe CLI, Morphe 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 Morphe Manager, or retrieved in the working directory after patching once with the Morphe CLI. The keystore file should be stored next to the script.

Ways it could break

(...and therefore improvements to make)

  • Morphe CLI changes release filename
  • APKMD changes release filename
  • Another app supported by Morphe 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
  • ...