A little python script that will help you in building Revanced and Revanced-Extended apps
Note - I prefer Revanced Extended more (for YouTube & YouTube Music) hence the YouTube and YouTube Music builds in this repo are from Revanced Extended.
You can get pre-built apks here
You can use any of the following methods to build.
- 🚀In GitHub (
Recommended
)-
Add following secrets to the repo.
- GH_TOKEN (required) - GitHub token so that it can upload to GitHub after building. Click here to learn how to get that.
- VT_API_KEY (optional) - required only if you want Virus total scan.
- ENVS (optional) - required only if you want to cook specific apps/versions.
-
Go to actions tab. Select
Build Revanced APK
.Click onRun Workflow
.- It can take a few minute to start. Just be patient.
-
If the building process is successful, you’ll get your APKs in the releases
-
Click on
Build-<SomeRandomDate>
and download the apk file.
🐳With Docker Compose
- Install Docker(Skip if already installed)
curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh
- Grant Permissions with(Skip if already there)
sudo usermod -a -G docker ec2-user sudo usermod -a -G docker $USER sudo chmod 777 /var/run/docker.sock
- Install Docker compose(Skip if already installed or using
Docker Desktop
)curl -L "https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-$(uname -s)-$(uname -m)" \ -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
- Clone the repo
git clone https://github.com/nikhilbadyal/docker-py-revanced
- cd to the cloned repo
cd docker-py-revanced
- Run script with
docker-compose up
🐳With Docker
- Install Docker(Skip if already installed)
curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh
- Run script with
You can pass below envs with
docker run -v "$(pwd)"/apks:/app/apks/ nikhilbadyal/docker-py-revanced
-e
flag.
🫠Without Docker
- Install Java17 (zulu preferred)
- Install Python
- Create virtual environment
python3 -m venv venv
- Activate virtual environment
source venv/bin/activate
- Install Dependencies with
pip install -r requirements.txt
- Run the script with
python python main.py
(Pay attention to 3,4)
By default, script build the version as recommended by Revanced team.
-
Supported values for <REVANCED_APPS_NAME> are :
- youtube
- youtube_music
- tiktok
- warnwetter
- spotify
-
Remember to download the Microg. Otherwise, you will not be able to open YouTube.
-
By default, it will build all build app supported by Revanced team. If you don't want to waste time and build only few apps. Add the apps you want to build in
.env
file or inENVS
inGitHub secrets
in the formatPATCH_APPS=<REVANCED_APPS_NAME>
Example:
PATCH_APPS=youtube,twitter,reddit
-
If you want to exclude any patch. Set comma separated patch in
.env
file or inENVS
inGitHub secrets
(Recommended) in the formatEXCLUDE_PATCH_<REVANCED_APPS_NAME>=<PATCH_TO_EXCLUDE-1,PATCH_TO_EXCLUDE-2>
Example:
EXCLUDE_PATCH_YOUTUBE=custom-branding,hide-get-premium EXCLUDE_PATCH_YOUTUBE_MUSIC=yt-music-is-shit
If you are using
Revanced Extended.
Add_EXTENDED
in exclude options. Example:EXCLUDE_PATCH_YOUTUBE_EXTENDED=custom-branding-red,custom-branding-blue,materialyou EXCLUDE_PATCH_YOUTUBE_MUSIC_EXTENDED=custom-branding-music
-
If you want to build a specific version . Add
version
in.env
file or inENVS
inGitHub secrets
(Recommended) in the format<APPNAME>_VERSION=<VERSION>
Example:
YOUTUBE_VERSION=17.31.36 YOUTUBE_MUSIC_VERSION=X.X.X TWITTER_VERSION=X.X.X REDDIT_VERSION=X.X.X TIKTOK_VERSION=X.X.X WARNWETTER_VERSION=X.X.X SPOTIFY_VERSION=X.X.X
-
If you want to build
latest
version, whatever latest is available(including beta) . Addlatest
in.env
file or inENVS
inGitHub secrets
(Recommended) in the format<APPNAME>_VERSION=latest
Example:
YOUTUBE_VERSION=latest YOUTUBE_MUSIC_VERSION=latest TWITTER_VERSION=latest REDDIT_VERSION=latest TIKTOK_VERSION=latest WARNWETTER_VERSION=latest SPOTIFY_VERSION=latest
-
If you don't want to use default keystore. You can provide your own by placing it inside
apks
folder. And adding the name ofkeystore-file
in.env
file or inENVS
inGitHub secrets
(Recommended) in the formatKEYSTORE_FILE_NAME=revanced.keystore
-
If you want to use Revanced-Extended for YouTube and YouTube Music. Add the following adding in
.env
file or inENVS
inGitHub secrets
(Recommended) in the formatBUILD_EXTENDED=True
or disable it with (default)
BUILD_EXTENDED=True
-
For Telegram Upload.
- Set up a telegram channel, send a message to it and forward the message to this telegram bot
- Copy
id
and save it toTELEGRAM_CHAT_ID
TELEGRAM_BOT_TOKEN
- Telegram provides BOT_TOKEN. It works as sender. Open bot and create one copy api key
TELEGRAM_API_ID
- Telegram API_ID is provided by telegram here
TELEGRAM_API_HASH
- Telegram API_HASH is provided by telegram here
- After Everything done successfully the actions secrets of the repository will look something like
-
Configuration defined in
ENVS
inGitHub secrets
will override the configuration in.env
file. You can use this fact to define your normal configurations in.env
file and sometimes if you want to build something different just once. Add it inGitHub secrets
or you can ignore.env
file and always useGitHub secrets
because to modify.env
you need to modify the repo. Edit it and make a commit. -
If you want to build YouTube with
original icon
andcustom branding icon
both. AddBUILD_OG_BRANDING_YOUTUBE
in.env
file or inENVS
inGitHub secrets
(Recommended) in the formatBUILD_OG_BRANDING_YOUTUBE=True
You can also specify the branding patch to use for custom icon build. This can be done with by adding
BRANDING_PATCH
inENVS
inGitHub secrets
(Recommended) in the formatBRANDING_PATCH=custom-branding-icon-blue
-
You can build only for a particular arch in order to get smaller apk files.This can be done with by adding comma separated
ARCHS_TO_BUILD
inENVS
inGitHub secrets
(Recommended) in the format.ARCHS_TO_BUILD=arm64-v8a,armeabi-v7a
Possible values for
ARCHS_TO_BUILD
are:armeabi-v7a
,x86
,x86_64
,arm64-v8a
Make sure you are usingrevanced-extended
asrevanced
doesn't support this.
- Go to your account developer settings. Click on generate new token.
- Give a nice name. and grant following permissions
Thanks to @aliharslan0 for his work.