Compare commits

...
1 Commits
92 ... 101
Author SHA1 Message Date
nezumi bbde99482c feat: replace rvx patch to mophe patch 2026-01-04 21:48:54 +07:00
4 changed files with 81 additions and 21 deletions
+8 -1
View File
@@ -1,6 +1,7 @@
# Config
Adding another revanced app is as easy as this:
```toml
[Some-App]
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
@@ -10,7 +11,7 @@ apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
## More about other options:
There exists an example below with all defaults shown and all the keys explicitly set.
**All keys are optional** (except download urls) and are assigned to their default values if not set explicitly.
**All keys are optional** (except download urls) and are assigned to their default values if not set explicitly.
```toml
parallel-jobs = 1 # amount of cores to use for parallel patching, if not set $(nproc) is used
@@ -20,6 +21,12 @@ remove-rv-integrations-checks = true # remove checks from the revanced integrati
patches-source = "revanced/revanced-patches" # where to fetch patches bundle from. default: "revanced/revanced-patches"
cli-source = "j-hc/revanced-cli" # where to fetch cli from. default: "j-hc/revanced-cli"
# options like cli-source can also set per app
#
# Supported sources:
# - ReVanced: patches-source = "revanced/revanced-patches", cli-source = "j-hc/revanced-cli"
# - ReVanced Extended: patches-source = "inotia00/revanced-patches", cli-source = "inotia00/revanced-cli"
# - Morphe: patches-source = "MorpheApp/morphe-patches", cli-source = "MorpheApp/morphe-cli"
#
rv-brand = "ReVanced Extended" # rebrand from 'ReVanced' to something different. default: "ReVanced"
patches-version = "v2.160.0" # 'latest', 'dev', or a version number. default: "latest"
+12 -8
View File
@@ -1,16 +1,17 @@
# ReVanced Magisk Module
[![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/rvc_magisk)
[![CI](https://github.com/j-hc/revanced-magisk-module/actions/workflows/ci.yml/badge.svg?event=schedule)](https://github.com/j-hc/revanced-magisk-module/actions/workflows/ci.yml)
Extensive ReVanced builder
Extensive ReVanced builder
Get the [latest CI release](https://github.com/j-hc/revanced-magisk-module/releases).
Use [**zygisk-detach**](https://github.com/j-hc/zygisk-detach) to detach YouTube and YT Music from Play Store if you are using magisk modules.
Use [**zygisk-detach**](https://github.com/j-hc/zygisk-detach) to detach YouTube and YT Music from Play Store if you are using magisk modules.
<details><summary><big>Features</big></summary>
<ul>
<li>Support all present and future ReVanced and <a href="https://github.com/inotia00/revanced-patches">ReVanced Extended</a> apps</li>
<li>Support all present and future ReVanced, <a href="https://github.com/inotia00/revanced-patches">ReVanced Extended</a>, and <a href="https://github.com/MorpheApp/morphe-patches">Morphe patches</a></li>
<li> Can build Magisk modules and non-root APKs</li>
<li> Updated daily with the latest versions of apps and patches</li>
<li> Optimize APKs and modules for size</li>
@@ -28,21 +29,24 @@ Note that the <a href="../../actions/workflows/ci.yml">CI workflow</a> is schedu
## To include/exclude patches or patch other apps
* Star the repo :eyes:
* Use the repo as a [template](https://github.com/new?template_name=revanced-magisk-module&template_owner=j-hc)
* Customize [`config.toml`](./config.toml) using [rvmm-config-gen](https://j-hc.github.io/rvmm-config-gen/)
* Run the build [workflow](../../actions/workflows/build.yml)
* Grab your modules and APKs from [releases](../../releases)
- Star the repo :eyes:
- Use the repo as a [template](https://github.com/new?template_name=revanced-magisk-module&template_owner=j-hc)
- Customize [`config.toml`](./config.toml) using [rvmm-config-gen](https://j-hc.github.io/rvmm-config-gen/)
- Run the build [workflow](../../actions/workflows/build.yml)
- Grab your modules and APKs from [releases](../../releases)
also see here [`CONFIG.md`](./CONFIG.md)
## Building Locally
### On Termux
```console
bash <(curl -sSf https://raw.githubusercontent.com/j-hc/revanced-magisk-module/main/build-termux.sh)
```
### On Desktop
```console
$ git clone https://github.com/j-hc/revanced-magisk-module
$ cd revanced-magisk-module
+18 -6
View File
@@ -32,17 +32,29 @@ uptodown-dlurl = "https://google-photos.en.uptodown.com/android"
[Spotify]
uptodown-dlurl = "https://spotify.en.uptodown.com/android"
[YouTube-Extended]
[YouTube-Morphe]
app-name = "YouTube"
patches-source = "inotia00/revanced-patches"
cli-source = "inotia00/revanced-cli"
rv-brand = "ReVanced Extended"
patches-source = "MorpheApp/morphe-patches"
cli-source = "MorpheApp/morphe-cli"
rv-brand = "Morphe"
build-mode = "apk"
version = "auto"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube"
uptodown-dlurl = "https://youtube.en.uptodown.com/android"
included-patches = "'Custom header for YouTube' 'MaterialYou' 'Hide Shorts dimming'"
excluded-patches = "'Custom branding icon for YouTube' 'Custom branding name for YouTube' 'Disable splash animation'"
included-patches = ""
excluded-patches = ""
[Music-Morphe]
app-name = "Music"
patches-source = "MorpheApp/morphe-patches"
cli-source = "MorpheApp/morphe-cli"
rv-brand = "Morphe"
build-mode = "apk"
arch = "both"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music"
uptodown-dlurl = "https://youtube-music.en.uptodown.com/android"
included-patches = ""
excluded-patches = ""
[TikTok]
enabled = false
+43 -6
View File
@@ -48,7 +48,20 @@ get_rv_prebuilts() {
local cl_dir=${patches_src%/*}
cl_dir=${TEMP_DIR}/${cl_dir,,}-rv
[ -d "$cl_dir" ] || mkdir "$cl_dir"
for src_ver in "$cli_src CLI $cli_ver revanced-cli" "$patches_src Patches $patches_ver patches"; do
# Detect if using Morphe or ReVanced based on patches source
local is_morphe=false
if [[ "$patches_src" == *"MorpheApp"* ]] || [[ "$patches_src" == *"morphe"* ]]; then
is_morphe=true
fi
# Set CLI filename prefix based on source
local cli_prefix="revanced-cli"
if [ "$is_morphe" = true ]; then
cli_prefix="morphe-cli"
fi
for src_ver in "$cli_src CLI $cli_ver $cli_prefix" "$patches_src Patches $patches_ver patches"; do
set -- $src_ver
local src=$1 tag=$2 ver=${3-} fprefix=$4
local ext
@@ -56,7 +69,12 @@ get_rv_prebuilts() {
ext="jar"
local grab_cl=false
elif [ "$tag" = "Patches" ]; then
ext="rvp"
# Use .mpp for Morphe, .rvp for ReVanced
if [ "$is_morphe" = true ]; then
ext="mpp"
else
ext="rvp"
fi
local grab_cl=true
else abort unreachable; fi
local dir=${src%/*}
@@ -100,7 +118,8 @@ get_rv_prebuilts() {
fi
if [ "$tag" = "Patches" ]; then
if [ $grab_cl = true ]; then echo -e "[Changelog](https://github.com/${src}/releases/tag/${tag_name})\n" >>"${cl_dir}/changelog.md"; fi
if [ "$REMOVE_RV_INTEGRATIONS_CHECKS" = true ]; then
# Skip integrations check patching for Morphe (not applicable)
if [ "$REMOVE_RV_INTEGRATIONS_CHECKS" = true ] && [ "$is_morphe" = false ]; then
if ! (
mkdir -p "${file}-zip" || return 1
unzip -qo "${file}" -d "${file}-zip" || return 1
@@ -155,7 +174,12 @@ config_update() {
else
last_patches=$(gh_req "$rv_rel/tags/${ver}" -)
fi
if ! last_patches=$(jq -e -r '.assets[] | select(.name | endswith("rvp")) | .name' <<<"$last_patches"); then
# Detect if using Morphe or ReVanced based on patches source
local patches_ext="rvp"
if [[ "$PATCHES_SRC" == *"MorpheApp"* ]] || [[ "$PATCHES_SRC" == *"morphe"* ]]; then
patches_ext="mpp"
fi
if ! last_patches=$(jq -e -r ".assets[] | select(.name | endswith(\"$patches_ext\")) | .name" <<<"$last_patches"); then
abort oops
fi
if [ "$last_patches" ]; then
@@ -432,8 +456,19 @@ get_archive_pkg_name() { echo "$__ARCHIVE_PKG_NAME__"; }
patch_apk() {
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5
local cmd="env -u GITHUB_REPOSITORY java -jar $rv_cli_jar patch $stock_input --purge -o $patched_apk -p $rv_patches_jar --keystore=ks.keystore \
local cmd
# Detect if using Morphe CLI based on jar filename
if [[ "$rv_cli_jar" == *"morphe-cli"* ]]; then
# Morphe CLI syntax: java -jar cli.jar patch -p patches.mpp -o output.apk input.apk [options]
cmd="env -u GITHUB_REPOSITORY java -jar $rv_cli_jar patch -p $rv_patches_jar --purge -o $patched_apk --keystore=ks.keystore \
--keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --keystore-entry-alias=jhc $patcher_args $stock_input"
else
# ReVanced CLI syntax: java -jar cli.jar patch input.apk -p patches.rvp -o output.apk [options]
cmd="env -u GITHUB_REPOSITORY java -jar $rv_cli_jar patch $stock_input --purge -o $patched_apk -p $rv_patches_jar --keystore=ks.keystore \
--keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --keystore-entry-alias=jhc $patcher_args"
fi
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary=${AAPT2}"; fi
pr "$cmd"
if eval "$cmd"; then [ -f "$patched_apk" ]; else
@@ -598,10 +633,12 @@ build_rv() {
module_config "$base_template" "$pkg_name" "$version" "$arch"
local rv_patches_ver="${rv_patches_jar##*-}"
rv_patches_ver="${rv_patches_ver%%.rvp}"
rv_patches_ver="${rv_patches_ver%%.mpp}"
module_prop \
"${args[module_prop_name]}" \
"${app_name} ${args[rv_brand]}" \
"${version} (patches: ${rv_patches_ver%%.rvp})" \
"${version} (patches: ${rv_patches_ver})" \
"${app_name} ${args[rv_brand]} Magisk module" \
"https://raw.githubusercontent.com/${GITHUB_REPOSITORY-}/update/${upj}" \
"$base_template"