From 829098d362cd10903fda5e1ddd1e21aa6c28645f Mon Sep 17 00:00:00 2001 From: siritami <102145692+FiorenMas@users.noreply.github.com> Date: Thu, 14 Sep 2023 22:47:53 +0700 Subject: [PATCH] added Tasker, Novalauncher Because the patching time of revanced.sh is too long, I split it into 3 .sh files and ran them with 3 more runners to speed up the patching time. --- .github/workflows/patch.yml | 118 ++++++++++++++++- README.md | 16 ++- src/build/ReX.sh | 1 - src/build/Revanced-1.sh | 46 +++++++ src/build/Revanced-2.sh | 62 +++++++++ src/build/Revanced-3.sh | 59 +++++++++ src/build/Revanced-Extended-Android-6-7.sh | 3 +- src/build/Revanced-Extended.sh | 1 - src/build/Revanced.sh | 140 --------------------- src/build/utils.sh | 27 ++-- src/patches/tasker/exclude-patches | 1 + src/patches/tasker/include-patches | 1 + 12 files changed, 310 insertions(+), 165 deletions(-) create mode 100644 src/build/Revanced-1.sh create mode 100644 src/build/Revanced-2.sh create mode 100644 src/build/Revanced-3.sh delete mode 100644 src/build/Revanced.sh create mode 100644 src/patches/tasker/exclude-patches create mode 100644 src/patches/tasker/include-patches diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index ac7232a..4dac995 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: patch1: - name: Patch Revanced + name: Patch Revanced-1 permissions: write-all runs-on: ubuntu-latest steps: @@ -19,7 +19,7 @@ jobs: java-version: '17' - name: Patch apk - run: bash src/build/Revanced.sh + run: bash src/build/Revanced-1.sh env: repository: ${{ github.repository }} @@ -61,6 +61,116 @@ jobs: keep_minimum_runs: 10 patch2: + name: Patch Revanced-2 + permissions: write-all + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up jdk + uses: actions/setup-java@v3.11.0 + with: + distribution: 'zulu' + java-version: '17' + + - name: Patch apk + run: bash src/build/Revanced-2.sh + env: + repository: ${{ github.repository }} + + - name: Generate release info + run: | + echo " + **Change log** :point_down: + [Revanced](https://github.com/revanced/revanced-patches/releases/latest) + [Revanced Extended](https://github.com/inotia00/revanced-patches/releases/latest) + [Revanced Extended for Android 6 & 7](https://github.com/kitadai31/revanced-patches-android6-7/releases/latest) + "> ${{ github.workspace }}-CHANGELOG.txt + + - name: Release + uses: softprops/action-gh-release@v0.1.15 + with: + files: | + ./build/* + revanced-version.txt + name: Revanced & Revanced Extended + tag_name: all + body_path: ${{ github.workspace }}-CHANGELOG.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete older releases + uses: dev-drprasad/delete-older-releases@v0.2.1 + with: + keep_latest: 1 + delete_tags: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete workflow runs + uses: Mattraks/delete-workflow-runs@v2 + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: 0 + keep_minimum_runs: 10 + + patch3: + name: Patch Revanced-3 + permissions: write-all + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up jdk + uses: actions/setup-java@v3.11.0 + with: + distribution: 'zulu' + java-version: '17' + + - name: Patch apk + run: bash src/build/Revanced-3.sh + env: + repository: ${{ github.repository }} + + - name: Generate release info + run: | + echo " + **Change log** :point_down: + [Revanced](https://github.com/revanced/revanced-patches/releases/latest) + [Revanced Extended](https://github.com/inotia00/revanced-patches/releases/latest) + [Revanced Extended for Android 6 & 7](https://github.com/kitadai31/revanced-patches-android6-7/releases/latest) + "> ${{ github.workspace }}-CHANGELOG.txt + + - name: Release + uses: softprops/action-gh-release@v0.1.15 + with: + files: | + ./build/* + revanced-version.txt + name: Revanced & Revanced Extended + tag_name: all + body_path: ${{ github.workspace }}-CHANGELOG.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete older releases + uses: dev-drprasad/delete-older-releases@v0.2.1 + with: + keep_latest: 1 + delete_tags: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete workflow runs + uses: Mattraks/delete-workflow-runs@v2 + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: 0 + keep_minimum_runs: 10 + + patch4: name: Patch Revanced Extended permissions: write-all runs-on: ubuntu-latest @@ -99,7 +209,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - patch3: + patch5: name: Patch ReX permissions: write-all runs-on: ubuntu-latest @@ -154,7 +264,7 @@ jobs: retain_days: 0 keep_minimum_runs: 15 - patch4: + patch6: name: Patch Revanced Extended for Android 6 & 7 permissions: write-all runs-on: ubuntu-latest diff --git a/README.md b/README.md index 1f8e451..8a300f3 100644 --- a/README.md +++ b/README.md @@ -130,16 +130,12 @@ Download [Arm64-v8a](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/instagram-arm64-v8a-revanced.apk) -[Armeabi-v7a](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/instagram-armeabi-v7a-revanced.apk) - --- [![Messenger](https://img.shields.io/badge/Messenger-00B2FF?style=for-the-badge&logo=messenger&logoColor=white)](https://play.google.com/store/apps/details?id=com.facebook.orca) [Arm64-v8a](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/messenger-arm64-v8a-revanced.apk) -[Armeabi-v7a](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/messenger-armeabi-v7a-revanced.apk) - --- [![TikTok](https://img.shields.io/badge/TikTok-%23000000.svg?style=for-the-badge&logo=TikTok&logoColor=white)](https://play.google.com/store/apps/details?id=com.ss.android.ugc.trill) @@ -184,6 +180,18 @@ Download --- +### [Nova Launcher:](https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher) + +[All Architecture](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/nova-launcher-revanced.apk) + +--- + +### [Tasker:](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) + +[All Architecture](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/tasker-revanced.apk) + +--- + # ⚠️ License: [@luxysiv](https://github.com/luxysiv/yt-revanced-nonroot) - [GPL-3.0](https://github.com/luxysiv/revanced-nonroot/blob/main/LICENSE) diff --git a/src/build/ReX.sh b/src/build/ReX.sh index 44f3df5..386cc14 100644 --- a/src/build/ReX.sh +++ b/src/build/ReX.sh @@ -12,7 +12,6 @@ checker "YT-Advanced/ReX-patches" "ReX" # Download requirements dl_gh "ReX-patches ReX-integrations" "YT-Advanced" "latest" dl_gh "revanced-cli" "revanced" "latest" -dl_htmlq ################################################# diff --git a/src/build/Revanced-1.sh b/src/build/Revanced-1.sh new file mode 100644 index 0000000..059f0dd --- /dev/null +++ b/src/build/Revanced-1.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Revanced build +source ./src/build/utils.sh + +################################################# + +# Checking new patch +checker "revanced/revanced-patches" "revanced" + +################################################# + +# Download requirements +dl_gh "revanced-patches revanced-cli revanced-integrations" "revanced" "latest" + +################################################# + +# Patch YouTube: +get_patches_key "youtube-revanced" +get_ver "Video ads" "com.google.android.youtube" +get_apk "youtube" "youtube" "google-inc/youtube/youtube" +patch "youtube" "revanced" + +################################################# + +# Patch YouTube Music: +# Arm64-v8a +get_patches_key "youtube-music-revanced" +get_apk "youtube-music-arm64-v8a" "youtube-music" "google-inc/youtube-music/youtube-music" "arm64-v8a" +patch "youtube-music-arm64-v8a" "revanced" +# Armeabi-v7a +get_patches_key "youtube-music-revanced" +get_apk "youtube-music-armeabi-v7a" "youtube-music" "google-inc/youtube-music/youtube-music" "armeabi-v7a" +patch "youtube-music-armeabi-v7a" "revanced" + +################################################# + +# Split architecture: +rm -f revanced-cli* revanced-patches*.jar patches.json +dl_gh "revanced-cli" "j-hc" "latest" +dl_gh "revanced-patches" "revanced" "latest" +# Split architecture Youtube: +for i in {0..3}; do + split_arch "youtube-revanced" "youtube-${archs[i]}-revanced" "$(gen_rip_libs ${libs[i]})" +done + +################################################# \ No newline at end of file diff --git a/src/build/Revanced-2.sh b/src/build/Revanced-2.sh new file mode 100644 index 0000000..f7f4b78 --- /dev/null +++ b/src/build/Revanced-2.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# Revanced build +source ./src/build/utils.sh + +################################################# + +# Checking new patch +checker "revanced/revanced-patches" "revanced" + +################################################# + +# Download requirements +dl_gh "revanced-patches revanced-cli revanced-integrations" "revanced" "latest" + +################################################# + +# Patch Instagram: +# Arm64-v8a +get_patches_key "instagram" +get_ver "Hide timeline ads" "com.instagram.android" +get_apk "instagram-arm64-v8a" "instagram-instagram" "instagram/instagram-instagram/instagram-instagram" "arm64-v8a" +patch "instagram-arm64-v8a" "revanced" + +################################################# + +# Patch Messenger: +# Arm64-v8a +get_patches_key "messenger" +get_apk "messenger-arm64-v8a" "messenger" "facebook-2/messenger/messenger" "arm64-v8a" +patch "messenger-arm64-v8a" "revanced" + +################################################# + +# Patch Twitter: +get_patches_key "twitter" +get_apk "twitter" "twitter" "x-corp/twitter/twitter" +patch "twitter" "revanced" + +################################################# + +# Patch Twitch: +get_patches_key "twitch" +get_ver "Block video ads" "tv.twitch.android.app" +get_apk "twitch" "twitch" "twitch-interactive-inc/twitch/twitch" +patch "twitch" "revanced" + +################################################# + +# Patch Reddit: +get_patches_key "reddit" +get_apk "reddit" "reddit" "redditinc/reddit/reddit" +patch "reddit" "revanced" + +################################################# + +# Patch Tiktok: +get_patches_key "tiktok" +version="30.5.2" +get_apk "tiktok" "tik-tok-including-musical-ly" "tiktok-pte-ltd/tik-tok-including-musical-ly/tik-tok-including-musical-ly" +patch "tiktok" "revanced" + +################################################# \ No newline at end of file diff --git a/src/build/Revanced-3.sh b/src/build/Revanced-3.sh new file mode 100644 index 0000000..782ca72 --- /dev/null +++ b/src/build/Revanced-3.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Revanced build +source ./src/build/utils.sh + +################################################# + +# Checking new patch +checker "revanced/revanced-patches" "revanced" + +################################################# + +# Download requirements +dl_gh "revanced-patches revanced-cli revanced-integrations" "revanced" "latest" + +################################################# + +# Patch Pixiv: +get_patches_key "pixiv" +get_apk "pixiv" "pixiv" "pixiv-inc/pixiv/pixiv" +patch "pixiv" "revanced" + +################################################# + +# Patch Lightroom: +get_patches_key "lightroom" +get_apk "lightroom" "lightroom" "adobe/lightroom/lightroom" +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" +patch "windy" "revanced" + +################################################# + +rm -f patches*.json revanced-patches*.jar revanced-integrations*.apk revanced-cli*.jar +dl_gh "revanced-patches" "revanced" "tags/v2.187.0" +dl_gh "revanced-integrations" "revanced" "tags/v0.115.1" +dl_gh "revanced-cli" "revanced" "tags/v2.22.0" + +################################################# + +#Patch Tasker: +get_patches_key "tasker" +#version="6.2.12-rc" +get_apk "tasker" "tasker" "joaomgcd/tasker/tasker" +_patch "tasker" "revanced" + +################################################# + +#Patch Nova Launcher: +get_patches_key "nova-launcher" +#version="8.0.6" +get_apk "nova-launcher" "nova-launcher" "teslacoil-software/nova-launcher/nova-launcher" +_patch "nova-launcher" "revanced" + +################################################# \ No newline at end of file diff --git a/src/build/Revanced-Extended-Android-6-7.sh b/src/build/Revanced-Extended-Android-6-7.sh index 90f459e..51598a6 100644 --- a/src/build/Revanced-Extended-Android-6-7.sh +++ b/src/build/Revanced-Extended-Android-6-7.sh @@ -12,7 +12,6 @@ checker "kitadai31/revanced-patches-android6-7" "revanced-extended-android-6-7" # Download requirements dl_gh "revanced-patches-android6-7 revanced-integrations" "kitadai31" "latest" dl_gh "revanced-cli" "revanced" "latest" -dl_htmlq ################################################# @@ -33,4 +32,4 @@ for i in {0..3}; do split_arch "youtube-revanced-extended-android-6-7" "youtube-${archs[i]}-revanced-extended-android-6-7" "$(gen_rip_libs ${libs[i]})" done -################################################# +################################################# \ No newline at end of file diff --git a/src/build/Revanced-Extended.sh b/src/build/Revanced-Extended.sh index 4ed2610..8a26166 100644 --- a/src/build/Revanced-Extended.sh +++ b/src/build/Revanced-Extended.sh @@ -11,7 +11,6 @@ checker "inotia00/revanced-patches" "revanced-extended" # Download requirements dl_gh "revanced-patches revanced-cli revanced-integrations" "inotia00" "latest" -dl_htmlq ################################################# diff --git a/src/build/Revanced.sh b/src/build/Revanced.sh deleted file mode 100644 index 72c569d..0000000 --- a/src/build/Revanced.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/bash -# Revanced build -source ./src/build/utils.sh - -################################################# - -# Checking new patch -checker "revanced/revanced-patches" "revanced" - -################################################# - -# Download requirements -dl_gh "revanced-patches revanced-cli revanced-integrations" "revanced" "latest" -dl_htmlq - -################################################# - -# Patch YouTube: -get_patches_key "youtube-revanced" -get_ver "Video ads" "com.google.android.youtube" -get_apk "youtube" "youtube" "google-inc/youtube/youtube" -patch "youtube" "revanced" - -################################################# - -# Patch YouTube Music: -# Arm64-v8a -get_patches_key "youtube-music-revanced" -get_apk "youtube-music-arm64-v8a" "youtube-music" "google-inc/youtube-music/youtube-music" "arm64-v8a" -patch "youtube-music-arm64-v8a" "revanced" -# Armeabi-v7a -get_patches_key "youtube-music-revanced" -get_apk "youtube-music-armeabi-v7a" "youtube-music" "google-inc/youtube-music/youtube-music" "armeabi-v7a" -patch "youtube-music-armeabi-v7a" "revanced" - -################################################# - -# Patch Instagram: -# Arm64-v8a -get_patches_key "instagram" -get_ver "Hide timeline ads" "com.instagram.android" -get_apk "instagram-arm64-v8a" "instagram-instagram" "instagram/instagram-instagram/instagram-instagram" "arm64-v8a" -patch "instagram-arm64-v8a" "revanced" - -################################################# - -# Patch Messenger: -# Arm64-v8a -get_patches_key "messenger" -get_apk "messenger-arm64-v8a" "messenger" "facebook-2/messenger/messenger" "arm64-v8a" -patch "messenger-arm64-v8a" "revanced" -# Armeabi-v7a -get_patches_key "messenger" -get_apk "messenger-armeabi-v7a" "messenger" "facebook-2/messenger/messenger" "armeabi-v7a" -patch "messenger-armeabi-v7a" "revanced" - -################################################# - -# Patch Twitter: -get_patches_key "twitter" -get_apk "twitter" "twitter" "x-corp/twitter/twitter" -patch "twitter" "revanced" - -################################################# - -# Patch Twitch: -get_patches_key "twitch" -get_ver "Block video ads" "tv.twitch.android.app" -get_apk "twitch" "twitch" "twitch-interactive-inc/twitch/twitch" -patch "twitch" "revanced" - -################################################# - -# Patch Reddit: -get_patches_key "reddit" -get_apk "reddit" "reddit" "redditinc/reddit/reddit" -patch "reddit" "revanced" - -################################################# - -# Patch Tiktok: -get_patches_key "tiktok" -version="30.5.2" -get_apk "tiktok" "tik-tok-including-musical-ly" "tiktok-pte-ltd/tik-tok-including-musical-ly/tik-tok-including-musical-ly" -patch "tiktok" "revanced" - -################################################# - -# Patch Pixiv: -get_patches_key "pixiv" -#get_ver "Hide ads" "jp.pxv.android" -get_apk "pixiv" "pixiv" "pixiv-inc/pixiv/pixiv" -patch "pixiv" "revanced" - -################################################# - -# Patch Lightroom: -get_patches_key "lightroom" -get_apk "lightroom" "lightroom" "adobe/lightroom/lightroom" -patch "lightroom" "revanced" - -################################################# - -# Patch Nova Launcher: -#get_patches_key "nova-launcher" -#get_apk "nova-launcher" "nova-launcher" "teslacoil-software/nova-launcher/nova-launcher" -#patch "nova-launcher" "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" -patch "windy" "revanced" - -################################################# - -# Split architecture: -rm -f revanced-cli* revanced-patches*.jar patches.json -dl_gh "revanced-cli" "j-hc" "latest" -dl_gh "revanced-patches" "revanced" "latest" -# Split architecture Youtube: -for i in {0..3}; do - split_arch "youtube-revanced" "youtube-${archs[i]}-revanced" "$(gen_rip_libs ${libs[i]})" -done - -################################################# - -# Patch Instagram: -# Armeabi-v7a -rm -f patches*.json revanced-patches*.jar revanced-integrations*.apk revanced-cli*.jar -dl_gh "revanced-patches" "revanced" "tags/v2.175.0" -dl_gh "revanced-integrations" "revanced" "tags/v0.109.0" -dl_gh "revanced-cli" "revanced" "tags/v2.21.2" -get_patches_key "instagram" -version="271.1.0.21.84" -get_apk "instagram-armeabi-v7a" "instagram-instagram" "instagram/instagram-instagram/instagram-instagram" "armeabi-v7a" -_patch "instagram-armeabi-v7a" "revanced" - -################################################# diff --git a/src/build/utils.sh b/src/build/utils.sh index fb26181..7db3cb8 100644 --- a/src/build/utils.sh +++ b/src/build/utils.sh @@ -88,22 +88,23 @@ _req() { wget -nv -O "$dlp" --header="$3" "$1" || return 1 fi } -req() { _req "$1" "$2" "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0"; } +req() { + user_agents=("User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0" "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/114.0" "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/112.0" "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/116.0" "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0") + random_user_agent=$(shuf -n 1 -e "${user_agents[@]}") + _req "$1" "$2" "$random_user_agent" +} + dl_apk() { - local url=$1 regexp=$2 output=$3 resp + local url=$1 regexp=$2 output=$3 url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n "s/href=\"/@/g; s;.*${regexp}.*;\1;p")" + sleep 5 echo "$url" - url=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "a.accent_bg.btn") - sleep 10 - resp=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "span > a[rel = nofollow]") - if [[ -z $resp ]]; then - url=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "a.accent_bg.btn") - sleep 10 - url=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "span > a[rel = nofollow]") - else - url=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "span > a[rel = nofollow]") - fi + url="https://www.apkmirror.com$(req "$url" - | grep "downloadButton" | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')" + sleep 5 + url="https://www.apkmirror.com$(req "$url" - | grep "please click" | sed -n 's#.*href="\(.*key=[^"]*\)">.*#\1#;s#amp;##p')&forcebaseapk=true" + sleep 5 + echo "$url" req "$url" "$output" } @@ -123,7 +124,7 @@ get_apk() { if [[ -z $version ]]; then local list_ver list_ver=$(req "https://www.apkmirror.com/uploads/?appcategory=$2" -) - version=$(sed -n 's;.*Version:\(.*\) .*;\1;p' <<<"$list_ver" | grep -v 'beta\|alpha' | head -n 1) + version=$(sed -n 's;.*Version:\(.*\) .*;\1;p' <<<"$list_ver" | grep -v 'beta\|alpha' | head -n 1) fi local base_apk="$1.apk" local dl_url=$(dl_apk "https://www.apkmirror.com/apk/$3-${version//./-}-release/" \ diff --git a/src/patches/tasker/exclude-patches b/src/patches/tasker/exclude-patches new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/patches/tasker/exclude-patches @@ -0,0 +1 @@ + diff --git a/src/patches/tasker/include-patches b/src/patches/tasker/include-patches new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/patches/tasker/include-patches @@ -0,0 +1 @@ +