From 36d760e17cc211b40e6f80efa3d354238c2543be Mon Sep 17 00:00:00 2001 From: siritami <102145692+FiorenMas@users.noreply.github.com> Date: Sun, 17 Mar 2024 17:56:43 +0700 Subject: [PATCH] added Twitter Pico - Remove rufusin patch because pj merged with anddea - Improve ci function --- .github/workflows/ci.yml | 38 ++++++---- .github/workflows/manual-patch.yml | 71 ++++++++++++------- README.md | 18 ++--- src/build/Piko.sh | 34 +++++++++ src/build/ReX-rufusin.sh | 30 -------- src/etc/ci.sh | 8 +-- src/patches/messenger/exclude-patches | 2 +- src/patches/twitter-pico/exclude-patches | 1 + src/patches/twitter-pico/include-patches | 6 ++ src/patches/vsco/exclude-patches | 1 - src/patches/vsco/include-patches | 1 - .../youtube-ReX-rufusin/exclude-patches | 18 ----- .../youtube-ReX-rufusin/include-patches | 1 - 13 files changed, 124 insertions(+), 105 deletions(-) create mode 100644 src/build/Piko.sh delete mode 100644 src/build/ReX-rufusin.sh create mode 100644 src/patches/twitter-pico/exclude-patches create mode 100644 src/patches/twitter-pico/include-patches delete mode 100644 src/patches/vsco/exclude-patches delete mode 100644 src/patches/vsco/include-patches delete mode 100644 src/patches/youtube-ReX-rufusin/exclude-patches delete mode 100644 src/patches/youtube-ReX-rufusin/include-patches diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da5048e..b933cbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,10 +33,6 @@ jobs: id: check-rex if: steps.check-gh.outputs.internet_error == '0' run: bash src/etc/ci.sh YT-Advanced/ReX-patches latest youtube-ReX.apk - - name: Check new patch ReX forked by rufusin - id: check-rex-rufusin - if: steps.check-gh.outputs.internet_error == '0' - run: bash src/etc/ci.sh rufusin/revanced-patches latest youtube-ReX-rufusin.apk - name: Check new patch ReX forked by anddea id: check-rex-anddea if: steps.check-gh.outputs.internet_error == '0' @@ -45,6 +41,14 @@ jobs: id: check-rve if: steps.check-gh.outputs.internet_error == '0' run: bash src/etc/ci.sh inotia00/revanced-patches latest youtube-revanced-extended.apk + - name: Check new patch Twitter Piko Stable + id: check-twitter-piko-stable + if: steps.check-gh.outputs.internet_error == '0' + run: bash src/etc/ci.sh crimera/piko latest twitter-piko-stable.apk + - name: Check new patch Twitter Piko Beta + id: check-twitter-piko-beta + if: steps.check-gh.outputs.internet_error == '0' + run: bash src/etc/ci.sh crimera/piko prerelease twitter-piko-beta.apk - name: Check new patch Revanced For Android 6 & 7 id: check-rve67 if: steps.check-gh.outputs.internet_error == '0' @@ -83,9 +87,10 @@ jobs: check_rv: ${{ steps.check-rv.outputs.new_patch }} check_rv_beta: ${{ steps.check-rv-beta.outputs.new_patch }} check_rex: ${{ steps.check-rex.outputs.new_patch }} - check_rex_rufusin: ${{ steps.check-rex-rufusin.outputs.new_patch }} check_rex_anddea: ${{ steps.check-rex-anddea.outputs.new_patch }} check_rve: ${{ steps.check-rve.outputs.new_patch }} + check_twitter_piko_stable: ${{ steps.check-twitter-piko-stable.outputs.new_patch }} + check_twitter_piko_beta: ${{ steps.check-twitter-piko-beta.outputs.new_patch }} check_rve67: ${{ steps.check-rve67.outputs.new_patch }} check_rve5: ${{ steps.check-rve5.outputs.new_patch }} @@ -110,13 +115,6 @@ jobs: uses: ./.github/workflows/manual-patch.yml with: org: "ReX" - Patch-ReX-rufusin: - name: Patch ReX forked by rufusin - needs: check - if: ${{ needs.check.outputs.check_rex_rufusin == 1 }} - uses: ./.github/workflows/manual-patch.yml - with: - org: "ReX-rufusin" Patch-ReX-anddea: name: Patch ReX forked by anddea needs: check @@ -131,6 +129,20 @@ jobs: uses: ./.github/workflows/manual-patch.yml with: org: "Revanced Extended" + Patch-Twitter-Piko-Stable: + name: Patch Twitter Piko Stable + needs: check + if: ${{ needs.check.outputs.check_twitter_piko_stable == 1 }} + uses: ./.github/workflows/manual-patch.yml + with: + org: "Twitter Piko Stable" + Patch-Twitter-Piko-Beta: + name: Patch Twitter Piko Beta + needs: check + if: ${{ needs.check.outputs.check_twitter_piko_beta == 1 }} + uses: ./.github/workflows/manual-patch.yml + with: + org: "Twitter Piko Beta" Patch-Revanced-Extended-For-Android-6-7: name: Patch Revanced Extended For Android 6 & 7 needs: check @@ -144,4 +156,4 @@ jobs: if: ${{ needs.check.outputs.check_rve5 == 1 }} uses: ./.github/workflows/manual-patch.yml with: - org: "Revanced Extended Android 5" + org: "Revanced Extended Android 5" \ No newline at end of file diff --git a/.github/workflows/manual-patch.yml b/.github/workflows/manual-patch.yml index 83f53df..350fe01 100644 --- a/.github/workflows/manual-patch.yml +++ b/.github/workflows/manual-patch.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: inputs: org: - description: 'Which Revanced do you want to patch?' + description: 'Which "Revanced" do you want to patch?' required: true default: 'Revanced' type: choice @@ -18,9 +18,10 @@ on: - 'Revanced' - 'Revanced Beta' - 'ReX' - - 'Rex-rufusin' - 'Rex-anddea' - 'Revanced Extended' + - 'Twitter Piko Stable' + - 'Twitter Piko Beta' - 'Revanced Extended Android 6,7' - 'Revanced Extended Android 5' retry_count: @@ -117,28 +118,6 @@ jobs: - name: Re-run workflow if github connection not stable if: always() && steps.patch-rex.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run - patch_rex_rufusin: - name: Patch ReX forked by rufusin - if: ${{ github.event.inputs.org == 'ReX-rufusin' || github.event.inputs.org == 'All' || inputs.org == 'ReX-rufusin' }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Preparing to patch - uses: ./.github/actions/preparing - - name: Check github connection - id: check-gh-rex-rufusin - run: bash src/etc/connection.sh - - name: Patch apk - id: patch-rex - if: steps.check-gh-rex-rufusin.outputs.internet_error == '0' - run: bash src/build/ReX-rufusin.sh - - name: Releasing APK files - if: steps.check-gh-rex-rufusin.outputs.internet_error == '0' - uses: ./.github/actions/release - - name: Re-run workflow if github connection not stable - if: always() && steps.patch-rex-rufusin.outcome == 'skipped' && env.retry_count < env.max_retries - uses: ./.github/actions/re-run patch_rex_anddea: name: Patch ReX forked by anddea if: ${{ github.event.inputs.org == 'ReX-anddea' || github.event.inputs.org == 'All' || inputs.org == 'ReX-anddea' }} @@ -183,6 +162,50 @@ jobs: - name: Re-run workflow if github connection not stable if: always() && steps.patch-rve.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run + patch_twitter_piko_stable: + name: Patch Twitter Piko Stable + if: ${{ github.event.inputs.org == 'Twitter Piko Stable' || github.event.inputs.org == 'All' || inputs.org == 'Twitter Piko Stable' }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Preparing to patch + uses: ./.github/actions/preparing + - name: Check github connection + id: check-gh-piko-stable + run: bash src/etc/connection.sh + - name: Patch apk + id: patch-piko-stable + if: steps.check-gh-piko-stable.outputs.internet_error == '0' + run: bash src/build/Piko.sh latest + - name: Releasing APK files + if: steps.check-gh-rex-rufusin.outputs.internet_error == '0' + uses: ./.github/actions/release + - name: Re-run workflow if github connection not stable + if: always() && steps.patch-piko-stable.outcome == 'skipped' && env.retry_count < env.max_retries + uses: ./.github/actions/re-run + patch_twitter_piko_beta: + name: Patch Twitter Piko Beta + if: ${{ github.event.inputs.org == 'Twitter Piko Beta' || github.event.inputs.org == 'All' || inputs.org == 'Twitter Piko Beta' }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Preparing to patch + uses: ./.github/actions/preparing + - name: Check github connection + id: check-gh-piko-beta + run: bash src/etc/connection.sh + - name: Patch apk + id: patch-piko-beta + if: steps.check-gh-piko-beta.outputs.internet_error == '0' + run: bash src/build/Piko.sh prerelease + - name: Releasing APK files + if: steps.check-gh-rex-rufusin.outputs.internet_error == '0' + uses: ./.github/actions/release + - name: Re-run workflow if github connection not stable + if: always() && steps.patch-piko-beta.outcome == 'skipped' && env.retry_count < env.max_retries + uses: ./.github/actions/re-run patch_rve67: name: Patch Revanced Extended Android 6,7 if: ${{ github.event.inputs.org == 'Revanced Extended Android 6,7' || github.event.inputs.org == 'All' || inputs.org == 'Revanced Extended Android 6,7' }} diff --git a/README.md b/README.md index 3a56214..873240a 100644 --- a/README.md +++ b/README.md @@ -56,18 +56,6 @@ Download [x86_64](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-x86_64-ReX.apk) -### [ReX forked by rufusin:](https://github.com/rufusin/revanced-patches) - -[All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-ReX-rufusin.apk) - -[Arm64-v8a](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-arm64-v8a-ReX-rufusin.apk) - -[Armeabi-v7a](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-armeabi-v7a-ReX-rufusin.apk) - -[x86](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-x86-ReX-rufusin.apk) - -[x86_64](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-x86_64-ReX-rufusin.apk) - ### [ReX forked by anddea:](https://github.com/anddea/revanced-patches) [All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-ReX-anddea.apk) @@ -182,6 +170,12 @@ Download | ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | | [All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/twitter-revanced.apk) | [All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/twitter-beta-revanced.apk) | +### [Piko:](https://github.com/crimera/piko) + +| Stable version | Beta version | +| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| [All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/twitter-piko-stable.apk) | [All Architectures](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/twitter-piko-beta.apk) | + --- [![Instagram](https://img.shields.io/badge/Instagram-%23E4405F.svg?style=for-the-badge&logo=Instagram&logoColor=white)](https://play.google.com/store/apps/details?id=com.instagram.android) diff --git a/src/build/Piko.sh b/src/build/Piko.sh new file mode 100644 index 0000000..2839ec3 --- /dev/null +++ b/src/build/Piko.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Twitter Piko +source src/build/utils.sh + +# Patch Twitter Piko: +patch_piko () { + get_apk "twitter" "twitter" "x-corp/twitter/twitter" + dl_gh "revanced-patches revanced-cli" "revanced" "latest" + mv revanced-patches*.jar _revanced-patches*.jar + local v apk_name + if [[ "$1" == "latest" ]]; then + v="latest" apk_name="stable" + else + v="prerelease" apk_name="beta" + fi + get_patches_key "twitter-pico" + if [ -f "./download/twitter.apk" ]; then + dl_gh "piko revanced-integrations" "crimera" "$v" + green_log "[+] Patch Twitter Pico:" + eval java -jar revanced-cli*.jar patch \ + --patch-bundle _revanced-patches*.jar \ + --patch-bundle revanced-patches*.jar \ + --merge revanced-integrations*.apk \ + $excludePatches\ + $includePatches \ + --out=./release/twitter-piko-$apk_name.apk \ + --keystore=./src/ks.keystore \ + ./download/twitter.apk + else + red_log "[-] Not found Twitter.apk" + exit 1 + fi +} +patch_piko $1 \ No newline at end of file diff --git a/src/build/ReX-rufusin.sh b/src/build/ReX-rufusin.sh deleted file mode 100644 index 8a89b28..0000000 --- a/src/build/ReX-rufusin.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# ReX forked by rufusin build -source src/build/utils.sh - -################################################# - -# Download requirements -dl_gh " revanced-patches revanced-integrations" "rufusin" "latest" -dl_gh "revanced-cli" "inotia00" "latest" - -################################################# - -# Patch YouTube ReX rufusin: -get_patches_key "youtube-ReX-rufusin" -get_ver "Hide general ads" "com.google.android.youtube" -get_apk "youtube" "youtube" "google-inc/youtube/youtube" -patch "youtube" "ReX-rufusin" "inotia" - - -################################################# - -rm -f revanced-cli* -dl_gh "revanced-cli" "FiorenMas" "latest" -# Split architecture Youtube: -get_patches_key "youtube-ReX-rufusin" -for i in {0..3}; do - split_arch "youtube" "youtube-${archs[i]}-ReX-rufusin" "$(gen_rip_libs ${libs[i]})" -done - -################################################# \ No newline at end of file diff --git a/src/etc/ci.sh b/src/etc/ci.sh index c582965..582b29c 100644 --- a/src/etc/ci.sh +++ b/src/etc/ci.sh @@ -5,13 +5,13 @@ get_date() { json=$(wget -qO- "https://api.github.com/repos/$1/releases") case "$2" in latest) - updated_at=$(echo "$json" | jq -r 'first(.[] | select(.prerelease == false) | .assets[] | select(.name == "'$3'") | .updated_at)') + updated_at=$(echo "$json" | jq -r 'first(.[] | select(.prerelease == false) | .assets[] | select(.name | test("'$3'")) | .updated_at)') ;; prerelease) - updated_at=$(echo "$json" | jq -r 'first(.[] | select(.prerelease == true) | .assets[] | select(.name == "'$3'") | .updated_at)') + updated_at=$(echo "$json" | jq -r 'first(.[] | select(.prerelease == true) | .assets[] | select(.name | test("'$3'")) | .updated_at)') ;; *) - updated_at=$(echo "$json" | jq -r 'first(.[] | select(.tag_name == "'$2'") | .assets[] | select(.name == "'$3'") | .updated_at)') + updated_at=$(echo "$json" | jq -r 'first(.[] | select(.tag_name == "'$2'") | .assets[] | select(.name | test("'$3'")) | .updated_at)') ;; esac echo "$updated_at" @@ -19,7 +19,7 @@ get_date() { checker(){ local date1 date2 date1_sec date1_sec repo=$1 ur_repo=$repository check=$3 - date1=$(get_date "$repo" "$2" "patches.json") + date1=$(get_date "$repo" "$2" "^.*\\\.jar$") date2=$(get_date "$ur_repo" "all" "$check") date1_sec=$(date -d "$date1" +%s) date2_sec=$(date -d "$date2" +%s) diff --git a/src/patches/messenger/exclude-patches b/src/patches/messenger/exclude-patches index 1e38421..257a912 100644 --- a/src/patches/messenger/exclude-patches +++ b/src/patches/messenger/exclude-patches @@ -1 +1 @@ -Disable switching emoji to sticker \ No newline at end of file +Disable switching emoji to sticker diff --git a/src/patches/twitter-pico/exclude-patches b/src/patches/twitter-pico/exclude-patches new file mode 100644 index 0000000..9b391d8 --- /dev/null +++ b/src/patches/twitter-pico/exclude-patches @@ -0,0 +1 @@ +Unlock downloads diff --git a/src/patches/twitter-pico/include-patches b/src/patches/twitter-pico/include-patches new file mode 100644 index 0000000..d79f9ff --- /dev/null +++ b/src/patches/twitter-pico/include-patches @@ -0,0 +1,6 @@ +Hide Banner +Hide FAB +Hide FAB Menu Buttons +Hide Promoted Trends +Hide Community Notes +Google Ads Patch diff --git a/src/patches/vsco/exclude-patches b/src/patches/vsco/exclude-patches deleted file mode 100644 index 8b13789..0000000 --- a/src/patches/vsco/exclude-patches +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/patches/vsco/include-patches b/src/patches/vsco/include-patches deleted file mode 100644 index 8b13789..0000000 --- a/src/patches/vsco/include-patches +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/patches/youtube-ReX-rufusin/exclude-patches b/src/patches/youtube-ReX-rufusin/exclude-patches deleted file mode 100644 index 99e8f40..0000000 --- a/src/patches/youtube-ReX-rufusin/exclude-patches +++ /dev/null @@ -1,18 +0,0 @@ -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 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 -Custom seekbar color diff --git a/src/patches/youtube-ReX-rufusin/include-patches b/src/patches/youtube-ReX-rufusin/include-patches deleted file mode 100644 index 8b13789..0000000 --- a/src/patches/youtube-ReX-rufusin/include-patches +++ /dev/null @@ -1 +0,0 @@ -