Git Product home page Git Product logo

yt_patched2's Introduction

🤓Docker-Py-ReVanced

A little python script that will help you in building Revanced 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 refrain from asking about revanced features/bugs. Discuss those on proper relevant forums.

Pre-Built APKs

You can get pre-built apks here

Build Yourself

You can use any of the following methods to build.

  • 🚀 _GitHub_ (Recommended)

    1. Click Star to support the project.

    2. Fork the project.

    3. Add ENVS (optional) secret to the repo. Required only if you want to cook specific apps/versions.

      🚶Detailed step by step guide
      • Go to the repo settings and then to actions->secret

      • Add Repository secret
    4. Go to actions tab. Select Build & Release.Click on Run Workflow.

      🚶Detailed step by step guide
      • Go to actions tab

      • Check the status of build, It should look green.
    5. If the building process is successful, you’ll get your APKs in the

  • 🐳 Docker Compose
    Windows/Mac users simply install Docker Desktop. If using Linux see below

    1. Install Docker(Skip if already installed)
      curl -fsSL https://get.docker.com -o get-docker.sh
      sh get-docker.sh
    2. Grant Permissions with(Skip if already there)
       sudo chmod 777 /var/run/docker.sock
    3. 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
    4. Clone the repo
      git clone https://github.com/nikhilbadyal/docker-py-revanced
    5. cd to the cloned repo
      cd docker-py-revanced
    6. Update .env file if you want some customization(See notes)
    7. Run script with
      docker-compose up --build
  • 🐳With Docker

    1. Install Docker(Skip if already installed)
      curl -fsSL https://get.docker.com -o get-docker.sh
      sh get-docker.sh
    2. Run script with
      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

    1. Install Java >= 17
    2. Install Python
    3. Create virtual environment
      python3 -m venv venv
      
    4. Activate virtual environment
      source venv/bin/activate
      
    5. Install Dependencies with
      pip install -r requirements.txt
      
    6. Run the script with
      python main.py
      

Configurations

Global Config

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_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 CLI
GLOBAL_KEYSTORE_FILE_NAME* Key file to be used for signing apps Builder's own key
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

* - Can be overridden for individual app.

App Level Config

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_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

** - By default all patches for a given app are included.
** - Can be used to included universal patch.

Note

  1. Supported values for APP_NAME are :

    1. youtube
    2. youtube_music
    3. twitter
    4. reddit
    5. tiktok
    6. warnwetter
    7. spotify
    8. nyx-music-player
    9. icon_pack_studio
    10. ticktick
    11. twitch
    12. hex-editor
    13. windy
    14. my-expenses
    15. backdrops
    16. expensemanager
    17. tasker
    18. irplus
    19. vsco
    20. meme-generator-free
    21. nova_launcher
    22. netguard
    23. instagram
    24. inshorts
    25. messenger
    26. grecorder
    27. trakt
    28. candyvpn
    29. sonyheadphone
    30. androidtwelvewidgets
    31. yuka
    32. relay
    33. boost
    34. rif
    35. sync
    36. infinity
    37. slide
    38. bacon
    39. microg
    40. pixiv


    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.

  2. By default, script build the latest version as recommended by patches.json team.

  3. Remember to download the Microg. Otherwise, you may not be able to open YouTube/YouTube Music.

  4. By default, tool will build only youtube. 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
  5. 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 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_musicapk from internet and expects an apk in /apks folder with same name.

  6. 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 in ENVS in GitHub secrets (Recommended) in the format -

     PERSONAL_ACCESS_TOKEN=<PAT>
  7. You can provide Direct download to the resource to used for patching apps .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://github.com/revanced/revanced-patches
     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
     YOUTUBE_PATCHES_JSON_DL=https://github.com/inotia00/revanced-patches
     YOUTUBE_INTEGRATIONS_DL=https://github.com/inotia00/revanced-integrations

    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.

  8. If you don't want to use default keystore. You can provide your own by placing it inside 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
  9. 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 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 -

    1. Possible values are: armeabi-v7a,x86,x86_64,arm64-v8a
    2. Make sure the patching resource(CLI) support this feature.
  10. If you want to include any extra file to the Github upload. Set comma arguments in .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/[email protected],https://github.com/revanced/[email protected]
  11. If you want to exclude any patch. Set comma separated patch in .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 -

    1. All the patches for an app are included by default.
    2. Revanced patches are provided as space separated, make sure you type those - separated here. It means a patch named Hey There must be entered as hey-there in the above example.
  12. If you want to include any universal patch. Set comma separated patch in .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 -

    1. Revanced patches are provided as space separated, make sure you type those - separated here. It means a patch named Hey There must be entered as hey-there in the above example.
  13. If you want to build a specific version or latest version. Add 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
  14. For Telegram Upload.

    1. Set up a telegram channel, send a message to it and forward the message to this telegram bot
    2. Copy id and save it to TELEGRAM_CHAT_ID

    3. TELEGRAM_BOT_TOKEN - Telegram provides BOT_TOKEN. It works as sender. Open bot and create one copy api key

    4. TELEGRAM_API_ID - Telegram API_ID is provided by telegram here

    5. TELEGRAM_API_HASH - Telegram API_HASH is provided by telegram here

    6. After Everything done successfully a part of the actions secrets of the repository may look like
  15. Configuration defined in ENVS 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.

  16. Sample Envs

  17. Make sure your Action has write access. If not click here. In the bottom give read and write access to Actions.

yt_patched2's People

Contributors

nikhilbadyal avatar dependabot[bot] avatar pre-commit-ci[bot] avatar emapps avatar pratyay360 avatar imxeren avatar mohamedamrnady avatar hlqviet avatar tenyuhuang avatar sheeit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.