mirror of
https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root.git
synced 2025-12-06 08:07:40 +00:00
+app
This commit is contained in:
70
.github/workflows/patch.yml
vendored
70
.github/workflows/patch.yml
vendored
@@ -16,10 +16,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
|
|
||||||
- name: Patch apk
|
- name: Patch Youtube Revanced & Revanced Extended non-root
|
||||||
run: bash ./src/patch.sh
|
run: bash src/yt/patch.sh
|
||||||
|
|
||||||
|
- name: Patch Youtube Music Revanced & Revanced Extended non-root
|
||||||
|
run: bash src/ytm/patch.sh
|
||||||
|
|
||||||
|
- name: Patch Tiktok Revanced
|
||||||
|
run: bash src/tiktok/patch.sh
|
||||||
|
|
||||||
|
- name: Patch Twitch Revanced
|
||||||
|
run: bash src/twitch/patch.sh
|
||||||
|
|
||||||
|
- name: Patch Facebook Messenger Revanced
|
||||||
|
run: bash src/messenger/patch.sh
|
||||||
|
|
||||||
- name: Generate Changelog
|
- name: Generate Changelog
|
||||||
run: |
|
run: |
|
||||||
curl -s https://api.github.com/repos/revanced/revanced-patches/releases/latest \
|
curl -s https://api.github.com/repos/revanced/revanced-patches/releases/latest \
|
||||||
@@ -56,14 +68,14 @@ jobs:
|
|||||||
echo "INFO-YT-RVE=Youtube Revanced Extended v${YTRVEVERSION}" >> $GITHUB_ENV
|
echo "INFO-YT-RVE=Youtube Revanced Extended v${YTRVEVERSION}" >> $GITHUB_ENV
|
||||||
echo "INFO-YTM-RV=Youtube Music Revanced v${YTMRVVERSION}" >> $GITHUB_ENV
|
echo "INFO-YTM-RV=Youtube Music Revanced v${YTMRVVERSION}" >> $GITHUB_ENV
|
||||||
echo "INFO-YTM-RVE=Youtube Music Revanced Extended v${YTMRVEVERSION}" >> $GITHUB_ENV
|
echo "INFO-YTM-RVE=Youtube Music Revanced Extended v${YTMRVEVERSION}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: vishnudxb/cancel-workflow@v1.2
|
- uses: vishnudxb/cancel-workflow@v1.2
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
repo: octocat/hello-world
|
repo: octocat/hello-world
|
||||||
workflow_id: ${{ github.run_id }}
|
workflow_id: ${{ github.run_id }}
|
||||||
access_token: ${{ github.token }}
|
access_token: ${{ github.token }}
|
||||||
|
|
||||||
- name: Delete Release
|
- name: Delete Release
|
||||||
uses: dev-drprasad/delete-older-releases@v0.2.1
|
uses: dev-drprasad/delete-older-releases@v0.2.1
|
||||||
with:
|
with:
|
||||||
@@ -72,27 +84,27 @@ jobs:
|
|||||||
delete_tags: false
|
delete_tags: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Release Youtube Music Revanced
|
- name: Release Youtube Music Revanced
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: ytms-revanced.apk
|
files: ytm-revanced.apk
|
||||||
name: ${{ env.INFO-YTM-RV }}
|
name: ${{ env.INFO-YTM-RV }}
|
||||||
tag_name: YTM-Revanced
|
tag_name: YTM-Revanced
|
||||||
body_path: ${{ github.workspace }}-CHANGELOG-rv.txt
|
body_path: ${{ github.workspace }}-CHANGELOG-rv.txt
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Release Youtube Music Revanced Extended
|
- name: Release Youtube Music Revanced Extended
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: ytms-revanced-extended.apk
|
files: ytm-revanced-extended.apk
|
||||||
name: ${{ env.INFO-YTM-RVE }}
|
name: ${{ env.INFO-YTM-RVE }}
|
||||||
tag_name: YTM-Revanced-Extended
|
tag_name: YTM-Revanced-Extended
|
||||||
body_path: ${{ github.workspace }}-CHANGELOG-rve.txt
|
body_path: ${{ github.workspace }}-CHANGELOG-rve.txt
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Release Youtube Revanced
|
- name: Release Youtube Revanced
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
@@ -102,7 +114,7 @@ jobs:
|
|||||||
body_path: ${{ github.workspace }}-CHANGELOG-rv.txt
|
body_path: ${{ github.workspace }}-CHANGELOG-rv.txt
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Release Youtube Revanced Extended
|
- name: Release Youtube Revanced Extended
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
@@ -111,8 +123,38 @@ jobs:
|
|||||||
tag_name: YT-Revanced-Extended
|
tag_name: YT-Revanced-Extended
|
||||||
body_path: ${{ github.workspace }}-CHANGELOG-rve.txt
|
body_path: ${{ github.workspace }}-CHANGELOG-rve.txt
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Release Tiktok Revanced
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: Tiktok.apk
|
||||||
|
name: "Tiktok"
|
||||||
|
tag_name: Tiktok-Revanced
|
||||||
|
body_path: ${{ github.workspace }}-CHANGELOG-rv.txt
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Release Twitch Revanced
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: Twitch.apk
|
||||||
|
name: "Twitch"
|
||||||
|
tag_name: Twitch-Revanced
|
||||||
|
body_path: ${{ github.workspace }}-CHANGELOG-rv.txt
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Release Facebook Messenger Revanced
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: Messenger.apk
|
||||||
|
name: "Facebook Messenger"
|
||||||
|
tag_name: Facebook-Messenger-Revanced
|
||||||
|
body_path: ${{ github.workspace }}-CHANGELOG-rv.txt
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Delete workflow runs
|
- name: Delete workflow runs
|
||||||
uses: Mattraks/delete-workflow-runs@v2
|
uses: Mattraks/delete-workflow-runs@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -1,21 +1,35 @@
|
|||||||
<p align="center"> <img src="https://raw.githubusercontent.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/main/Banner.png" /> </p>
|
<p align="center"> <img src="https://raw.githubusercontent.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/main/Banner.png" /> </p>
|
||||||
|
|
||||||
|
# MicroG from inotia00 source:
|
||||||
|
|
||||||
|
[](https://github.com/inotia00/VancedMicroG/releases/latest/download/microg.apk)
|
||||||
|
|
||||||
|
# Youtube Music:
|
||||||
|
|
||||||
|
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/YTM-Revanced-Extended/ytm-revanced-extended.apk)
|
||||||
|
|
||||||
|
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/YTM-Revanced/ytm-revanced.apk)
|
||||||
|
|
||||||
# Youtube:
|
# Youtube:
|
||||||
|
|
||||||
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/YT-Revanced-Extended/yt-revanced-extended.apk)
|
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/YT-Revanced-Extended/yt-revanced-extended.apk)
|
||||||
|
|
||||||
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/YT-Revanced/yt-revanced.apk)
|
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/YT-Revanced/yt-revanced.apk)
|
||||||
|
|
||||||
# Youtube Music:
|
# Facebook Messenger:
|
||||||
|
|
||||||
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/YTM-Revanced-Extended/ytms-revanced-extended.apk)
|
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/Facebook-Messenger-Revanced/Messenger.apk)
|
||||||
|
|
||||||
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/YTM-Revanced/ytms-revanced.apk)
|
# TikTok:
|
||||||
|
|
||||||
|
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/Tiktok-Revanced/Tiktok.apk)
|
||||||
|
|
||||||
# MicroG from inotia00 source:
|
# Twitch:
|
||||||
|
|
||||||
[](https://github.com/inotia00/VancedMicroG/releases/latest/download/microg.apk)
|
[](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/Twitch-Revanced/Twitch.apk)
|
||||||
|
|
||||||
# About
|
# License:
|
||||||
This repository forked from [@luxysiv](https://github.com/luxysiv/yt-revanced-nonroot)
|
|
||||||
|
[@luxysiv](https://github.com/luxysiv/yt-revanced-nonroot) - [GPL-3.0](https://github.com/luxysiv/revanced-nonroot/blob/main/LICENSE)
|
||||||
|
|
||||||
|
[apkeep](https://github.com/EFForg/apkeep) - [MIT](https://github.com/EFForg/apkeep/blob/master/LICENSE)
|
||||||
118
src/config.sh
118
src/config.sh
@@ -1,118 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Function prepare patches keywords
|
|
||||||
get_patch() {
|
|
||||||
local excluded_start=$(grep -n -m1 'EXCLUDE PATCHES' "$patch_file" | cut -d':' -f1)
|
|
||||||
local included_start=$(grep -n -m1 'INCLUDE PATCHES' "$patch_file" | cut -d':' -f1)
|
|
||||||
local excluded_patches=$(tail -n +$excluded_start $patch_file | head -n "$(( included_start - excluded_start ))" | grep '^[^#[:blank:]]')
|
|
||||||
local included_patches=$(tail -n +$included_start $patch_file | grep '^[^#[:blank:]]')
|
|
||||||
patches=()
|
|
||||||
if [[ -n "$excluded_patches" ]]; then
|
|
||||||
while read -r patch; do
|
|
||||||
patches+=("-e $patch")
|
|
||||||
done <<< "$excluded_patches"
|
|
||||||
fi
|
|
||||||
if [[ -n "$included_patches" ]]; then
|
|
||||||
while read -r patch; do
|
|
||||||
patches+=("-i $patch")
|
|
||||||
done <<< "$included_patches"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
# Function download latest github releases
|
|
||||||
download_latest_release() {
|
|
||||||
echo "🔽 Downloading $name resources"
|
|
||||||
for repo in revanced-patches revanced-cli revanced-integrations; do
|
|
||||||
local url="https://api.github.com/repos/$user/$repo/releases/latest"
|
|
||||||
echo "🔍 Searching for download link at $url"
|
|
||||||
curl -s "$url" | jq -r '.assets[] | "\(.name) \(.browser_download_url)"' | while read name download_url; do
|
|
||||||
echo "📥 Downloading $name from $download_url"
|
|
||||||
curl -O -s -L "$download_url"
|
|
||||||
echo "✅ Download $name complete!"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
}
|
|
||||||
# Function download YouTube and YouTube Music apk from APKmirror
|
|
||||||
req() {
|
|
||||||
curl -sSL -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:111.0) Gecko/20100101 Firefox/111.0" "$1" -o "$2"
|
|
||||||
}
|
|
||||||
dl_yt() {
|
|
||||||
rm -rf $2
|
|
||||||
echo "🔽 Downloading YouTube version $1"
|
|
||||||
url="https://www.apkmirror.com/apk/google-inc/youtube/youtube-${1//./-}-release/"
|
|
||||||
echo "🔍 Searching for download link at $url"
|
|
||||||
url="$url$(req "$url" - | grep Variant -A50 | grep ">APK<" -A2 | grep android-apk-download | sed "s#.*-release/##g;s#/\#.*##g")"
|
|
||||||
url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
|
|
||||||
url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
|
|
||||||
echo "📥 Downloading from $url"
|
|
||||||
if req "$url" "$2" ; then
|
|
||||||
echo "✅ Download complete!"
|
|
||||||
else
|
|
||||||
echo "❌ Download failed."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
dl_ytms() {
|
|
||||||
rm -rf $2
|
|
||||||
echo "🔽 Downloading YouTube Music version $1"
|
|
||||||
url="https://www.apkmirror.com/apk/google-inc/youtube/youtube-music-${1//./-}-release/"
|
|
||||||
echo "🔍 Searching for download link at $url"
|
|
||||||
url="$url$(req "$url" - | grep arm64 -A30 | grep youtube-music | head -1 | sed "s#.*-release/##g;s#/\".*##g")"
|
|
||||||
url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
|
|
||||||
url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
|
|
||||||
echo "📥 Downloading from $url"
|
|
||||||
if req "$url" "$2" ; then
|
|
||||||
echo "✅ Download complete!"
|
|
||||||
else
|
|
||||||
echo "❌ Download failed."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
# Function fletch latest supported version can patch
|
|
||||||
get_support_ytversion() {
|
|
||||||
if [[ "$name" = "$revanced_name" ]] ; then
|
|
||||||
ytversion=$(jq -r '.[] | select(.name == "video-ads") | .compatiblePackages[] | select(.name == "com.google.android.youtube") | .versions[-1]' patches.json)
|
|
||||||
echo "✅️ Found YouTube version: $ytversion"
|
|
||||||
else
|
|
||||||
ytversion=$(jq -r '.[] | select(.name == "hide-general-ads") | .compatiblePackages[] | select(.name == "com.google.android.youtube") | .versions[-1]' patches.json)
|
|
||||||
echo "✅️ Found YouTube version: $ytversion"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
get_support_ytmsversion() {
|
|
||||||
ytmsversion=$(jq -r '.[] | select(.name == "hide-get-premium") | .compatiblePackages[] | select(.name == "com.google.android.apps.youtube.music") | .versions[-1]' patches.json)
|
|
||||||
echo "✅️ Found YouTube Music version: $ytmsversion"
|
|
||||||
}
|
|
||||||
get_latest_ytmsversion() {
|
|
||||||
url="https://www.apkmirror.com/apk/google-inc/youtube-music/"
|
|
||||||
ytmsversion=$(req "$url" - | grep "All version" -A200 | grep app_release | sed 's:.*/youtube-music-::g;s:-release/.*::g;s:-:.:g' | sort -r | head -1)
|
|
||||||
echo "✅️ Found YouTube Music version: $ytmsversion"
|
|
||||||
}
|
|
||||||
# Function Patch APK
|
|
||||||
patch_yt() {
|
|
||||||
if [ -f "youtube-v$ytversion.apk" ]; then
|
|
||||||
echo "⚙️ Patching YouTube"
|
|
||||||
java -jar revanced-cli*.jar -m revanced-integrations*.apk -b revanced-patches*.jar -a youtube-v$ytversion.apk ${patches[@]} --keystore=ks.keystore -o yt-$name.apk
|
|
||||||
echo "✅ Patch Complete!"
|
|
||||||
else
|
|
||||||
echo "❌ YouTube APK not found, skipping patching"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
patch_msrv() {
|
|
||||||
if [ -f "youtube-music-v$ytmsversion.apk" ]; then
|
|
||||||
echo "⚙️ Patching YouTube Music"
|
|
||||||
java -jar revanced-cli*.jar -m revanced-integrations*.apk -b revanced-patches*.jar -a youtube-music-v$ytmsversion.apk --keystore=ks.keystore -o ytms-$name.apk
|
|
||||||
echo "✅ Patch Complete!"
|
|
||||||
else
|
|
||||||
echo "❌ YouTube Music APK not found, skipping patching"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
patch_msrve() {
|
|
||||||
if [ -f "youtube-music-v$ytmsversion.apk" ]; then
|
|
||||||
echo "⚙️ Patching YouTube Music"
|
|
||||||
java -jar revanced-cli*.jar -m revanced-integrations*.apk -b revanced-patches*.jar -a youtube-music-v$ytmsversion.apk -e custom-branding-music-afn-red --keystore=ks.keystore -o ytms-$name.apk
|
|
||||||
echo "✅ Patch Complete!"
|
|
||||||
else
|
|
||||||
echo "❌ YouTube Music APK not found, skipping patching"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
# Function clean caches to new build
|
|
||||||
clean_cache() {
|
|
||||||
echo "🧹 Clean cache"
|
|
||||||
rm -f revanced-cli*.jar revanced-integrations*.apk revanced-patches*.jar patches.json options.toml youtube*.apk
|
|
||||||
}
|
|
||||||
0
src/messenger/exclude-patches.txt
Normal file
0
src/messenger/exclude-patches.txt
Normal file
12
src/messenger/patch.sh
Normal file
12
src/messenger/patch.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
DIR_TMP="$(mktemp -d)"
|
||||||
|
for repos in revanced-patches revanced-cli revanced-integrations; do
|
||||||
|
curl -s "https://api.github.com/repos/revanced/$repos/releases/latest" | jq -r '.assets[].browser_download_url' | xargs -n 1 curl -sL -O
|
||||||
|
done
|
||||||
|
EXCLUDE_PATCHES=()
|
||||||
|
for word in $(cat src/messenger/exclude-patches.txt) ; do
|
||||||
|
EXCLUDE_PATCHES+=("-e $word")
|
||||||
|
done
|
||||||
|
curl --retry 10 --retry-max-time 60 -H "Cache-Control: no-cache" -fsSL github.com/EFForg/apkeep/releases/latest/download/apkeep-x86_64-unknown-linux-gnu -o ${DIR_TMP}/apkkeep
|
||||||
|
chmod +x ${DIR_TMP}/apkkeep && ${DIR_TMP}/apkkeep -a com.facebook.orca .
|
||||||
|
java -jar revanced-cli*.jar -m revanced-integrations*.apk -b revanced-patches*.jar ${EXCLUDE_PATCHES[@]} -a com.facebook.orca.apk --keystore=ks.keystore -o Messenger.apk
|
||||||
50
src/patch.sh
50
src/patch.sh
@@ -1,50 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
source ./src/config.sh
|
|
||||||
# Set variables for Revanced
|
|
||||||
readonly revanced_name="revanced"
|
|
||||||
readonly revanced_user="revanced"
|
|
||||||
readonly revanced_patch="./patches/ytrv-patches.txt"
|
|
||||||
readonly revanced_ytversion="" # Input version supported if you need patch specific YT version.Example: "18.03.36"
|
|
||||||
# Set variables for Revanced Extended
|
|
||||||
readonly revanced_extended_name="revanced-extended"
|
|
||||||
readonly revanced_extended_user="inotia00"
|
|
||||||
readonly revanced_extended_patch="./patches/ytrve-patches.txt"
|
|
||||||
readonly revanced_extended_ytversion="" # Input version supported if you need patch specific YT version.Example: "18.07.35"
|
|
||||||
# Loop over Revanced & Revanced Extended
|
|
||||||
for name in $revanced_name $revanced_extended_name ; do
|
|
||||||
# Select variables based on name
|
|
||||||
if [[ "$name" = "$revanced_name" ]]; then
|
|
||||||
user="$revanced_user"
|
|
||||||
patch_file="$revanced_patch"
|
|
||||||
key="$revanced_patch_key"
|
|
||||||
ytversion="$revanced_ytversion"
|
|
||||||
else
|
|
||||||
user="$revanced_extended_user"
|
|
||||||
patch_file="$revanced_extended_patch"
|
|
||||||
key="$revanced_extended_patch_key"
|
|
||||||
ytversion="$revanced_extended_ytversion"
|
|
||||||
fi
|
|
||||||
get_patch
|
|
||||||
download_latest_release
|
|
||||||
# Patch YouTube
|
|
||||||
if [[ $ytversion ]] ; then
|
|
||||||
dl_yt $ytversion youtube-v$ytversion.apk
|
|
||||||
patch_yt
|
|
||||||
else
|
|
||||||
get_support_ytversion
|
|
||||||
dl_yt $ytversion youtube-v$ytversion.apk
|
|
||||||
patch_yt
|
|
||||||
fi
|
|
||||||
#Patch YouTube Music
|
|
||||||
if [[ "$name" = "$revanced_name" ]] ; then
|
|
||||||
get_support_ytmsversion
|
|
||||||
dl_ytms $ytmsversion youtube-music-v$ytmsversion.apk
|
|
||||||
patch_msrv
|
|
||||||
else
|
|
||||||
get_latest_ytmsversion
|
|
||||||
dl_ytms $ytmsversion youtube-music-v$ytmsversion.apk
|
|
||||||
patch_msrve
|
|
||||||
fi
|
|
||||||
clean_cache
|
|
||||||
done
|
|
||||||
0
src/tiktok/exclude-patches.txt
Normal file
0
src/tiktok/exclude-patches.txt
Normal file
12
src/tiktok/patch.sh
Normal file
12
src/tiktok/patch.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
DIR_TMP="$(mktemp -d)"
|
||||||
|
for repos in revanced-patches revanced-cli revanced-integrations; do
|
||||||
|
curl -s "https://api.github.com/repos/revanced/$repos/releases/latest" | jq -r '.assets[].browser_download_url' | xargs -n 1 curl -sL -O
|
||||||
|
done
|
||||||
|
EXCLUDE_PATCHES=()
|
||||||
|
for word in $(cat src/tiktok/exclude-patches.txt) ; do
|
||||||
|
EXCLUDE_PATCHES+=("-e $word")
|
||||||
|
done
|
||||||
|
curl --retry 10 --retry-max-time 60 -H "Cache-Control: no-cache" -fsSL github.com/EFForg/apkeep/releases/latest/download/apkeep-x86_64-unknown-linux-gnu -o ${DIR_TMP}/apkkeep
|
||||||
|
chmod +x ${DIR_TMP}/apkkeep && ${DIR_TMP}/apkkeep -a com.ss.android.ugc.trill .
|
||||||
|
java -jar revanced-cli*.jar -m revanced-integrations*.apk -b revanced-patches*.jar ${EXCLUDE_PATCHES[@]} -a com.ss.android.ugc.trill.apk --keystore=ks.keystore -o Tiktok.apk
|
||||||
0
src/twitch/exclude-patches.txt
Normal file
0
src/twitch/exclude-patches.txt
Normal file
13
src/twitch/patch.sh
Normal file
13
src/twitch/patch.sh
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
DIR_TMP="$(mktemp -d)"
|
||||||
|
for repos in revanced-patches revanced-cli revanced-integrations; do
|
||||||
|
curl -s "https://api.github.com/repos/revanced/$repos/releases/latest" | jq -r '.assets[].browser_download_url' | xargs -n 1 curl -sL -O
|
||||||
|
done
|
||||||
|
EXCLUDE_PATCHES=()
|
||||||
|
for word in $(cat src/twitch/exclude-patches.txt) ; do
|
||||||
|
EXCLUDE_PATCHES+=("-e $word")
|
||||||
|
done
|
||||||
|
version=$(jq -r '.[] | select(.name == "block-video-ads") | .compatiblePackages[] | select(.name == "tv.twitch.android.app") | .versions[-1]' patches.json)
|
||||||
|
curl --retry 10 --retry-max-time 60 -H "Cache-Control: no-cache" -fsSL github.com/EFForg/apkeep/releases/latest/download/apkeep-x86_64-unknown-linux-gnu -o ${DIR_TMP}/apkkeep
|
||||||
|
chmod +x ${DIR_TMP}/apkkeep && ${DIR_TMP}/apkkeep -a tv.twitch.android.app@$version .
|
||||||
|
java -jar revanced-cli*.jar -m revanced-integrations*.apk -b revanced-patches*.jar ${EXCLUDE_PATCHES[@]} -a tv.twitch.android.app*.apk --keystore=ks.keystore -o Twitch.apk
|
||||||
112
src/yt/patch.sh
Normal file
112
src/yt/patch.sh
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
# Set variables for Revanced
|
||||||
|
readonly revanced_name="revanced"
|
||||||
|
readonly revanced_user="revanced"
|
||||||
|
readonly revanced_patch="src/yt/patches.rv"
|
||||||
|
readonly revanced_ytversion="" # Input version supported if you need patch specific YT version.Example: "18.03.36"
|
||||||
|
# Set variables for Revanced Extended
|
||||||
|
readonly revanced_extended_name="revanced-extended"
|
||||||
|
readonly revanced_extended_user="inotia00"
|
||||||
|
readonly revanced_extended_patch="src/yt/patches.rve"
|
||||||
|
readonly revanced_extended_ytversion="" # Input version supported if you need patch specific YT version.Example: "18.07.35"
|
||||||
|
# Function prepare patches keywords
|
||||||
|
get_patch() {
|
||||||
|
local excluded_start=$(grep -n -m1 'EXCLUDE PATCHES' "$patch_file" | cut -d':' -f1)
|
||||||
|
local included_start=$(grep -n -m1 'INCLUDE PATCHES' "$patch_file" | cut -d':' -f1)
|
||||||
|
local excluded_patches=$(tail -n +$excluded_start $patch_file | head -n "$(( included_start - excluded_start ))" | grep '^[^#[:blank:]]')
|
||||||
|
local included_patches=$(tail -n +$included_start $patch_file | grep '^[^#[:blank:]]')
|
||||||
|
patches=()
|
||||||
|
if [[ -n "$excluded_patches" ]]; then
|
||||||
|
while read -r patch; do
|
||||||
|
patches+=("-e $patch")
|
||||||
|
done <<< "$excluded_patches"
|
||||||
|
fi
|
||||||
|
if [[ -n "$included_patches" ]]; then
|
||||||
|
while read -r patch; do
|
||||||
|
patches+=("-i $patch")
|
||||||
|
done <<< "$included_patches"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# Function download latest github releases
|
||||||
|
download_latest_release() {
|
||||||
|
echo "⏬ Downloading $name resources..."
|
||||||
|
for repos in revanced-patches revanced-cli revanced-integrations; do
|
||||||
|
local url="https://api.github.com/repos/$user/$repos/releases/latest"
|
||||||
|
curl -s "$url" | jq -r '.assets[].browser_download_url' | xargs -n 1 curl -O -s -L
|
||||||
|
done
|
||||||
|
}
|
||||||
|
# Function download YouTube apk from APKmirror
|
||||||
|
req() {
|
||||||
|
curl -sSL -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:111.0) Gecko/20100101 Firefox/111.0" "$1" -o "$2"
|
||||||
|
}
|
||||||
|
dl_yt() {
|
||||||
|
rm -rf $2
|
||||||
|
echo "🔽 Downloading YouTube version $1"
|
||||||
|
url="https://www.apkmirror.com/apk/google-inc/youtube/youtube-${1//./-}-release/"
|
||||||
|
echo "🔍 Searching for download link at $url"
|
||||||
|
url="$url$(req "$url" - | grep Variant -A50 | grep ">APK<" -A2 | grep android-apk-download | sed "s#.*-release/##g;s#/\#.*##g")"
|
||||||
|
url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
|
||||||
|
url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
|
||||||
|
echo "📥 Downloading from $url"
|
||||||
|
if req "$url" "$2" ; then
|
||||||
|
echo "✅ Download complete!"
|
||||||
|
else
|
||||||
|
echo "❌ Download failed."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
get_support_version() {
|
||||||
|
if [[ "$name" = "$revanced_name" ]] ; then
|
||||||
|
ytversion=$(jq -r '.[] | select(.name == "video-ads") | .compatiblePackages[] | select(.name == "com.google.android.youtube") | .versions[-1]' patches.json)
|
||||||
|
echo "✅️ Found YouTube version: $ytversion"
|
||||||
|
else
|
||||||
|
ytversion=$(jq -r '.[] | select(.name == "hide-general-ads") | .compatiblePackages[] | select(.name == "com.google.android.youtube") | .versions[-1]' patches.json)
|
||||||
|
echo "✅️ Found YouTube version: $ytversion"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function Patch APK
|
||||||
|
patch_apk() {
|
||||||
|
echo "⚙️ Patching YouTube..."
|
||||||
|
java -jar revanced-cli*.jar \
|
||||||
|
-m revanced-integrations*.apk \
|
||||||
|
-b revanced-patches*.jar \
|
||||||
|
-a youtube-v$ytversion.apk \
|
||||||
|
${patches[@]} \
|
||||||
|
--keystore=ks.keystore \
|
||||||
|
-o yt-$name.apk
|
||||||
|
}
|
||||||
|
# Function clean caches to new build
|
||||||
|
clean_cache() {
|
||||||
|
echo "🧹 Clean caches..."
|
||||||
|
rm -f revanced-cli*.jar \
|
||||||
|
revanced-integrations*.apk \
|
||||||
|
revanced-patches*.jar \
|
||||||
|
patches.json \
|
||||||
|
options.toml \
|
||||||
|
youtube*.apk \
|
||||||
|
}
|
||||||
|
# Loop over Revanced & Revanced Extended
|
||||||
|
for name in $revanced_name $revanced_extended_name ; do
|
||||||
|
# Select variables based on name
|
||||||
|
if [[ "$name" = "$revanced_name" ]]; then
|
||||||
|
user="$revanced_user"
|
||||||
|
patch_file="$revanced_patch"
|
||||||
|
ytversion="$revanced_ytversion"
|
||||||
|
else
|
||||||
|
user="$revanced_extended_user"
|
||||||
|
patch_file="$revanced_extended_patch"
|
||||||
|
ytversion="$revanced_extended_ytversion"
|
||||||
|
fi
|
||||||
|
get_patch
|
||||||
|
download_latest_release
|
||||||
|
if [[ $ytversion ]] ; then
|
||||||
|
dl_yt $ytversion youtube-v$ytversion.apk
|
||||||
|
patch_apk
|
||||||
|
else
|
||||||
|
get_support_version
|
||||||
|
dl_yt $ytversion youtube-v$ytversion.apk
|
||||||
|
patch_apk
|
||||||
|
fi
|
||||||
|
clean_cache
|
||||||
|
done
|
||||||
@@ -21,4 +21,4 @@ downloads
|
|||||||
remember-video-quality
|
remember-video-quality
|
||||||
client-spoof
|
client-spoof
|
||||||
general-ads
|
general-ads
|
||||||
video-ads
|
video-ads
|
||||||
103
src/ytm/patch.sh
Normal file
103
src/ytm/patch.sh
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
# Set variables for Revanced
|
||||||
|
readonly revanced_name="revanced"
|
||||||
|
readonly revanced_user="revanced"
|
||||||
|
readonly revanced_patch="src/ytm/patches.rv"
|
||||||
|
readonly revanced_ytmversion="" # Input version supported if you need patch specific YT version.Example: "18.03.36"
|
||||||
|
# Set variables for Revanced Extended
|
||||||
|
readonly revanced_extended_name="revanced-extended"
|
||||||
|
readonly revanced_extended_user="inotia00"
|
||||||
|
readonly revanced_extended_patch="src/ytm/patches.rve"
|
||||||
|
readonly revanced_extended_ytmversion="" # Input version supported if you need patch specific YT version.Example: "18.07.35"
|
||||||
|
# Function prepare patches keywords
|
||||||
|
get_patch() {
|
||||||
|
local excluded_start=$(grep -n -m1 'EXCLUDE PATCHES' "$patch_file" | cut -d':' -f1)
|
||||||
|
local included_start=$(grep -n -m1 'INCLUDE PATCHES' "$patch_file" | cut -d':' -f1)
|
||||||
|
local excluded_patches=$(tail -n +$excluded_start $patch_file | head -n "$(( included_start - excluded_start ))" | grep '^[^#[:blank:]]')
|
||||||
|
local included_patches=$(tail -n +$included_start $patch_file | grep '^[^#[:blank:]]')
|
||||||
|
patches=()
|
||||||
|
if [[ -n "$excluded_patches" ]]; then
|
||||||
|
while read -r patch; do
|
||||||
|
patches+=("-e $patch")
|
||||||
|
done <<< "$excluded_patches"
|
||||||
|
fi
|
||||||
|
if [[ -n "$included_patches" ]]; then
|
||||||
|
while read -r patch; do
|
||||||
|
patches+=("-i $patch")
|
||||||
|
done <<< "$included_patches"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# Function download latest github releases
|
||||||
|
download_latest_release() {
|
||||||
|
echo "⏬ Downloading $name resources..."
|
||||||
|
for repos in revanced-patches revanced-cli revanced-integrations; do
|
||||||
|
local url="https://api.github.com/repos/$user/$repos/releases/latest"
|
||||||
|
curl -s "$url" | jq -r '.assets[].browser_download_url' | xargs -n 1 curl -O -s -L
|
||||||
|
done
|
||||||
|
}
|
||||||
|
# Function download YouTube apk from APKmirror
|
||||||
|
req() {
|
||||||
|
curl -sSL -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:111.0) Gecko/20100101 Firefox/111.0" "$1" -o "$2"
|
||||||
|
}
|
||||||
|
dl_ytm() {
|
||||||
|
rm -rf $2
|
||||||
|
echo "Downloading YouTube Music $1"
|
||||||
|
url="https://www.apkmirror.com/apk/google-inc/youtube/youtube-music-${1//./-}-release/"
|
||||||
|
url="$url$(req "$url" - | grep arm64 -A30 | grep youtube-music | head -1 | sed "s#.*-release/##g;s#/\".*##g")"
|
||||||
|
url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
|
||||||
|
url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
|
||||||
|
req "$url" "$2"
|
||||||
|
}
|
||||||
|
get_latestytmversion() {
|
||||||
|
url="https://www.apkmirror.com/apk/google-inc/youtube-music/"
|
||||||
|
ytmversion=$(req "$url" - | grep "All version" -A200 | grep app_release | sed 's:.*/youtube-music-::g;s:-release/.*::g;s:-:.:g' | sort -r | head -1)
|
||||||
|
echo "Latest Youtube Music Version: $ytmversion"
|
||||||
|
}
|
||||||
|
get_support_version() {
|
||||||
|
ytmversion=$(jq -r '.[] | select(.name == "hide-get-premium") | .compatiblePackages[] | select(.name == "com.google.android.apps.youtube.music") | .versions[-1]' patches.json)
|
||||||
|
}
|
||||||
|
# Function Patch APK
|
||||||
|
patch_ms() {
|
||||||
|
echo "⚙️ Patching YouTube Music..."
|
||||||
|
java -jar revanced-cli*.jar \
|
||||||
|
-m revanced-integrations*.apk \
|
||||||
|
-b revanced-patches*.jar \
|
||||||
|
-a youtube-music-v$ytmversion.apk \
|
||||||
|
${patches[@]} \
|
||||||
|
--keystore=ks.keystore \
|
||||||
|
-o ytm-$name.apk
|
||||||
|
}
|
||||||
|
# Function clean caches to new build
|
||||||
|
clean_cache() {
|
||||||
|
echo "🧹 Clean caches..."
|
||||||
|
rm -f revanced-cli*.jar \
|
||||||
|
revanced-integrations*.apk \
|
||||||
|
revanced-patches*.jar \
|
||||||
|
patches.json \
|
||||||
|
options.toml \
|
||||||
|
youtube-music*.apk \
|
||||||
|
}
|
||||||
|
# Loop over Revanced & Revanced Extended
|
||||||
|
for name in $revanced_name $revanced_extended_name ; do
|
||||||
|
# Select variables based on name
|
||||||
|
if [[ "$name" = "$revanced_name" ]]; then
|
||||||
|
user="$revanced_user"
|
||||||
|
patch_file="$revanced_patch"
|
||||||
|
ytmversion="$revanced_ytmversion"
|
||||||
|
else
|
||||||
|
user="$revanced_extended_user"
|
||||||
|
patch_file="$revanced_extended_patch"
|
||||||
|
ytmversion="$revanced_extended_ytmversion"
|
||||||
|
fi
|
||||||
|
get_patch
|
||||||
|
download_latest_release
|
||||||
|
if [[ "$name" = "$revanced_name" ]] ; then
|
||||||
|
get_support_version
|
||||||
|
dl_ytm $ytmversion youtube-music-v$ytmversion.apk
|
||||||
|
else get_latestytmversion
|
||||||
|
dl_ytm $ytmversion youtube-music-v$ytmversion.apk
|
||||||
|
fi
|
||||||
|
patch_ms
|
||||||
|
clean_cache
|
||||||
|
done
|
||||||
12
src/ytm/patches.rv
Normal file
12
src/ytm/patches.rv
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# EXCLUDE PATCHES FROM BELOW
|
||||||
|
compact-header
|
||||||
|
# INCLUDE PATCHES FROM BELOW
|
||||||
|
background-play
|
||||||
|
codecs-unlock
|
||||||
|
exclusive-audio-playback
|
||||||
|
hide-get-premium
|
||||||
|
minimized-playback-music
|
||||||
|
music-video-ads
|
||||||
|
tasteBuilder-remover
|
||||||
|
upgrade-button-remover
|
||||||
|
custom-branding-icon-afn-red
|
||||||
12
src/ytm/patches.rve
Normal file
12
src/ytm/patches.rve
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# EXCLUDE PATCHES FROM BELOW
|
||||||
|
compact-header
|
||||||
|
# INCLUDE PATCHES FROM BELOW
|
||||||
|
background-play
|
||||||
|
codecs-unlock
|
||||||
|
exclusive-audio-playback
|
||||||
|
hide-get-premium
|
||||||
|
minimized-playback-music
|
||||||
|
music-video-ads
|
||||||
|
tasteBuilder-remover
|
||||||
|
upgrade-button-remover
|
||||||
|
custom-branding-icon-afn-red
|
||||||
Reference in New Issue
Block a user