A little python script that will help you in building Revanced and Revanced-Extended apps.
Note
- If you are a root user and want magisk module (Extended). Get them here
This is just a builder for revanced and not a revanced support. Please be understanding and refraining from asking about revanced features/bugs. Discuss those on proper relevant forums(on Revanced GitHub , Discord)
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
) -
🐳With Docker Compose Windows/Mac users simply install Docker Desktop. If using Linux see below
- 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 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
- Update
.env
file if you want some customization(See notes) - Run script with
docker-compose up
- Install Docker(Skip if already installed)
-
🐳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(See notes) with
docker run -v "$(pwd)"/apks:/app/apks/ nikhilbadyal/docker-py-revanced
-e
flag or use--env-file
flag.
- Install Docker(Skip if already installed)
-
🫠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
- nyx-music-player
- icon_pack_studio
- ticktick
- twitch
- hex-editor
- citra
- windy
- my-expenses
- backdrops
- expensemanager
- tasker
Please verify the source of original APKs yourself with links provided. I'm not responsible for any damaged caused. If you know any better/safe source to download clean. Please raise a PR. -
Remember to download the Microg. Otherwise, you will not be able to open YouTube.
-
By default, it will build only
youtube
. To build other apps supported by revanced team. 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
-
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
-
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=False
-
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
-
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. -
You can scan your build apks files with VirusTotal. For that, Add
VT_API_KEY
inGitHub secrets
. -
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 what I said above and always useGitHub secrets
. -
If APKMirror or other apk source is blocked in your region or script somehow is unable to download from apkmirror. You can download apk manually from any source. Place them in
/apks
directory and provide environment variable in.env
file or inENVS
inGitHub secrets
(Recommended) in the format.EXISTING_DOWNLOADED_APKS=<Comma,Seperate,App,Name>
Example:
EXISTING_DOWNLOADED_APKS=youtube,youtube_music
If you add above. Script will not download the
Youtube
&youtube music
apk from internet and expects an apk in/apks
folder.Name of the downloaded apk must match with the available app choices found here.
-
If you run script again & again. You might hit GitHub API limit. In that case you can provide your Personal GitHub Access Token in
.env
file or inENVS
inGitHub secrets
(Recommended) in the format -PERSONAL_ACCESS_TOKEN=<PAT>
Thanks to @aliharslan0 for his work.