taku-nm / auto-cli

a simple script to automate the usage of revanced cli
226 stars 10 forks source link

help wanted for patching yt via cli #27

Closed vairag22 closed 8 months ago

vairag22 commented 8 months ago

this is not really an issue but a question, since there's no "discussion" isnt enable repo i am writing my question here. i am trying to patch youtube using revanced-cli. the problem i am facing is that when i patch then all patches are used and if i use --exclusive then none of the patches are used. i'm not sure what's causing issue. can you please check if my format is correct?

java -jar revanced-cli.jar patch --keystore youtube_revanced.keystore -o youtube_revanced.apk --options options.json -b revanced-patches.jar -i "wanted-patch" -e "unwanted-patch" -m revanced-integrations.apk youtube_apkmirror.apk

I'd appreciate if you drop your remarks.

vairag22 commented 8 months ago

im using latest versions of all required dependencies and adoptium/temurin openjdk21. i know jdk isnt an issue because i used the same to patch yt a long time ago, that time it worked fine.

taku-nm commented 8 months ago

I'm not entirely sure what made you ask this in a repository that aims to automate the usage of the ReVanced CLI, therefore bypassing the need to write a command entirely. But yes, your syntax looks fine. However, you might not be setting the correct name, as the script would point out: "Please look up the patch names and capitalizations at https://revanced.app/patches". So make sure you use the exact patch name.

The usage of --exclusive simply means to exclude all the default patches. If you were to not use exclusive and just add patches with -i ; you'd just get the default patches + whatever patch you added - whatever patch you removed.

But again, consider simply using the script. That's kind of its entire purpose. For further support, join us on discord.

vairag22 commented 8 months ago

thanks a lot. your inputs were very helpful.

i asked because:

  1. most people in revanced repo are like "read the damn docs", which i already did and wasn't able to find out my mistake. searching their subreddit didn't help either.
  2. i'm writing a bash script similar to yours to automate patching. my aim is to run that script on a vps and host patched apps via a private fdroid repo.

i caught my mistake. i was using patch ids instead of patch names. earlier patch ids were used to select patches, i didn't know they changed it.