From 730070d44ab848fcd7a3e14d0a1753ac1df0e346 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:58:52 +0800 Subject: [PATCH] Add back remove amazon Amazon Apps only ship in the apex module on a high version of WSA, so just simply delete it For the WSA upgrade from the older version which already installed this module, run `adb shell pm uninstall com.microsoft.mado` to remove it. --- scripts/build.sh | 10 ++++++++++ scripts/run.sh | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 2d72d6a..f8ad67d 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -195,6 +195,7 @@ ARGUMENT_LIST=( "magisk-ver:" "magisk-custom" "install-gapps" + "remove-amazon" "offline" "skip-download-wsa" "help" @@ -242,6 +243,10 @@ while [[ $# -gt 0 ]]; do HAS_GAPPS=1 shift ;; + --remove-amazon) + REMOVE_AMAZON=1 + shift + ;; --offline) OFFLINE=1 shift @@ -518,6 +523,10 @@ if [ "$HAS_GAPPS" ]; then fi fi +if [ "$REMOVE_AMAZON" ]; then + rm -f "$WORK_DIR/wsa/$ARCH/apex/"mado*.apex || abort +fi + echo "Removing signature and add scripts" rm -rf "${WORK_DIR:?}"/wsa/"$ARCH"/\[Content_Types\].xml "$WORK_DIR/wsa/$ARCH/AppxBlockMap.xml" "$WORK_DIR/wsa/$ARCH/AppxSignature.p7x" "$WORK_DIR/wsa/$ARCH/AppxMetadata" || abort cp "$vclibs_PATH" "$xaml_PATH" "$WORK_DIR/wsa/$ARCH" || abort @@ -543,6 +552,7 @@ else name2=-GApps-${ANDROID_API_MAP[$ANDROID_API]} fi artifact_name=WSA_${WSA_VER}_${ARCH}_${WSA_REL}${name1}${name2} +[ "$REMOVE_AMAZON" ] && artifact_name+=-NoAmazon if [ -f "$OUTPUT_DIR" ]; then rm -rf ${OUTPUT_DIR:?} diff --git a/scripts/run.sh b/scripts/run.sh index e8d6b48..b38cfa7 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -104,9 +104,9 @@ if (YesNoBox '([title]="Install GApps" [text]="Do you want to install GApps?")') COMMAND_LINE+=(--install-gapps) fi -# if (YesNoBox '([title]="Remove Amazon Appstore" [text]="Do you want to remove Amazon Appstore?")' no); then -# COMMAND_LINE+=(--remove-amazon) -# fi +if (YesNoBox '([title]="Remove Amazon Appstore" [text]="Do you want to remove Amazon Appstore?")' no); then + COMMAND_LINE+=(--remove-amazon) +fi if (YesNoBox '([title]="Compress output" [text]="Do you want to compress the output?")'); then COMPRESS_FORMAT=$(