From d41bee363bd8ccfb64a40593d7b0e29fa397b6f0 Mon Sep 17 00:00:00 2001 From: Howard20181 <40033067+Howard20181@users.noreply.github.com> Date: Wed, 11 Jan 2023 17:05:56 +0800 Subject: [PATCH] Fix offline mode GApps version --- scripts/build.sh | 15 ++++++++++----- scripts/extractMagisk.py | 2 +- scripts/extractWSA.py | 2 +- scripts/fixGappsProp.py | 2 +- scripts/generateGappsLink.py | 2 +- scripts/generateMagiskLink.py | 2 +- scripts/generateWSALinks.py | 2 +- scripts/install_deps.sh | 2 +- 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 472e98374e..1ed31a84d2 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with MagiskOnWSALocal. If not, see . # -# Copyright (C) 2022 LSPosed Contributors +# Copyright (C) 2023 LSPosed Contributors # if [ ! "$BASH_VERSION" ]; then @@ -356,7 +356,7 @@ if [ "$CUSTOM_MAGISK" ]; then fi fi fi -ANDROID_API=32 +ANDROID_API=33 update_gapps_zip_name() { if [ "$GAPPS_BRAND" = "OpenGApps" ]; then ANDROID_API=30 @@ -377,8 +377,8 @@ if [ -z "${OFFLINE+x}" ]; then else DOWN_WSA_MAIN_VERSION=2211 fi - if [[ "$DOWN_WSA_MAIN_VERSION" -ge 2211 ]]; then - ANDROID_API=33 + if [[ "$DOWN_WSA_MAIN_VERSION" -lt 2211 ]]; then + ANDROID_API=32 update_gapps_zip_name fi if [ -z "${CUSTOM_MAGISK+x}" ]; then @@ -393,7 +393,12 @@ if [ -z "${OFFLINE+x}" ]; then echo "We have encountered an error while downloading files." exit 1 fi -else +else # Offline mode + # TODO: Removed after Android 13 was released to the retail channel + if [ "$RELEASE_TYPE" = "retail" ]; then + ANDROID_API=32 + update_gapps_zip_name + fi declare -A FILES_CHECK_LIST=([WSA_ZIP_PATH]="$WSA_ZIP_PATH" [xaml_PATH]="$xaml_PATH" [vclibs_PATH]="$vclibs_PATH" [MAGISK_PATH]="$MAGISK_PATH") for i in "${FILES_CHECK_LIST[@]}"; do if [ ! -f "$i" ]; then diff --git a/scripts/extractMagisk.py b/scripts/extractMagisk.py index e35e8d80b0..4c2a30e701 100644 --- a/scripts/extractMagisk.py +++ b/scripts/extractMagisk.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with MagiskOnWSALocal. If not, see . # -# Copyright (C) 2022 LSPosed Contributors +# Copyright (C) 2023 LSPosed Contributors # import sys diff --git a/scripts/extractWSA.py b/scripts/extractWSA.py index a6ad52733f..0c3e6d6676 100644 --- a/scripts/extractWSA.py +++ b/scripts/extractWSA.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with MagiskOnWSALocal. If not, see . # -# Copyright (C) 2022 LSPosed Contributors +# Copyright (C) 2023 LSPosed Contributors # import sys diff --git a/scripts/fixGappsProp.py b/scripts/fixGappsProp.py index 737f4aa812..300b7e207b 100644 --- a/scripts/fixGappsProp.py +++ b/scripts/fixGappsProp.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with MagiskOnWSALocal. If not, see . # -# Copyright (C) 2022 LSPosed Contributors +# Copyright (C) 2023 LSPosed Contributors # from __future__ import annotations diff --git a/scripts/generateGappsLink.py b/scripts/generateGappsLink.py index 78c0af263c..75e7e506cb 100644 --- a/scripts/generateGappsLink.py +++ b/scripts/generateGappsLink.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with MagiskOnWSALocal. If not, see . # -# Copyright (C) 2022 LSPosed Contributors +# Copyright (C) 2023 LSPosed Contributors # import sys diff --git a/scripts/generateMagiskLink.py b/scripts/generateMagiskLink.py index 4bb15e3709..da41be520a 100644 --- a/scripts/generateMagiskLink.py +++ b/scripts/generateMagiskLink.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with MagiskOnWSALocal. If not, see . # -# Copyright (C) 2022 LSPosed Contributors +# Copyright (C) 2023 LSPosed Contributors # import sys diff --git a/scripts/generateWSALinks.py b/scripts/generateWSALinks.py index 3aa8a4fab8..2e28451382 100644 --- a/scripts/generateWSALinks.py +++ b/scripts/generateWSALinks.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with MagiskOnWSALocal. If not, see . # -# Copyright (C) 2022 LSPosed Contributors +# Copyright (C) 2023 LSPosed Contributors # import html diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index 62e88ad8fc..852655f0d3 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with MagiskOnWSALocal. If not, see . # -# Copyright (C) 2022 LSPosed Contributors +# Copyright (C) 2023 LSPosed Contributors # if [ ! "$BASH_VERSION" ]; then