├── META-INF └── com │ └── google │ └── android │ ├── updater-script │ └── update-binary ├── releases ├── YT-Changelog.md └── YT-Update.json ├── addon └── VolumeKey-Selector.zip ├── uninstall.sh ├── YT-Amoled ├── YT-MaterialYou ├── module.prop ├── post-fs-data.sh ├── .github └── FUNDING.yml ├── dynmount.sh ├── customize.sh └── README.md /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /releases/YT-Changelog.md: -------------------------------------------------------------------------------- 1 | ### 18.46.40 2 | 3 | 1. YouTube ReVanced app has been updated. 4 | 5 | -------------------------------------------------------------------------------- /addon/VolumeKey-Selector.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RabehX/YT-ReVanced-Module/HEAD/addon/VolumeKey-Selector.zip -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | 3 | [[ -e "/data/system/package_cache" ]] && rm -rf /data/system/package_cache/*; [[ -e "/data/adb/yt-revanced" ]] && rm -rf /data/adb/yt-revanced 4 | -------------------------------------------------------------------------------- /YT-Amoled: -------------------------------------------------------------------------------- 1 | If you've reached this point, it means you're genuinely interested in my project. Please replace this file with the ReVanced application with an Amoled theme keeping the same file name. -------------------------------------------------------------------------------- /YT-MaterialYou: -------------------------------------------------------------------------------- 1 | # If you've reached this point, it means you're genuinely interested in my project. Please replace this file with the ReVanced application with an MaterialYou theme keeping the same file name. -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=yt-revanced 2 | name=YouTube ReVanced 3 | version=v18.46.35 4 | versionCode=1541266880 5 | author=RabahX 6 | description=Some magic, enjoy it! 7 | updateJson=https://raw.githubusercontent.com/RabahX/YT-ReVanced-Module/master/releases/YT-Update.json 8 | -------------------------------------------------------------------------------- /releases/YT-Update.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "v18.46.40", 3 | "versionCode": 1541277120, 4 | "zipUrl": "https://github.com/RabahX/YT-ReVanced-Module/releases/download/v18.46.40/YT-ReVanced-Module.zip", 5 | "changelog": "https://github.com/RabahX/YT-ReVanced-Module/raw/master/releases/YT-Changelog.md" 6 | } 7 | -------------------------------------------------------------------------------- /post-fs-data.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | 3 | # Module directory and name 4 | MODDIR="${0%/*}" 5 | MAIN_MODULE_PROP="/data/adb/modules/$(basename "$(dirname "$0")")/module.prop" 6 | 7 | # Copy module.prop to the temporary location and modify the description 8 | FAILED_STATUS=$(sed -E 's/^description=(\[.*][[:space:]]*)?/description=[⛔ The module is non-functioning] /g' "$MODDIR/module.prop") 9 | echo -n "$FAILED_STATUS" > "$MAIN_MODULE_PROP" 10 | 11 | # Remove the status file and temporary file 12 | rm -rf "/data/adb/yt-revanced/.tmp/status" 13 | 14 | # Exit with success 15 | exit 0 16 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | 3 | ################# 4 | # Initialization 5 | ################# 6 | 7 | umask 022 8 | 9 | # echo before loading util_functions 10 | ui_print() { echo "$1"; } 11 | 12 | require_new_magisk() { 13 | ui_print "*******************************" 14 | ui_print " Please install Magisk v20.4+! " 15 | ui_print "*******************************" 16 | exit 1 17 | } 18 | 19 | ######################### 20 | # Load util_functions.sh 21 | ######################### 22 | 23 | OUTFD=$2 24 | ZIPFILE=$3 25 | 26 | mount /data 2>/dev/null 27 | 28 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk 29 | . /data/adb/magisk/util_functions.sh 30 | [ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk 31 | 32 | install_module 33 | exit 0 34 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: rabehx 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /dynmount.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | 3 | MODDIR="${0%/*}" 4 | NVBASE="/data/adb" 5 | MAIN_MODULE_PROP="$NVBASE/modules/$(basename "$(dirname "$0")")/module.prop" 6 | YOUTUBE_PACKAGE_PATH=$(pm path com.google.android.youtube | awk -F':' 'NR==1{print $2}') 7 | REVANCED_APK_PATH="$MODDIR/yt-revanced.apk" 8 | STAGE="$1" 9 | UID="$3" 10 | PROC="$4" 11 | 12 | RUN_SCRIPT() { 13 | case "$STAGE" in 14 | "prepareEnterMntNs") prepareEnterMntNs ;; 15 | "EnterMntNs") EnterMntNs ;; 16 | esac 17 | } 18 | 19 | prepareEnterMntNs() { 20 | if [ "$API_VERSION" -lt 4 ] && 21 | ! { [ "$PROC" = "com.google.android.youtube" ] || [ "$UID" -lt 10000 ] || [ "$PROC" = "com.android.systemui" ]; }; then 22 | exit 1 23 | fi 24 | 25 | touch "$NVBASE/yt-revanced/.tmp/status" 26 | YTVERSION=$(dumpsys package com.google.android.youtube | awk -F= '/versionName/{print $2; exit}') 27 | YRVERSION=$(awk -F= '/version/{print $2; exit}' "$MODDIR/module.prop" | sed 's/^v//') 28 | 29 | if [ "$YTVERSION" != "$YRVERSION" ]; then 30 | CHECK_VERSION_STATUS=$(sed -E 's/^description=(\[.*][[:space:]]*)?/description=[⛔ The module is deactivated due to an incompatible YouTube version] /g' "$MODDIR/module.prop") 31 | echo -n "$CHECK_VERSION_STATUS" >"$MAIN_MODULE_PROP" 32 | exit 1 33 | fi 34 | DYNAMIC_MOUNT_STATUS=$(sed -E 's/^description=(\[.*][[:space:]]*)?/description=[😋 The module is functioning] /g' "$MODDIR/module.prop") 35 | echo -n "$DYNAMIC_MOUNT_STATUS" >"$MAIN_MODULE_PROP" 36 | exit 0 37 | 38 | } 39 | 40 | EnterMntNs() { 41 | [ -z "$YOUTUBE_PACKAGE_PATH" ] && exit 0 42 | 43 | chcon u:object_r:apk_data_file:s0 "$REVANCED_APK_PATH" 44 | chmod 0755 "$REVANCED_APK_PATH" 45 | mount -o bind "$REVANCED_APK_PATH" "$YOUTUBE_PACKAGE_PATH" 46 | exit 1 47 | } 48 | 49 | RUN_SCRIPT 50 | -------------------------------------------------------------------------------- /customize.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | 3 | # Check if installing from Recovery is supported 4 | if ! $BOOTMODE; then 5 | abort "! Installing from Recovery is Not Supported." 6 | fi 7 | 8 | # Unzip Volume Key Selector Addon 9 | unzip -o "$MODPATH/addon/VolumeKey-Selector.zip" -d "$MODPATH/addon/VolumeKey-Selector" &>/dev/null || abort "! Unzip failed" 10 | 11 | # Run Volume Key Selector Addon if install scripts exist 12 | if [ "$(ls -A "$MODPATH"/addon/*/install.sh 2>/dev/null)" ]; then 13 | for addon in "$MODPATH"/addon/*/install.sh; do 14 | . "$addon" 15 | done 16 | fi 17 | 18 | # Process Monitor Tool (PMT) variables 19 | PMT_MODULE_PATH="$NVBASE/modules/magisk_proc_monitor" 20 | PMTURL=https://github.com/HuskyDG/zygisk_proc_monitor/releases 21 | PMT_VER_CODE="$(grep_prop versionCode "$PMT_MODULE_PATH/module.prop")" 22 | 23 | # YouTube variables 24 | YTVERSION=$(dumpsys package com.google.android.youtube | awk -F= '/versionName/ {print $2; exit}') 25 | YRVERSION="$(grep_prop version "${TMPDIR}/module.prop" | sed 's/v//')" 26 | YTURL="https://www.apkmirror.com/apk/google-inc/youtube/youtube-${YRVERSION//./-}-release/" 27 | 28 | # Check Android version 29 | if [ "$API" -lt 26 ]; then 30 | abort "! Only Android 8 and newer devices are Supported." 31 | fi 32 | 33 | # Check Process Monitor Tool 34 | if [ ! -d "$PMT_MODULE_PATH" ]; then 35 | ui_print "! Process Monitor Tool is NOT Installed" 36 | am start -a android.intent.action.VIEW -d "$PMTURL" &>/dev/null 37 | abort "! Kindly install it from the following location: $PMTURL" 38 | fi 39 | 40 | if [ "$PMT_VER_CODE" -lt 10 ]; then 41 | ui_print "! Process Monitor Tool v2.3 or above is required" 42 | am start -a android.intent.action.VIEW -d "$PMTURL" &>/dev/null 43 | abort "! Kindly upgrade it from the following location: $PMTURL" 44 | fi 45 | 46 | if [ -f "$PMT_MODULE_PATH/disable" ] || [ -f "$PMT_MODULE_PATH/remove" ]; then 47 | ui_print "! Process Monitor Tool is either not enabled or will be removed." 48 | abort "! Kindly enable it in Magisk beforehand." 49 | fi 50 | 51 | # Check if YouTube is installed 52 | if [ ! -d /proc/1/root/data/data/com.google.android.youtube ]; then 53 | am start -a android.intent.action.VIEW -d "$YTURL" &>/dev/null 54 | abort "! YouTube is NOT Installed" 55 | fi 56 | 57 | if [ "$YTVERSION" != "$YRVERSION" ]; then 58 | abort "! Apologies, your installed version of YouTube is not compatible with the version on the module." 59 | fi 60 | 61 | # Mount YouTube ReVanced 62 | if [ "$ABI" == "armeabi-v7a" ] || [ "$ABI" == "arm64-v8a" ]; then 63 | THEME_SELECTED="MaterialYou" 64 | if selector "What is your favorite theme on YouTube ?" null "Amoled" "MaterialYou"; then 65 | THEME_SELECTED="Amoled" 66 | fi 67 | ui_print "[+] Mount [$THEME_SELECTED] YouTube" 68 | mv "$MODPATH/YT-$THEME_SELECTED" "$MODPATH/yt-revanced.apk" 69 | rm -rf "$MODPATH/YT-MaterialYou" "$MODPATH/YT-Amoled" 70 | else 71 | MOUNT_TYPE="Amoled" 72 | if [ "$API" -ge 32 ]; then 73 | MOUNT_TYPE="MaterialYou" 74 | fi 75 | ui_print "[+] Automatically Mount [$MOUNT_TYPE] YouTube" 76 | mv "$MODPATH/YT-$MOUNT_TYPE" "$MODPATH/yt-revanced.apk" 77 | rm -rf "$MODPATH/YT-MaterialYou" "$MODPATH/YT-Amoled" 78 | fi 79 | 80 | # Disable Battery Optimization for YouTube ReVanced 81 | dumpsys deviceidle whitelist + com.google.android.youtube >/dev/null 2>&1 82 | 83 | # Cleanup 84 | [ -d "$MODPATH/addon/" ] && rm -rf $MODPATH/addon/ 85 | 86 | # Finish 87 | XURL=https://t.me/RabahX_Official 88 | mkdir -p "$NVBASE/yt-revanced/.tmp" 89 | am start -a android.intent.action.VIEW -d "$XURL" &>/dev/null && ui_print "- By RabahX, Telegram: @RabahX_Official" 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # YT ReVanced Module 2 | 3 | [](https://t.me/RabahX_Official) 4 | [](https://github.com/RabahX/YT-ReVanced-Module/releases/latest) 5 | [](https://github.com/RabahX/YT-ReVanced-Module/releases) 6 | 7 | ## Introduction 8 | 9 | A YT-ReVanced-Module is endeavoring to replace the original YouTube app with YouTube ReVanced through the use of Dynamic Mount. 10 | 11 | > Dynamic Mount is a feature that runs a script every time an app is launched. This script allows you to create a bind mount, which is essentially a different perspective on a directory tree. Unlike traditional mounting, where a storage device becomes a directory tree, a bind mount duplicates an existing directory tree at a different location. The directories and files within the bind mount are identical to the original, and any changes made on one side are immediately reflected on the other side since both perspectives display the exact same data. So, Dynamic Mount enables you to perform this operation automatically when launching an app. 12 | 13 | ## Requirements 14 | 15 | - Android 8 or later is required. 16 | - It is necessary to install the Process Monitor Tools module with version 2.3 or higher, as it supports both `Magisk` and `KernelSU`. 17 | - Installing YouTube is a requirement, and it is necessary for the version to be compatible with the one in the module. 18 | 19 | ## What makes it different from other modules? 20 |
| Feature | 24 |YT-ReVanced-Module | 25 |Other Modules | 26 |
|---|---|---|
| Open Source | 31 |✅ | 32 |✅ | 33 |
| Full support for KernelSU and Magisk | 36 |✅ | 37 |✅ | 38 |
| Emulator Support | 41 |✅ | 42 |✅ | 43 |
| Use Dynamic Mount | 46 |✅ | 47 |❌ | 48 |
| Ensuring the module remains undetectable by detection applications | 51 |✅ | 52 |❌ | 53 |
| Support for YouTube Beta versions | 56 |✅ | 57 |❌ | 58 |
| Freedom to choose your preferred theme using the Volume Key Selector add-on | 61 |✅ | 62 |❌ | 63 |
| Printing a description of the module's status | 66 |✅ | 67 |❌ | 68 |
| Support for the 'Sulist' option found in Magisk Lite and Magisk Delta (now called 'Unmount modules by default'). | 71 |✅ | 72 |🤷♂️ | 73 |
| Online updates reception | 76 |✅ | 77 |🤷♂️ | 78 |
| Minimizing and compressing the module size | 81 |✅ | 82 |🤷♂️ | 83 |