From 85ca4ae265b84b74855f54a19cbefb26fdae3f2b Mon Sep 17 00:00:00 2001 From: j-hc <25510067+j-hc@users.noreply.github.com> Date: Tue, 2 Aug 2022 15:01:04 +0300 Subject: [PATCH] build non-root if microg-patches are included --- README.md | 2 +- build.conf | 2 +- utils.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a67ef9f..b7cb105 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ There is also an extra module in releases that detaches YouTube and YouTube Musi * Run the [workflow](../../actions/workflows/build.yml) * Grab your modules from [releases](../../releases) -**If you include microg patches in [build.conf](./build.conf), you get noroot APKs instead of Magisk modules. Twitter and Reddit will always be built as APKs regardless.** +**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.** ## 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 0a18c92..ee7cd69 100644 --- a/build.conf +++ b/build.conf @@ -1,5 +1,5 @@ # ex: for excluding patches: -e patchname -e anotherpatchname -# if you remove '-e microg-support' arg, you get noroot builds +# if you remove '-e microg-support' arg, you get non-root builds YT_PATCHER_ARGS="-e microg-support" MUSIC_PATCHER_ARGS="-e music-microg-support" diff --git a/utils.sh b/utils.sh index 0ed0eff..033d3f5 100755 --- a/utils.sh +++ b/utils.sh @@ -150,7 +150,7 @@ build_yt() { fi patch_apk "$stock_apk" "$patched_apk" "${YT_PATCHER_ARGS} -m ${RV_INTEGRATIONS_APK}" - if [[ "$YT_PATCHER_ARGS" != *"-e microg-support"* ]]; then + if [[ "$YT_PATCHER_ARGS" != *"-e microg-support"* ]] && [[ "$YT_PATCHER_ARGS" != *"--exclusive"* ]] || [[ "$YT_PATCHER_ARGS" == *"-i microg-support"* ]]; then mv -f "$patched_apk" build echo "Built YouTube (no root) '${BUILD_DIR}/${patched_apk}'" return @@ -190,7 +190,7 @@ build_music() { fi patch_apk "$stock_apk" "$patched_apk" "${MUSIC_PATCHER_ARGS} -m ${RV_INTEGRATIONS_APK}" - if [[ "$MUSIC_PATCHER_ARGS" != *"-e music-microg-support"* ]]; then + if [[ "$MUSIC_PATCHER_ARGS" != *"-e music-microg-support"* ]] && [[ "$MUSIC_PATCHER_ARGS" != *"--exclusive"* ]] || [[ "$MUSIC_PATCHER_ARGS" == *"-i music-microg-support"* ]]; then mv -f "$patched_apk" build echo "Built Music (no root) '${BUILD_DIR}/${patched_apk}'" return