diff --git a/README.md b/README.md index 9f9229b..dd17856 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# YouTube ReVanced Magisk Module +# ReVanced Magisk Module [![Build Modules](https://github.com/j-hc/revanced-magisk-module/actions/workflows/build.yml/badge.svg)](https://github.com/j-hc/revanced-magisk-module/actions/workflows/build.yml) [![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) @@ -19,6 +19,10 @@ The [**mindetach module**](https://github.com/j-hc/mindetach-magisk) in the rele **If you include microg patches in [build.conf](./build.conf), you get non-root APKs instead of Magisk modules. Twitter and Reddit will always be built as APKs regardless. To be able to use non-root variant you will need to install [Vanced MicroG](https://www.apkmirror.com/apk/team-vanced/microg-youtube-vanced/microg-youtube-vanced-0-2-24-220220-release/).** +## Installation + * Simply flash the module, you do not need to install YouTube or Music beforehand. Everything is handled by the module. + * No need for a reboot after the installation. YouTube or Music will be mounted immediately. + ## Updating The modules support Magisk update which means you will receive updates from your Magisk app, downloading from github releases and reflashing is not necessary. diff --git a/build.conf b/build.conf index d31e4e4..cfb2f0e 100644 --- a/build.conf +++ b/build.conf @@ -14,7 +14,7 @@ BUILD_WARN_WETTER=false BUILD_TIKTOK=false BUILD_MINDETACH_MODULE=true -MOUNT_DELAY=1 # some low-end phones cannot mount apks on boot without a delay. increase if needed. +MOUNT_DELAY=1 # some low-end phones *cannot mount apks on boot* without a delay. increase to something like 20 if needed. ENABLE_MAGISK_UPDATE=true # set this to false if you do not want to receive updates from magisk app # this is the repo to fallback for magisk update json if you are not building on github actions ↓ diff --git a/utils.sh b/utils.sh index 8023181..47b9007 100755 --- a/utils.sh +++ b/utils.sh @@ -220,11 +220,20 @@ build_yt() { "$stock_apk" log "\nYouTube version: ${last_ver}" fi - patch_apk "$stock_apk" "$patched_apk" "${YT_PATCHER_ARGS} -m ${RV_INTEGRATIONS_APK}" if [[ $YT_PATCHER_ARGS != *"-e microg-support"* ]] && [[ $YT_PATCHER_ARGS != *"--exclusive"* ]] || [[ $YT_PATCHER_ARGS == *"-i microg-support"* ]]; then + local is_root=false + else + local is_root=true + # --unsigned is only available in my revanced-cli builds + YT_PATCHER_ARGS="${YT_PATCHER_ARGS} --unsigned" + fi + + patch_apk "$stock_apk" "$patched_apk" "${YT_PATCHER_ARGS} -m ${RV_INTEGRATIONS_APK}" + + if [ $is_root = false ]; then mv -f "$patched_apk" "${BUILD_DIR}/" - echo "Built YouTube (no root)" + echo "Built YouTube (non-root)" return fi @@ -266,11 +275,20 @@ build_music() { "$stock_apk" log "\nYouTube Music (${arch}) version: ${last_ver}" fi - patch_apk "$stock_apk" "$patched_apk" "${MUSIC_PATCHER_ARGS} -m ${RV_INTEGRATIONS_APK}" if [[ $MUSIC_PATCHER_ARGS != *"-e music-microg-support"* ]] && [[ $MUSIC_PATCHER_ARGS != *"--exclusive"* ]] || [[ $MUSIC_PATCHER_ARGS == *"-i music-microg-support"* ]]; then + local is_root=false + else + local is_root=true + # --unsigned is only available in my revanced-cli builds + MUSIC_PATCHER_ARGS="${MUSIC_PATCHER_ARGS} --unsigned" + fi + + patch_apk "$stock_apk" "$patched_apk" "${MUSIC_PATCHER_ARGS}" + + if [ $is_root = false ]; then mv -f "$patched_apk" "${BUILD_DIR}/" - echo "Built Music (no root)" + echo "Built Music (non-root)" return fi