XDream8 / revanced-creator

Create Revanced apps easily ☠️
MIT License
258 stars 63 forks source link

Help for making a script to build vanced in Google Collab. #5

Closed Tec43 closed 2 years ago

Tec43 commented 2 years ago

Hey! so recently I came across a user who made a script to build revanced on Google Collab. But i was unable to get the script as its deleted. So I tried to make my own script

!apt upgrade !sleep 3 !wget https://cdn.azul.com/zulu/bin/zulu18.30.11-ca-jdk18.0.1-linux_amd64.deb !sleep 3 !sudo apt install ./zulu18.30.11-ca-jdk18.0.1-linux_amd64.deb !java --version !sleep 3 !mkdir -p revanced !cd revanced !sh -c "$(curl https://raw.githubusercontent.com/XDream8/revanced-creator/main/patch.sh)"

But now the problem is that how do I exclude patches by -e, or non-root=1. The script uses the build script of this project so i thought this would be an ideal place to ask the question. I would appreciate any help.

XDream8 commented 2 years ago

I will soon add a feature that allows us to explicitly include or exclude patches

XDream8 commented 2 years ago

if you export nonroot=0 before launching the script, script will build root variant with microg-support excluded but adb connection is needed for root variant so it will not work on a cloud system.

nonroot setting defaults to 1 so if you run the script directly it will build non-root variant and will include all supported patches for youtube apk

XDream8 commented 2 years ago

I added additional_args option check out the readme

Tec43 commented 2 years ago

if you export nonroot=0 before launching the script, script will build root variant with microg-support excluded but adb connection is needed for root variant so it will not work on a cloud system.

nonroot setting defaults to 1 so if you run the script directly it will build non-root variant and will include all supported patches for youtube apk

Oh, that's interesting to know. So as much as i understand, i could delete the vanced microg present in my device since the apk built would have it included?

Tec43 commented 2 years ago

Ok so this should work. export additional_args="-i enable-wide-searchbar -e hide-shorts-button" this should be added before the command !sh -c "$(curl https://raw.githubusercontent.com/XDream8/revanced-creator/main/patch.sh)".

XDream8 commented 2 years ago

Oh, that's interesting to know. So as much as i understand, i could delete the vanced microg present in my device since the apk built would have it included?

No it just includes the microg-support patch. That patch is why we can use revanced with vanced-microg

if you dont want to use vanced-microg, you need root

XDream8 commented 2 years ago

Ok so this should work. export additional_args="-i enable-wide-searchbar -e hide-shorts-button" this should be added before the command !sh -c "$(curl https://raw.githubusercontent.com/XDream8/revanced-creator/main/patch.sh)".

I also did some testing on google colab and it seems like they dont allow export so you should do it like this !additional_args="-i enable-wide-searchbar -e hide-shorts-button" sh -c "$(curl https://raw.githubusercontent.com/XDream8/revanced-creator/main/patch.sh)"

Tec43 commented 2 years ago

Oh, that's interesting to know. So as much as i understand, i could delete the vanced microg present in my device since the apk built would have it included?

No it just includes the microg-support patch. That patch is why we can use revanced with vanced-microg

if you dont want to use vanced-microg, you need root

Oh now i get it, thanks man.