A little python script that will help you in building Revanced apps and sharing them anywhere.
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 refrain from asking about revanced features/bugs. Discuss those on proper relevant forums.
You can get pre-built apks here
You can use any of the following methods to build.
🚀 GitHub (Recommended
)
ENVS
(optional) secret to the repo. Required only if you want to cook specific apps/versions.
Go to actions tab. Select Build & Release
.Click on Run Workflow
.
🐳 Docker Compose
git clone https://github.com/nikhilbadyal/docker-py-revanced
cd docker-py-revanced
.env
file if you want some customization(See notes)docker compose up --build
🐳With Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
docker run -v "$(pwd)"/apks:/app/apks/ nikhilbadyal/docker-py-revanced
You can pass the below environment variables (See notes) with the -e
flag or use the --env-file
flag.
🫠Without Docker
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
Env Name | Description | Default |
---|---|---|
PATCH_APPS | Apps to patch/build | youtube |
EXISTING_DOWNLOADED_APKS | Already downloaded clean apks | [] |
PERSONAL_ACCESS_TOKEN | Github Token to be used | None |
DRY_RUN | Do a dry run | False |
GLOBAL_CLI_DL* | DL for CLI to be used for patching apps. | Revanced CLI |
GLOBAL_PATCHES_DL* | DL for Patches to be used for patching apps. | Revanced Patches |
GLOBAL_SPACE_FORMATTED_PATCHES* | Whether patches are space formatted. | True |
GLOBAL_PATCHES_JSON_DL* | DL for Patches Json to be used for patching apps. | Revanced Patches |
GLOBAL_KEYSTORE_FILE_NAME* | Key file to be used for signing apps | Builder’s own key |
GLOBAL_OLD_KEY* | Whether key was generated with cli v4(new) or not | Builder’s v3(old) own key |
GLOBAL_OPTIONS_FILE* | Options file to be used | Builder’s default file |
GLOBAL_ARCHS_TO_BUILD* | Arch to keep in the patched apk. | All |
REDDIT_CLIENT_ID | Reddit Client ID to patch reddit apps | None |
VT_API_KEY | Virus Total Key to scan APKs | None |
TELEGRAM_CHAT_ID | Receiver in Telegram upload | None |
TELEGRAM_BOT_TOKEN | APKs Sender for Telegram upload | None |
TELEGRAM_API_ID | Used for telegram Authentication | None |
TELEGRAM_API_HASH | Used for telegram Authentication | None |
EXTRA_FILES | Extra files apk to upload in GitHub upload. | None |
APPRISE_URL | Apprise URL . | None |
APPRISE_NOTIFICATION_TITLE | Apprise Notification Title . | None |
APPRISE_NOTIFICATION_BODY | Apprise Notification Body . | None |
*
- Can be overridden for individual app.
Env Name | Description | Default |
---|---|---|
APP_NAME_CLI_DL | DL for CLI to be used for patching APP_NAME. | GLOBAL_CLI_DL |
APP_NAME_PATCHES_DL | DL for Patches to be used for patching APP_NAME. | GLOBAL_PATCHES_DL |
APP_NAME_PATCHES_JSON_DL | DL for Patches Json to be used for patching APP_NAME. | GLOBAL_PATCHES_JSON_DL |
APP_NAME_SPACE_FORMATTED_PATCHES | Whether patches are space formatted. APP_NAME. | GLOBAL_SPACE_FORMATTED_PATCHES |
APP_NAME_KEYSTORE_FILE_NAME | Key file to be used for signing APP_NAME. | GLOBAL_KEYSTORE_FILE_NAME |
APP_NAME_OLD_KEY | Whether key used was generated with cli > v4(new) APP_NAME. |
GLOBAL_OLK_KEY |
APP_NAME_ARCHS_TO_BUILD | Arch to keep in the patched APP_NAME. | GLOBAL_ARCHS_TO_BUILD |
APP_NAME_EXCLUDE_PATCH** | Patches to exclude while patching APP_NAME. | [] |
APP_NAME_INCLUDE_PATCH** | Patches to include while patching APP_NAME. | [] |
APP_NAME_VERSION | Version to use for download for patching. | Recommended by patch resources |
APP_NAME_PACKAGE_NAME*** | Package name of the app to be patched | None |
APP_NAME_DL_SOURCE*** | Download source of any of the supported scrapper | None |
APP_NAME_DL*** | Direct download Link for clean apk | None |
**
- By default all patches for a given app are included.
**
- Can be used to included universal patch.
***
- Can be used for unavailable apps in the repository (unofficial apps).
Officially Supported values for APP_NAME** are :
**
- You can also patch any other app which is not supported officially.To do so, you need to provide
few more inputs to the tool which are mentioned below. These config will override the sources config from the tool.
<APP_NAME>_DL_SOURCE=<apk-link-to-any-of-the-suppored-scrapper>
<APP_NAME>_PACKAGE_NAME=<package-name-of-the-application>
You can also provide DL to the clean apk instead of providing DL_SOURCES as mentioned in this note. Supported Scrappers are:
Please verify the source of original APKs yourself with links provided. I’m not responsible for any damage
caused.If you know any better/safe source to download clean. Open a discussion.
patches.json
file.youtube,youtube_music
. To build other apps supported by patching
resources.Add the apps you want to build in .env
file or in ENVS
in GitHub secrets
in the format
PATCH_APPS=<APP_NAME>
Example:
PATCH_APPS=youtube,twitter,reddit
Tip - If for some reason you want to patch app but want to go through all this .env while running you can enter app
name in
to be patched box.
/apks
directory and provide environment variable in .env
file or in ENVS
in GitHub 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 with same name.
.env
file or in ENVS
in GitHub secrets
(Recommended)
in the format -
PERSONAL_ACCESS_TOKEN=<PAT>
.env
file
or in ENVS
in GitHub secrets
(Recommended) in the format -
GLOBAL_CLI_DL=https://github.com/revanced/revanced-cli
GLOBAL_PATCHES_DL=https://github.com/revanced/revanced-patches
GLOBAL_PATCHES_JSON_DL=https://api.revanced.app/v4/patches/list
Resources downloaded from envs and will be used for patching for any APP_NAME.
Unless provided different resource for the individual app.
Tool also support resource config at app level. You can patch A app with X resources while patching B with Y
resources.
This can be done by providing Direct download link for resources for app.
Example:
YOUTUBE_CLI_DL=https://github.com/inotia00/revanced-cli
YOUTUBE_PATCHES_DL=https://github.com/inotia00/revanced-patches
YOUTUBE_PATCHES_JSON_DL=https://github.com/inotia00/revanced-patches
With the config tool will try to patch YouTube with resources from inotia00 while other global resource will used
for patching other apps.
If you have want to provide resource locally in the apks folder. You can specify that by mentioning filename
prefixed with local://
.
Note - The link provided must be DLs. Unless they are from GitHub.
Note - If your patches resource are available on GitHub and you want to select latest resource without excluding
pre-release you can add latest-prerelease
to the URL.
Example:
YOUTUBE_PATCHES_DL=https://github.com/inotia00/revanced-patches/releases/latest-prerelease
For above example tool while selecting latest patches will consider pre-releases/beta too.
YOUTUBE_PATCHES_DL=https://github.com/inotia00/revanced-patches/releases/latest
For above example tool while selecting latest patches will exclude any pre-release/beta ie. will consider only
stable releases..
Note - Some of the patch source like inotia00 still provides - separated patches while revanced shifted to
Space formatted patches. Use SPACE_FORMATTED_PATCHES
to define the type of patches.
apks
folder. And adding the name of keystore-file
in .env
file or in ENVS
in GitHub
secrets
(Recommended) in the format
GLOBAL_KEYSTORE_FILE_NAME=revanced.keystore
Tool also support providing secret key at app level. You can sign A app with X key while signing B with Y
key.
Example:
YOUTUBE_KEYSTORE_FILE_NAME=youtube.keystore
Note - If you are using your own keystore.And it was generated with cli > v4 Add Example:
GLOBAL_OLD_KEY=False
if you are using different key for different apps. You need to specify at app level.
YOUTUBE_OLD_KEY=False
apks
folder. And adding the name of options-file
in .env
file or in ENVS
in GitHub
secrets
(Recommended) in the format
GLOBAL_OPTIONS_FILE=my_options.json
Tool also support providing secret key at app level. You can sign A app with X key while signing B with Y
key.
Example:
YOUTUBE_OPTIONS_FILE=my_cool_yt_options.json
ARCHS_TO_BUILD
in ENVS
in GitHub secrets
(Recommended) in the
format.
GLOABAL_ARCHS_TO_BUILD=arm64-v8a,armeabi-v7a
Tool also support configuring at app level.
Example:
YOUTUBE_ARCHS_TO_BUILD=arm64-v8a,armeabi-v7a
Note -
armeabi-v7a
,x86
,x86_64
,arm64-v8a
.env
file or in ENVS
in GitHub secrets
(Recommended) in the format
EXTRA_FILES=<url>@<appName>.apk
Example:
EXTRA_FILES=https://github.com/inotia00/mMicroG/releases/latest@mmicrog.apk
.env
file
or in ENVS
in GitHub secrets
(Recommended) in the format
<APP_NAME>_EXCLUDE_PATCH=<PATCH_TO_EXCLUDE-1,PATCH_TO_EXCLUDE-2>
Example:
YOUTUBE_EXCLUDE_PATCH=custom-branding,hide-get-premium
YOUTUBE_MUSIC_EXCLUDE_PATCH=yt-music-is-shit
Note -
.env
file or in ENVS
in GitHub secrets
(Recommended) in the format
<APP_NAME>_INCLUDE_PATCH=<PATCH_TO_EXCLUDE-1,PATCH_TO_EXCLUDE-2>
Example:
YOUTUBE_INCLUDE_PATCH=remove-screenshot-restriction
Note -
version
in .env
file
or in ENVS
in GitHub secrets
(Recommended) in the format
<APP_NAME>_VERSION=<VERSION>
Example:
YOUTUBE_VERSION=17.31.36
YOUTUBE_MUSIC_VERSION=X.X.X
TWITTER_VERSION=latest
dl
in .env
file or in ENVS
in GitHub secrets
(Recommended) in
the format
<APP_NAME>_DL=<direct-app-download>
Example:
YOUTUBE_DL=https://d.apkpure.com/b/APK/com.google.android.youtube?version=latest
id
and save it to TELEGRAM_CHAT_ID
TELEGRAM_BOT_TOKEN
- Telegram provides BOT_TOKEN. It works as sender. Open bot and
create one copy api keyTELEGRAM_API_ID
- Telegram API_ID is provided by telegram hereTELEGRAM_API_HASH
- Telegram API_HASH is provided by telegram hereENVS
in GitHub 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 in GitHub secrets
..env
file
or in ENVS
in GitHub secrets
(Recommended) in the format
APPRISE_URL=tgram://bot-token/chat-id
APPRISE_NOTIFICATION_BODY=What a great Body
APPRISE_NOTIFICATION_TITLE=What a great title