build non-root if microg-patches are included

This commit is contained in:
j-hc 2022-08-02 15:01:04 +03:00
parent 48a6d581c8
commit 85ca4ae265
No known key found for this signature in database
GPG Key ID: 242B44D16774A2ED
3 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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"

View File

@ -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