Here's the sample env to help you. Reminder to check if you have workflow permissions.
Note - If you want to use or will be using Automated
method to patch, please do not define anything inside ENVS
. You are free to use .env
file to do so.
If you don't define anything in .env
file or ENVS
in GitHub Secrets
, these configurations will be used:
- YouTube & YouTube Music apps will be patched
- With latest versions recommended by ReVanced
- Using latest resources provided by ReVanced
- With all patches included except for universal patches
Note that MicroG won't be released by default and you've to use EXTRA_FILES
config for that to happen.
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 |
EXTRA_FILES | Extra files apk to upload in GitHub upload. | None |
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_INTEGRATIONS_DL* | DL for Integrations to be used for patching apps. | Revanced Integrations |
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 | False [Builder's own key (v3)] |
GLOBAL_OPTIONS_FILE* | Options file to be used | Builder's options.json |
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 |
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_INTEGRATIONS_DL | DL for Integrations to be used for patching APP_NAME. | GLOBAL_INTEGRATIONS_DL |
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) or not. | GLOBAL_OLD_KEY |
APP_NAME_OPTIONS_FILE | Options file to be used APP_NAME. | GLOBAL_OPTIONS_FILE |
APP_NAME_ARCHS_TO_BUILD | Arch to keep in the patched APP_NAME. | GLOBAL_ARCHS_TO_BUILD |
APP_NAME_SPACE_FORMATTED_PATCHES | Whether patches are space formatted for APP_NAME. | GLOBAL_SPACE_FORMATTED_PATCHES |
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 listed under
Code
column here.
Note that the page syncs itself with the usage ofPATCHES_JSON_DL
resources in the.env
file.
The sources of original APKs are from one of these apkmirror, apkpure, uptodown & apksos sites. I'm not responsible for any damaged caused. If you know any better/safe source to download clean. Open a discussion.*
- 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-scraper-sites> <APP_NAME>_PACKAGE_NAME=<package-name-of-the-application>
You can also provide
DL
to the clean apk instead of providingDL_SOURCES
as mentioned in this note.<APP_NAME>_DL=<direct-download-apk-link-to-any-site> <APP_NAME>_PACKAGE_NAME=<package-name-of-the-application>
Supported Scrappers are:- APKMIRROR - Supports downloading any available version
- Link Format -
https://www.apkmirror.com/apk/<organisation-name>/app-name/
- Example Link - https://www.apkmirror.com/apk/google-inc/youtube/
- Link Format -
- UPTODOWN - Supports downloading any available version
- Link Format -
https://<app-name>.en.uptodown.com/android
- Example Link - https://spotify.en.uptodown.com/android
- Link Format -
- APKSOS - Supports downloading any available version
- Link Format -
https://apksos.com/download-app/<package-name>
- Example Link - https://apksos.com/download-app/com.expensemanager
- Link Format -
- APKPURE - Supports downloading any available version
- Link Format -
https://apkpure.net/-/<package-name>
- Example Link - https://apkpure.net/-/com.google.android.youtube
- Link Format -
- APKMonk - Supports downloading any available version
- Link Format -
https://www.apkmonk.com/app/<package-name>/
- Example Link - https://www.apkmonk.com/app/com.duolingo/
- Link Format -
- Google Drive - Supports downloading from Google Drive
- Link Format -
https://drive.google.com/uc?<id>
- Example Link - https://drive.google.com/uc?id=1ad44UTghbDty8o36Nrp3ZMyUzkPckIqY
- Link Format -
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. - APKMIRROR - Supports downloading any available version
-
By default, script build the latest version mentioned in
patches.json
file. -
Remember to download the Microg. Otherwise, you may not be able to open YouTube/YouTube Music.
-
By default, tool will build only
youtube,youtube_music
. To build other apps supported by patching resources.Add the apps you want to build in.env
file or inENVS
inGitHub secrets
in the formatPATCH_APPS=<APP_NAME>
Example:
PATCH_APPS=youtube,twitter,reddit
-
If APKMirror or other apk sources are 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
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
apks from internet and expects an apk in/apks
folder with namesyoutube.apk
&youtube_music.apk
(apk naming format -<APP_NAME>.apk
) respectively. -
If you run script again & again. You might hit GitHub API limit. In that case you can provide your Personal GitHub Access Token by adding a secret
PERSONAL_ACCESS_TOKEN
inGitHub secrets
. -
You can provide Direct download to the resource to used for patching apps
.env
file or inENVS
inGitHub secrets
in the format -GLOBAL_CLI_DL=https://github.com/revanced/revanced-cli GLOBAL_PATCHES_DL=https://github.com/revanced/revanced-patches/releases/latest GLOBAL_PATCHES_JSON_DL=https://github.com/revanced/revanced-patches/releases/tag/v2.190.0 GLOBAL_INTEGRATIONS_DL=local://integrations.apk
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/releases/latest YOUTUBE_PATCHES_JSON_DL=https://github.com/inotia00/revanced-patches/releases/tag/v2.187.1 YOUTUBE_INTEGRATIONS_DL=local://inotia00-integrations.apk
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 withlocal://
.
Note - The link provided must be direct DLs, unless they are from GitHub. Note - Some of the patch sources (like inotia00) may provide - seperated patches while some (ReVanced) shifted to Space formatted patches. UseSPACE_FORMATTED_PATCHES
to define the type of patches. -
If you don't want to use default keystore. You can provide your own by placing it inside
/apks
folder. And adding the filename ofkeystore-file
in.env
file or inENVS
inGitHub secrets
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
-
If you don't want to use default
apks/options.json
file. You can provide your own by placing it insideapks
folder and adding the name ofoptions-file
in.env
file or inENVS
inGitHub secrets
in the format.GLOBAL_OPTIONS_FILE=my_options.json
Tool also support configuring at app level.
Example:
YOUTUBE_OPTIONS_FILE=my_cool_yt_options.json
Note that this customization isn't available in the
RVX-Builds
tasker project. For now, use theUniversal
option for Patch Options to include options.json entries from all patch resources being used. -
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
in.env
file orENVS
inGitHub secrets
in the format.GLOABAL_ARCHS_TO_BUILD=arm64-v8a,x86_64
Tool also support configuring at app level.
Example:
YOUTUBE_ARCHS_TO_BUILD=arm64-v8a,armeabi-v7a
Note -
- Possible values are:
arm64-v8a
,armeabi-v7a
,x86_64
,x86
. - Make sure the patching resource (CLI) support this feature.
- Possible values are:
-
If you want to include any extra file (apks only) to the Github upload (releases). Set comma arguments in
.env
file or inENVS
inGitHub secrets
in the format -EXTRA_FILES=<url>@<appName>.apk
Example:
EXTRA_FILES=https://github.com/inotia00/mMicroG/releases/latest@Mmicrog.apk,https://github.com/inotia00/VancedMicroG/releases/tag/v0.2.27.230755@Vmicrog.apk,https://github.com/revanced/revanced-integrations@integrations.apk
-
If you want to exclude any patch. Set comma separated patch in
.env
file or inENVS
inGitHub secrets
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 -
- All the patches for an app are included by default.
- Some of the patch sources (like inotia00) may provide - seperated patches while some (ReVanced) shifted to
Space formatted patches. Use
<APP_NAME>_SPACE_FORMATTED_PATCHES
to define the type of patches at app level, if varies from global. - Some patches are provided as space separated, make sure you type those in lowercase and - (hyphen or dash) separated here.
It means a patch named
Hey There
must be entered ashey-there
in the above example.
- All the patches for an app are included by default.
-
If you want to include any universal patch. Set comma separated patch in
.env
file or inENVS
inGitHub secrets
in the format -<APP_NAME>_INCLUDE_PATCH=<PATCH_TO_EXCLUDE-1,PATCH_TO_EXCLUDE-2>
Example:
YOUTUBE_INCLUDE_PATCH=remove-screenshot-restriction
Note -
- Some of the patch sources (like inotia00) may provide - seperated patches while some (ReVanced) shifted to
Space formatted patches. Use
<APP_NAME>_SPACE_FORMATTED_PATCHES
to define the type of patches at app level, if varies from global. - Some patches are provided as space separated, make sure you type those in lowercase and - (hyphen or dash) separated here.
It means a patch named
Hey There
must be entered ashey-there
in the above example. - Not all patch sources provide universal patches.
- Go with
EXCLUDE_PATCH
if you didn't understandINCLUDE_PATCH
purpose as that requires only regular patches.
- Some of the patch sources (like inotia00) may provide - seperated patches while some (ReVanced) shifted to
Space formatted patches. Use
-
If you want to build a specific version or latest version. Add
version
in.env
file or inENVS
inGitHub secrets
in the format -<APP_NAME>_VERSION=<VERSION>
Example:
YOUTUBE_VERSION=17.31.36 YOUTUBE_MUSIC_VERSION=X.X.X TWITTER_VERSION=latest # whatever latest is available (including beta)
-
If you have your personal source for apk to be downloaded. You can also provide that and tool will not scrape links from apk sources. Add
dl
in.env
file or inENVS
inGitHub secrets
in the format -<APP_NAME>_DL=<direct-app-download>
Example:
YOUTUBE_DL=https://d.apkpure.com/b/APK/com.google.android.youtube?version=latest
Note that they are supposed to be direct DLs.
-
- 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 a part of the actions secrets of the repository may look 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 what I wrote in above configs and always useGitHub secrets
.
Note - If you want to use or will be usingAutomated
method to patch, please do not define anything insideENVS
. -
You can scan your built apks files with VirusTotal. For that, Add
VT_API_KEY
inGitHub secrets
. -
If you want to patch reddit apps using your own Client ID. You can provide your Client ID as secret
REDDIT_CLIENT_ID
inGitHub secrets
. -
Apprise
We also have apprise support to upload built apk anywhere. To use apprise, add below envs inGitHub secrets
.APPRISE_URL=tgram://bot-token/chat-id APPRISE_NOTIFICATION_BODY=What a great Body APPRISE_NOTIFICATION_TITLE=What a great title
-
Here's the another sample in file format.
#
are used to comment out lines. For example,# APP_NAME_VERSION=latest_supported
is simply used to depict the latest supported the patch version. -
Make your Action has write access. If not click here: https://github.com/OWNER/REPO/settings/actions. In the bottom give read and write access to Actions.
You may also require to enable scheduled workflows for the first time.