mirror of
https://github.com/Nezumi-2711/revanced-apk-build.git
synced 2026-09-22 20:02:00 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbde99482c | ||
|
|
9a7d8890aa | ||
|
|
57d950f57f | ||
|
|
e0a5116d13 | ||
|
|
6e4565bc1b | ||
|
|
f6d783c176 |
@@ -1,6 +1,7 @@
|
|||||||
# Config
|
# Config
|
||||||
|
|
||||||
Adding another revanced app is as easy as this:
|
Adding another revanced app is as easy as this:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[Some-App]
|
[Some-App]
|
||||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
|
||||||
@@ -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"
|
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"
|
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
|
# 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"
|
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"
|
patches-version = "v2.160.0" # 'latest', 'dev', or a version number. default: "latest"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# ReVanced Magisk Module
|
# ReVanced Magisk Module
|
||||||
|
|
||||||
[](https://t.me/rvc_magisk)
|
[](https://t.me/rvc_magisk)
|
||||||
[](https://github.com/j-hc/revanced-magisk-module/actions/workflows/ci.yml)
|
[](https://github.com/j-hc/revanced-magisk-module/actions/workflows/ci.yml)
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ Use [**zygisk-detach**](https://github.com/j-hc/zygisk-detach) to detach YouTube
|
|||||||
|
|
||||||
<details><summary><big>Features</big></summary>
|
<details><summary><big>Features</big></summary>
|
||||||
<ul>
|
<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> Can build Magisk modules and non-root APKs</li>
|
||||||
<li> Updated daily with the latest versions of apps and patches</li>
|
<li> Updated daily with the latest versions of apps and patches</li>
|
||||||
<li> Optimize APKs and modules for size</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
|
## To include/exclude patches or patch other apps
|
||||||
|
|
||||||
* Star the repo :eyes:
|
- Star the repo :eyes:
|
||||||
* Use the repo as a [template](https://github.com/new?template_name=revanced-magisk-module&template_owner=j-hc)
|
- 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/)
|
- 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)
|
- Run the build [workflow](../../actions/workflows/build.yml)
|
||||||
* Grab your modules and APKs from [releases](../../releases)
|
- Grab your modules and APKs from [releases](../../releases)
|
||||||
|
|
||||||
also see here [`CONFIG.md`](./CONFIG.md)
|
also see here [`CONFIG.md`](./CONFIG.md)
|
||||||
|
|
||||||
## Building Locally
|
## Building Locally
|
||||||
|
|
||||||
### On Termux
|
### On Termux
|
||||||
|
|
||||||
```console
|
```console
|
||||||
bash <(curl -sSf https://raw.githubusercontent.com/j-hc/revanced-magisk-module/main/build-termux.sh)
|
bash <(curl -sSf https://raw.githubusercontent.com/j-hc/revanced-magisk-module/main/build-termux.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
### On Desktop
|
### On Desktop
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ git clone https://github.com/j-hc/revanced-magisk-module
|
$ git clone https://github.com/j-hc/revanced-magisk-module
|
||||||
$ cd revanced-magisk-module
|
$ cd revanced-magisk-module
|
||||||
|
|||||||
+42
-61
@@ -7,8 +7,8 @@ parallel-jobs = 1
|
|||||||
# you can use rvmm-config-gen to generate a config
|
# you can use rvmm-config-gen to generate a config
|
||||||
|
|
||||||
[YouTube]
|
[YouTube]
|
||||||
build-mode = "apk"
|
build-mode = "both"
|
||||||
excluded-patches = "'Hide timestamp'"
|
excluded-patches = ""
|
||||||
included-patches = ""
|
included-patches = ""
|
||||||
version = "auto"
|
version = "auto"
|
||||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube"
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube"
|
||||||
@@ -16,75 +16,56 @@ uptodown-dlurl = "https://youtube.en.uptodown.com/android"
|
|||||||
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.youtube"
|
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.youtube"
|
||||||
|
|
||||||
[Music]
|
[Music]
|
||||||
build-mode = "apk"
|
build-mode = "both"
|
||||||
arch = "both"
|
arch = "both"
|
||||||
version = "auto"
|
|
||||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music"
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music"
|
||||||
uptodown-dlurl = "https://youtube-music.en.uptodown.com/android"
|
uptodown-dlurl = "https://youtube-music.en.uptodown.com/android"
|
||||||
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.apps.youtube.music"
|
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.apps.youtube.music"
|
||||||
|
|
||||||
[GooglePhotos]
|
[GooglePhotos]
|
||||||
build-mode = "apk"
|
build-mode = "both"
|
||||||
arch = "both"
|
arch = "both"
|
||||||
version = "auto"
|
version = "auto"
|
||||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/photos"
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/photos/"
|
||||||
uptodown-dlurl = "https://google-photos.en.uptodown.com/android"
|
uptodown-dlurl = "https://google-photos.en.uptodown.com/android"
|
||||||
|
|
||||||
[Music-Extended]
|
|
||||||
app-name = "Music"
|
|
||||||
patches-source = "inotia00/revanced-patches"
|
|
||||||
cli-source = "inotia00/revanced-cli"
|
|
||||||
rv-brand = "ReVanced Extended"
|
|
||||||
build-mode = "apk"
|
|
||||||
arch = "both"
|
|
||||||
version = "auto"
|
|
||||||
included-patches = "'Custom header for YouTube Music' 'Spoof client'"
|
|
||||||
excluded-patches = "'Custom branding icon for YouTube Music' 'Custom branding name for YouTube Music'"
|
|
||||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music"
|
|
||||||
uptodown-dlurl = "https://youtube-music.uptodown.com/android"
|
|
||||||
|
|
||||||
[Music-Extended-Beta]
|
|
||||||
app-name = "Music"
|
|
||||||
patches-source = "inotia00/revanced-patches"
|
|
||||||
patches-version = "dev"
|
|
||||||
cli-source = "inotia00/revanced-cli"
|
|
||||||
rv-brand = "ReVanced Extended"
|
|
||||||
build-mode = "apk"
|
|
||||||
arch = "both"
|
|
||||||
version = "auto"
|
|
||||||
included-patches = "'Custom header for YouTube Music' 'Spoof client'"
|
|
||||||
excluded-patches = "'Custom branding icon for YouTube Music' 'Custom branding name for YouTube Music'"
|
|
||||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music"
|
|
||||||
uptodown-dlurl = "https://youtube-music.uptodown.com/android"
|
|
||||||
|
|
||||||
[YouTube-Extended]
|
|
||||||
app-name = "YouTube"
|
|
||||||
patches-source = "inotia00/revanced-patches"
|
|
||||||
cli-source = "inotia00/revanced-cli"
|
|
||||||
rv-brand = "ReVanced Extended"
|
|
||||||
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'"
|
|
||||||
|
|
||||||
[YouTube-Extended-Beta]
|
|
||||||
app-name = "YouTube"
|
|
||||||
patches-source = "inotia00/revanced-patches"
|
|
||||||
patches-version = "dev"
|
|
||||||
cli-source = "inotia00/revanced-cli"
|
|
||||||
rv-brand = "ReVanced Extended"
|
|
||||||
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'"
|
|
||||||
excluded-patches = "'Custom branding icon for YouTube' 'Custom branding name for YouTube' 'Disable splash animation'"
|
|
||||||
|
|
||||||
[Spotify]
|
[Spotify]
|
||||||
app-name = "Spotify"
|
uptodown-dlurl = "https://spotify.en.uptodown.com/android"
|
||||||
|
|
||||||
|
[YouTube-Morphe]
|
||||||
|
app-name = "YouTube"
|
||||||
|
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 = ""
|
||||||
|
excluded-patches = ""
|
||||||
|
|
||||||
|
[Music-Morphe]
|
||||||
|
app-name = "Music"
|
||||||
|
patches-source = "MorpheApp/morphe-patches"
|
||||||
|
cli-source = "MorpheApp/morphe-cli"
|
||||||
|
rv-brand = "Morphe"
|
||||||
build-mode = "apk"
|
build-mode = "apk"
|
||||||
arch = "both"
|
arch = "both"
|
||||||
version = "auto"
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music"
|
||||||
uptodown-dlurl = "https://spotify.en.uptodown.com/android"
|
uptodown-dlurl = "https://youtube-music.en.uptodown.com/android"
|
||||||
|
included-patches = ""
|
||||||
|
excluded-patches = ""
|
||||||
|
|
||||||
|
[TikTok]
|
||||||
|
enabled = false
|
||||||
|
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.zhiliaoapp.musically"
|
||||||
|
included-patches = "'SIM spoof'"
|
||||||
|
|
||||||
|
[Messenger]
|
||||||
|
enabled = false
|
||||||
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/facebook-2/messenger/"
|
||||||
|
arch = "arm64-v8a"
|
||||||
|
|
||||||
|
[IconPackStudio]
|
||||||
|
enabled = false
|
||||||
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/smart-launcher-team/icon-pack-studio/"
|
||||||
|
|||||||
@@ -48,7 +48,20 @@ get_rv_prebuilts() {
|
|||||||
local cl_dir=${patches_src%/*}
|
local cl_dir=${patches_src%/*}
|
||||||
cl_dir=${TEMP_DIR}/${cl_dir,,}-rv
|
cl_dir=${TEMP_DIR}/${cl_dir,,}-rv
|
||||||
[ -d "$cl_dir" ] || mkdir "$cl_dir"
|
[ -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
|
set -- $src_ver
|
||||||
local src=$1 tag=$2 ver=${3-} fprefix=$4
|
local src=$1 tag=$2 ver=${3-} fprefix=$4
|
||||||
local ext
|
local ext
|
||||||
@@ -56,7 +69,12 @@ get_rv_prebuilts() {
|
|||||||
ext="jar"
|
ext="jar"
|
||||||
local grab_cl=false
|
local grab_cl=false
|
||||||
elif [ "$tag" = "Patches" ]; then
|
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
|
local grab_cl=true
|
||||||
else abort unreachable; fi
|
else abort unreachable; fi
|
||||||
local dir=${src%/*}
|
local dir=${src%/*}
|
||||||
@@ -100,7 +118,8 @@ get_rv_prebuilts() {
|
|||||||
fi
|
fi
|
||||||
if [ "$tag" = "Patches" ]; then
|
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 [ $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 ! (
|
if ! (
|
||||||
mkdir -p "${file}-zip" || return 1
|
mkdir -p "${file}-zip" || return 1
|
||||||
unzip -qo "${file}" -d "${file}-zip" || return 1
|
unzip -qo "${file}" -d "${file}-zip" || return 1
|
||||||
@@ -155,7 +174,12 @@ config_update() {
|
|||||||
else
|
else
|
||||||
last_patches=$(gh_req "$rv_rel/tags/${ver}" -)
|
last_patches=$(gh_req "$rv_rel/tags/${ver}" -)
|
||||||
fi
|
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
|
abort oops
|
||||||
fi
|
fi
|
||||||
if [ "$last_patches" ]; then
|
if [ "$last_patches" ]; then
|
||||||
@@ -432,8 +456,19 @@ get_archive_pkg_name() { echo "$__ARCHIVE_PKG_NAME__"; }
|
|||||||
|
|
||||||
patch_apk() {
|
patch_apk() {
|
||||||
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5
|
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"
|
--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
|
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary=${AAPT2}"; fi
|
||||||
pr "$cmd"
|
pr "$cmd"
|
||||||
if eval "$cmd"; then [ -f "$patched_apk" ]; else
|
if eval "$cmd"; then [ -f "$patched_apk" ]; else
|
||||||
@@ -598,10 +633,12 @@ build_rv() {
|
|||||||
module_config "$base_template" "$pkg_name" "$version" "$arch"
|
module_config "$base_template" "$pkg_name" "$version" "$arch"
|
||||||
|
|
||||||
local rv_patches_ver="${rv_patches_jar##*-}"
|
local rv_patches_ver="${rv_patches_jar##*-}"
|
||||||
|
rv_patches_ver="${rv_patches_ver%%.rvp}"
|
||||||
|
rv_patches_ver="${rv_patches_ver%%.mpp}"
|
||||||
module_prop \
|
module_prop \
|
||||||
"${args[module_prop_name]}" \
|
"${args[module_prop_name]}" \
|
||||||
"${app_name} ${args[rv_brand]}" \
|
"${app_name} ${args[rv_brand]}" \
|
||||||
"${version} (patches: ${rv_patches_ver%%.rvp})" \
|
"${version} (patches: ${rv_patches_ver})" \
|
||||||
"${app_name} ${args[rv_brand]} Magisk module" \
|
"${app_name} ${args[rv_brand]} Magisk module" \
|
||||||
"https://raw.githubusercontent.com/${GITHUB_REPOSITORY-}/update/${upj}" \
|
"https://raw.githubusercontent.com/${GITHUB_REPOSITORY-}/update/${upj}" \
|
||||||
"$base_template"
|
"$base_template"
|
||||||
|
|||||||
Reference in New Issue
Block a user