From 8061a9360fe6ee9da508a9b26eb86a07e18faafe Mon Sep 17 00:00:00 2001 From: yue374 <102145692+FiorenMas@users.noreply.github.com> Date: Fri, 2 Feb 2024 22:07:35 +0700 Subject: [PATCH] added ReX Can patch ReX from now and fix :bug: --- .github/workflows/ci.yml | 11 ++++ .github/workflows/manual-patch.yml | 16 ++++++ README.md | 18 ++++++- src/build/ReX.sh | 50 +++++++++++++++++++ src/build/Revanced-3.sh | 2 +- src/build/utils.sh | 2 +- src/patches/youtube-ReX/exclude-patches | 20 ++++++++ src/patches/youtube-ReX/include-patches | 1 + src/patches/youtube-music-ReX/exclude-patches | 12 +++++ src/patches/youtube-music-ReX/include-patches | 1 + 10 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 src/build/ReX.sh create mode 100644 src/patches/youtube-ReX/exclude-patches create mode 100644 src/patches/youtube-ReX/include-patches create mode 100644 src/patches/youtube-music-ReX/exclude-patches create mode 100644 src/patches/youtube-music-ReX/include-patches diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b70a96..bc2d537 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,9 @@ jobs: - name: Check new patch ReVanced id: check-rv run: bash src/etc/ci.sh ReVanced/revanced-patches youtube-revanced.apk + - name: Check new patch ReX + id: check-rex + run: bash src/etc/ci.sh YT-Advanced/ReX-patches youtube-revanced-extended.apk - name: Check new patch Revanced Extended id: check-rve run: bash src/etc/ci.sh inotia00/revanced-patches youtube-revanced-extended.apk @@ -29,6 +32,7 @@ jobs: uses: gautamkrishnar/keepalive-workflow@v1 outputs: check_rv: ${{ steps.check-rv.outputs.new_patch }} + check_rex: ${{ steps.check-rex.outputs.new_patch }} check_rve: ${{ steps.check-rve.outputs.new_patch }} check_rve67: ${{ steps.check-rve67.outputs.new_patch }} check_rve5: ${{ steps.check-rve5.outputs.new_patch }} @@ -40,6 +44,13 @@ jobs: uses: ./.github/workflows/manual-patch.yml with: org: "Revanced" + Patch-ReX: + name: Patch ReX + needs: check + if: ${{ needs.check.outputs.check_rex == 1 }} + uses: ./.github/workflows/manual-patch.yml + with: + org: "ReX" Patch-Revanced-Extended: name: Patch Revanced Extended needs: check diff --git a/.github/workflows/manual-patch.yml b/.github/workflows/manual-patch.yml index 12c58f2..c5eef0f 100644 --- a/.github/workflows/manual-patch.yml +++ b/.github/workflows/manual-patch.yml @@ -11,6 +11,7 @@ on: options: - 'All' - 'Revanced' + - 'ReX' - 'Revanced Extended' - 'Revanced Extended Android 6,7' - 'Revanced Extended Android 5' @@ -44,6 +45,21 @@ jobs: repository: ${{ github.repository }} - name: Releasing APK files uses: ./.github/actions/release + patch_rex: + name: Patch ReX + if: ${{ github.event.inputs.org == 'ReX' || github.event.inputs.org == 'All' || inputs.org == 'ReX' }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Preparing to patch + uses: ./.github/actions/preparing + - name: Patch apk + run: bash src/build/ReX.sh + env: + repository: ${{ github.repository }} + - name: Releasing APK files + uses: ./.github/actions/release patch_rve: name: Patch Revanced Extended if: ${{ github.event.inputs.org == 'Revanced Extended' || github.event.inputs.org == 'All' || inputs.org == 'Revanced Extended' }} diff --git a/README.md b/README.md index 26aa952..4d55f8f 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,19 @@ Download [x86_64](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-x86_64-revanced.apk) -### [Revanced Extended:](https://github.com/inotia00/revanced-patches/) +### [ReX: (forked from Revanced Extended)](https://github.com/YT-Advanced/ReX-patches) + +[All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-ReX.apk) + +[Arm64-v8a](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-arm64-v8a-ReX.apk) + +[Armeabi-v7a](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-armeabi-v7a-ReX.apk) + +[x86](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-x86-ReX.apk) + +[x86_64](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-x86_64-ReX.apk) + +### [Revanced Extended: (Discontinued)](https://github.com/inotia00/revanced-patches/) [All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-revanced-extended.apk) @@ -175,6 +187,10 @@ Download [All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/reddit-revanced.apk) +### ReX: + +[All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/reddit-ReX.apk) + ### Revanced Extended: [All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/reddit-revanced-extended.apk) diff --git a/src/build/ReX.sh b/src/build/ReX.sh new file mode 100644 index 0000000..cfe2662 --- /dev/null +++ b/src/build/ReX.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# ReX build +source src/build/utils.sh + +################################################# + +# Download requirements +dl_gh "ReX-patches ReX-integrations" "YT-Advanced" "latest" +dl_gh "revanced-cli" "inotia00" "latest" + +################################################# + +# Patch YouTube ReX: +get_patches_key "youtube-ReX" +get_ver "Hide general ads" "com.google.android.youtube" +get_apk "youtube" "youtube" "google-inc/youtube/youtube" +patch "youtube" "ReX" "inotia" + +################################################# + +# Patch YouTube Music ReX: +# Arm64-v8a +get_patches_key "youtube-music-ReX" +#get_ver "Hide general ads" "com.google.android.apps.youtube.music" +get_apk "youtube-music-arm64-v8a" "youtube-music" "google-inc/youtube-music/youtube-music" "arm64-v8a" +patch "youtube-music-arm64-v8a" "ReX" "inotia" +# Armeabi-v7a +get_patches_key "youtube-music-ReX" +#get_ver "Hide general ads" "com.google.android.apps.youtube.music" +get_apk "youtube-music-armeabi-v7a" "youtube-music" "google-inc/youtube-music/youtube-music" "armeabi-v7a" +patch "youtube-music-armeabi-v7a" "ReX" "inotia" + +################################################# + +# Patch Reddit: +get_patches_key "reddit" +get_apk "reddit" "reddit" "redditinc/reddit/reddit" +patch "reddit" "ReX" "inotia" + +################################################# + +rm -f revanced-cli* +dl_gh "revanced-cli" "FiorenMas" "latest" +# Split architecture Youtube: +get_patches_key "youtube-ReX" +for i in {0..3}; do + split_arch "youtube" "youtube-${archs[i]}-ReX" "$(gen_rip_libs ${libs[i]})" +done + +################################################# \ No newline at end of file diff --git a/src/build/Revanced-3.sh b/src/build/Revanced-3.sh index d095a14..b3a65dd 100644 --- a/src/build/Revanced-3.sh +++ b/src/build/Revanced-3.sh @@ -33,7 +33,7 @@ patch "lightroom" "revanced" # Patch Windy: get_patches_key "windy" -get_apk "windy" "windy-wind-weather-forecast" "windy-weather-world-inc/windy-wind-weather-forecast/windy-wind-weather-forecast" +get_apk "windy" "windy-wind-weather-forecast" "windy-weather-world-inc/windy-wind-weather-forecast/windy-wind-weather-forecast" "arm64-v8a + x86 + x86_64" patch "windy" "revanced" ################################################# diff --git a/src/build/utils.sh b/src/build/utils.sh index 84e049c..05e3b88 100644 --- a/src/build/utils.sh +++ b/src/build/utils.sh @@ -95,7 +95,7 @@ get_apk() { armeabi-v7a) url_regexp='armeabi-v7a'"[^@]*$6"''"[^@]*$5"'[^@]*@\([^"]*\)' ;; x86) url_regexp='x86'"[^@]*$6"''"[^@]*$5"'[^@]*@\([^"]*\)' ;; x86_64) url_regexp='x86_64'"[^@]*$6"''"[^@]*$5"'[^@]*@\([^"]*\)' ;; - *) return 1 ;; + *) url_regexp='$4'"[^@]*$6"''"[^@]*$5"'[^@]*@\([^"]*\)' ;; esac fi export version="$version" diff --git a/src/patches/youtube-ReX/exclude-patches b/src/patches/youtube-ReX/exclude-patches new file mode 100644 index 0000000..b86964d --- /dev/null +++ b/src/patches/youtube-ReX/exclude-patches @@ -0,0 +1,20 @@ +Custom branding icon YouTube +Enable compact controls overlay +Disable QUIC protocol +Disable auto captions +Disable HDR video +Enable old quality layout +Enable zen mode +Hide cast button +Hide account menu +Hide autoplay button +Hide autoplay preview +Hide captions button +Hide description components +Hide handle +Hide latest videos button +Hide load more button +Hide mix playlists +Hide previous next button +Hide voice search button +Custom seekbar color diff --git a/src/patches/youtube-ReX/include-patches b/src/patches/youtube-ReX/include-patches new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/patches/youtube-ReX/include-patches @@ -0,0 +1 @@ + diff --git a/src/patches/youtube-music-ReX/exclude-patches b/src/patches/youtube-music-ReX/exclude-patches new file mode 100644 index 0000000..17a75c5 --- /dev/null +++ b/src/patches/youtube-music-ReX/exclude-patches @@ -0,0 +1,12 @@ +Custom branding icon YouTube Music +Disable auto captions +Hide captions button +Hide button shelf +Hide carousel shelf +Hide category bar +Replace cast button +Hide cast button +Hide account menu +Hide mix playlists +Hide new playlist button +Hide playlist card diff --git a/src/patches/youtube-music-ReX/include-patches b/src/patches/youtube-music-ReX/include-patches new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/patches/youtube-music-ReX/include-patches @@ -0,0 +1 @@ +