Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"

## More about other options:

<<<<<<< HEAD
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.
=======
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.
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4

```toml
parallel-jobs = 1 # amount of cores to use for parallel patching, if not set $(nproc) is used
Expand All @@ -22,7 +27,11 @@ remove-rv-integrations-checks = true # remove checks from the revanced integrati
dpi = "nodpi anydpi 120-640dpi" # dpi packages to be searched in order. default: "nodpi anydpi"

patches-source = "revanced/revanced-patches" # where to fetch patches bundle from. default: "revanced/revanced-patches"
<<<<<<< HEAD
cli-source = "j-hc/revanced-cli" # where to fetch cli from. default: "j-hc/revanced-cli"
=======
cli-source = "ReVanced/revanced-cli" # where to fetch cli from. default: "ReVanced/revanced-cli"
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
# options like cli-source can also set per app
rv-brand = "ReVanced Extended" # rebrand from 'ReVanced' to something different. default: "ReVanced"

Expand Down Expand Up @@ -54,11 +63,23 @@ excluded-patches = """\
included-patches = "'Some Patch'" # whitespace seperated list of non-default patches to include. default: ""
include-stock = true # includes stock apk in the module. default: true
exclusive-patches = false # exclude all patches by default. default: false
<<<<<<< HEAD
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
uptodown-dlurl = "https://spotify.en.uptodown.com/android"
module-prop-name = "some-app-magisk" # magisk module prop name.
dpi = "360-480dpi" # used to select apk variant from apkmirror. default: nodpi
arch = "arm64-v8a" # 'arm64-v8a', 'arm-v7a', 'all', 'both'. 'both' downloads both arm64-v8a and arm-v7a. default: all
riplib = true # enables ripping x86 and x86_64 libs from apks with j-hc revanced cli. default: true

=======

apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
uptodown-dlurl = "https://spotify.en.uptodown.com/android"
# direct download url. the url must have point to an apk file with name format shown in this example
direct-dlurl = "https://website/com.google.android.youtube-20.40.45-all.apk"

module-prop-name = "some-app-module" # module prop name.
dpi = "360-480dpi" # used to select apk variant from apkmirror. default: nodpi
arch = "arm64-v8a" # 'arm64-v8a', 'arm-v7a', 'all', 'both'. 'both' downloads both arm64-v8a and arm-v7a. default: all
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
```
4 changes: 4 additions & 0 deletions build-termux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ until
do sleep 1; done
if [ ! -f ~/.rvmm_"$(date '+%Y%m')" ]; then
pr "Setting up environment..."
<<<<<<< HEAD
yes "" | pkg update -y && pkg upgrade -y && pkg install -y git curl jq openjdk-17 zip
=======
yes "" | pkg update -y && pkg upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" && pkg install -y git curl jq openjdk-17 zip
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
: >~/.rvmm_"$(date '+%Y%m')"
fi
mkdir -p /sdcard/Download/revanced-magisk-module/
Expand Down
50 changes: 50 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ REMOVE_RV_INTEGRATIONS_CHECKS=$(toml_get "$main_config_t" remove-rv-integrations
DEF_PATCHES_VER=$(toml_get "$main_config_t" patches-version) || DEF_PATCHES_VER="latest"
DEF_CLI_VER=$(toml_get "$main_config_t" cli-version) || DEF_CLI_VER="latest"
DEF_PATCHES_SRC=$(toml_get "$main_config_t" patches-source) || DEF_PATCHES_SRC="ReVanced/revanced-patches"
<<<<<<< HEAD
DEF_CLI_SRC=$(toml_get "$main_config_t" cli-source) || DEF_CLI_SRC="j-hc/revanced-cli"
=======
DEF_CLI_SRC=$(toml_get "$main_config_t" cli-source) || DEF_CLI_SRC="ReVanced/revanced-cli"
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
DEF_RV_BRAND=$(toml_get "$main_config_t" rv-brand) || DEF_RV_BRAND="ReVanced"
DEF_DPI_LIST=$(toml_get "$main_config_t" dpi) || DEF_DPI_LIST="nodpi anydpi"
mkdir -p "$TEMP_DIR" "$BUILD_DIR"
Expand All @@ -41,6 +45,7 @@ if [ "${2-}" = "--config-update" ]; then
fi

: >build.md
<<<<<<< HEAD
ENABLE_MAGISK_UPDATE=$(toml_get "$main_config_t" enable-magisk-update) || ENABLE_MAGISK_UPDATE=true
if [ "$ENABLE_MAGISK_UPDATE" = true ] && [ -z "${GITHUB_REPOSITORY-}" ]; then
pr "You are building locally. Magisk updates will not be enabled."
Expand All @@ -51,6 +56,18 @@ if ((COMPRESSION_LEVEL > 9)) || ((COMPRESSION_LEVEL < 0)); then abort "compressi
rm -rf revanced-magisk/bin/*/tmp.*
for file in "$TEMP_DIR"/*/changelog.md; do
[ -f "$file" ] && : > "$file"
=======
ENABLE_MODULE_UPDATE=$(toml_get "$main_config_t" enable-module-update) || ENABLE_MODULE_UPDATE=true
if [ "$ENABLE_MODULE_UPDATE" = true ] && [ -z "${GITHUB_REPOSITORY-}" ]; then
pr "You are building locally. Module updates will not be enabled."
ENABLE_MODULE_UPDATE=false
fi
if ((COMPRESSION_LEVEL > 9)) || ((COMPRESSION_LEVEL < 0)); then abort "compression-level must be within 0-9"; fi

rm -rf module/bin/*/tmp.*
for file in "$TEMP_DIR"/*/changelog.md; do
[ -f "$file" ] && : >"$file"
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
done

mkdir -p ${MODULE_TEMPLATE_DIR}/bin/arm64 ${MODULE_TEMPLATE_DIR}/bin/arm ${MODULE_TEMPLATE_DIR}/bin/x86 ${MODULE_TEMPLATE_DIR}/bin/x64
Expand All @@ -59,7 +76,10 @@ gh_dl "${MODULE_TEMPLATE_DIR}/bin/arm/cmpr" "https://github.com/j-hc/cmpr/releas
gh_dl "${MODULE_TEMPLATE_DIR}/bin/x86/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86"
gh_dl "${MODULE_TEMPLATE_DIR}/bin/x64/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86_64"

<<<<<<< HEAD
declare -A cliriplib
=======
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
idx=0
for table_name in $(toml_get_table_names); do
if [ -z "$table_name" ]; then continue; fi
Expand All @@ -84,6 +104,7 @@ for table_name in $(toml_get_table_names); do
read -r cli_jar patches_jar <<<"$PREBUILTS"
app_args[cli]=$cli_jar
app_args[ptjar]=$patches_jar
<<<<<<< HEAD
if [[ -v cliriplib[${app_args[cli]}] ]]; then app_args[riplib]=${cliriplib[${app_args[cli]}]}; else
if [[ $(java -jar "${app_args[cli]}" patch 2>&1) == *rip-lib* ]]; then
cliriplib[${app_args[cli]}]=true
Expand All @@ -94,6 +115,8 @@ for table_name in $(toml_get_table_names); do
fi
fi
if [ "${app_args[riplib]}" = "true" ] && [ "$(toml_get "$t" riplib)" = "false" ]; then app_args[riplib]=false; fi
=======
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
app_args[rv_brand]=$(toml_get "$t" rv-brand) || app_args[rv_brand]=$DEF_RV_BRAND

app_args[excluded_patches]=$(toml_get "$t" excluded-patches) || app_args[excluded_patches]=""
Expand All @@ -110,6 +133,7 @@ for table_name in $(toml_get_table_names); do
abort "ERROR: build-mode '${app_args[build_mode]}' is not a valid option for '${table_name}': only 'both', 'apk' or 'module' is allowed"
fi
} || app_args[build_mode]=apk
<<<<<<< HEAD
app_args[uptodown_dlurl]=$(toml_get "$t" uptodown-dlurl) && {
app_args[uptodown_dlurl]=${app_args[uptodown_dlurl]%/}
app_args[uptodown_dlurl]=${app_args[uptodown_dlurl]%download}
Expand All @@ -127,6 +151,22 @@ for table_name in $(toml_get_table_names); do
if [ -z "${app_args[dl_from]-}" ]; then abort "ERROR: no 'apkmirror_dlurl', 'uptodown_dlurl' or 'archive_dlurl' option was set for '$table_name'."; fi
app_args[arch]=$(toml_get "$t" arch) || app_args[arch]="all"
if [ "${app_args[arch]}" != "both" ] && [ "${app_args[arch]}" != "all" ] && [[ ${app_args[arch]} != "arm64-v8a"* ]] && [[ ${app_args[arch]} != "arm-v7a"* ]]; then
=======

for dl_from in "direct" "uptodown" "apkmirror" "archive"; do
if app_args[${dl_from}_dlurl]=$(toml_get "$t" ${dl_from}-dlurl); then
app_args[${dl_from}_dlurl]=${app_args[${dl_from}_dlurl]%/}
app_args[${dl_from}_dlurl]=${app_args[${dl_from}_dlurl]%download}
app_args[${dl_from}_dlurl]=${app_args[${dl_from}_dlurl]%/}
app_args[dl_from]=${dl_from}
else
app_args[${dl_from}_dlurl]=""
fi
done
if [ -z "${app_args[dl_from]-}" ]; then abort "ERROR: no 'apkmirror-dlurl', 'uptodown-dlurl' or 'archive-dlurl' option was set for '$table_name'."; fi
app_args[arch]=$(toml_get "$t" arch) || app_args[arch]="all"
if ! isoneof "${app_args[arch]}" "both" "all" "arm64-v8a" "arm-v7a" "x86_64" "x86"; then
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
abort "wrong arch '${app_args[arch]}' for '$table_name'"
fi

Expand Down Expand Up @@ -166,20 +206,28 @@ wait
rm -rf temp/tmp.*
if [ -z "$(ls -A1 "${BUILD_DIR}")" ]; then abort "All builds failed."; fi

<<<<<<< HEAD
# Initial changelog logic
# log "\nInstall [Microg](https://github.com/ReVanced/GmsCore/releases) for non-root YouTube and YT Music APKs"
# log "Use [zygisk-detach](https://github.com/j-hc/zygisk-detach) to detach root ReVanced YouTube and YT Music from Play Store"
# log "\n[revanced-magisk-module](https://github.com/j-hc/revanced-magisk-module)\n"
# log "$(cat "$TEMP_DIR"/*/changelog.md)"

log "\n$(cat "$TEMP_DIR"/*/changelog.md)"
=======
log "\nInstall [Microg](https://github.com/ReVanced/GmsCore/releases) for non-root YouTube and YT Music APKs"
log "Use [zygisk-detach](https://github.com/j-hc/zygisk-detach) to detach YouTube and YT Music modules from Play Store"
log "\n[revanced-magisk-module](https://github.com/j-hc/revanced-magisk-module)\n"
log "$(cat "$TEMP_DIR"/*/changelog.md)"
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4

SKIPPED=$(cat "$TEMP_DIR"/skipped 2>/dev/null || :)
if [ -n "$SKIPPED" ]; then
log "\nSkipped:"
log "$SKIPPED"
fi

<<<<<<< HEAD
# New skipped changelog logic with links

# SKIPPED=$(cat "$TEMP_DIR"/skipped 2>/dev/null || :)
Expand All @@ -196,4 +244,6 @@ fi
# log "$(cat "$TEMP_DIR"/*-rv/changelog.md)"
# fi

=======
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
pr "Done"
91 changes: 91 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<<<<<<< HEAD
enable-magisk-update = true # set this to false if you do not want to receive updates for the module in magisk app
=======
enable-module-update = true # set this to false if you do not want to receive updates for the module
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
parallel-jobs = 1

# add 'enabled = false' for not patching a specific app or remove it from the config
# see https://github.com/j-hc/revanced-magisk-module/blob/main/CONFIG.md for more detailed explanations

# you can use rvmm-config-gen to generate a config

<<<<<<< HEAD
patches-source = "anddea/revanced-patches"
integrations-source = "anddea/revanced-integrations"
cli-source = "inotia00/revanced-cli"
Expand Down Expand Up @@ -37,3 +42,89 @@ archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.a
excluded-patches = "'Custom header for YouTube Music'"
included-patches = "'Visual preferences icons for YouTube Music' 'Return YouTube Username' 'Disable music video in album'"
patcher-args = "-e 'Custom branding name for YouTube Music' -OappName='YT Music RVX' -e 'Custom branding icon for YouTube Music' -OappIcon='vanced_black'"
=======
[YouTube]
build-mode = "both"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube"
uptodown-dlurl = "https://youtube.en.uptodown.com/android"
archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.youtube"

[YouTube-Morphe]
app-name = "YouTube"
patches-source = "MorpheApp/morphe-patches"
cli-source = "MorpheApp/morphe-cli"
rv-brand = "Morphe"
build-mode = "both"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube"
uptodown-dlurl = "https://youtube.en.uptodown.com/android"
archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.youtube"

[Music]
build-mode = "both"
arch = "both"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music"
uptodown-dlurl = "https://youtube-music.en.uptodown.com/android"
archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.apps.youtube.music"

[Music-Morphe]
app-name = "Music"
patches-source = "MorpheApp/morphe-patches"
cli-source = "MorpheApp/morphe-cli"
rv-brand = "Morphe"
build-mode = "both"
arch = "both"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music"
uptodown-dlurl = "https://youtube-music.en.uptodown.com/android"
archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.apps.youtube.music"

[Reddit-Morphe]
app-name = "Reddit"
rv-brand = "Morphe"
build-mode = "both"
patches-source = "MorpheApp/morphe-patches"
cli-source = "MorpheApp/morphe-cli"
apkmirror-dlurl = "https://www.apkmirror.com/apk/redditinc/reddit/"
archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.reddit.frontpage"
uptodown-dlurl = "https://reddit-official-app.en.uptodown.com/android"
dpi = "120-640dpi"

[GooglePhotos]
enabled = false
build-mode = "both"
arch = "both"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/photos/"
uptodown-dlurl = "https://google-photos.en.uptodown.com/android"
archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.apps.photos"

[Spotify]
enabled = false
uptodown-dlurl = "https://spotify.en.uptodown.com/android"
archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.spotify.music"

[Twitch]
enabled = false
apkmirror-dlurl = "https://www.apkmirror.com/apk/twitch-interactive-inc/twitch/"
uptodown-dlurl = "https://twitch.en.uptodown.com/android"
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/tv.twitch.android.app"

[Twitter]
enabled = false
apkmirror-dlurl = "https://www.apkmirror.com/apk/x-corp/twitter"
build-mode = "apk"
dpi = "120-640dpi"
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.twitter.android"

[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/"
>>>>>>> b25b91310e6268a3369a25946ae4e216d1b713f4
Loading