diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bef55a5..384e7cc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -57,6 +57,11 @@ on: required: true default: true type: boolean + # nofix_props: + # description: Props Remain Unfixed + # required: true + # default: false + # type: boolean compression: description: "Compression Algorithm" required: true @@ -99,7 +104,7 @@ jobs: DOWNLOAD_DIR=../download DOWNLOAD_CONF_NAME=download.list - declare -A opts=( ["ARCH,x86_64"]="x64" ["ARCH,ARM64"]="arm64" ["RELEASE_TYPE,General Availability Channel"]="retail" ["RELEASE_TYPE,Release Preview Channel"]="RP" ["RELEASE_TYPE,Beta Channel"]="WIS" ["RELEASE_TYPE,Dev Channel"]="WIF" ["MAGISK_VER,Stable"]="stable" ["MAGISK_VER,Beta"]="beta" ["MAGISK_VER,Canary"]="canary" ["MAGISK_VER,Debug"]="debug" ["MAGISK_VER,Custom"]="--magisk-custom" ["GAPPS_VAR,None"]="none" ["GAPPS_VAR,Pico"]="pico" ["GAPPS_VAR,Full"]="full" ["REMOVE_AMAZON,true"]="--remove-amazon" ["COMPRESSION,ZIP"]="zip" ["COMPRESSION,7-Zip"]="7z" ["COMPRESSION,XZ"]="xz" ) + declare -A opts=( ["ARCH,x86_64"]="x64" ["ARCH,ARM64"]="arm64" ["RELEASE_TYPE,General Availability Channel"]="retail" ["RELEASE_TYPE,Release Preview Channel"]="RP" ["RELEASE_TYPE,Beta Channel"]="WIS" ["RELEASE_TYPE,Dev Channel"]="WIF" ["MAGISK_VER,Stable"]="stable" ["MAGISK_VER,Beta"]="beta" ["MAGISK_VER,Canary"]="canary" ["MAGISK_VER,Debug"]="debug" ["MAGISK_VER,Custom"]="--magisk-custom" ["GAPPS_VAR,None"]="none" ["GAPPS_VAR,Pico"]="pico" ["GAPPS_VAR,Full"]="full" ["REMOVE_AMAZON,true"]="--remove-amazon" ["NOFIX_PROPS,true"]="--nofix-props" ["COMPRESSION,ZIP"]="zip" ["COMPRESSION,7-Zip"]="7z" ["COMPRESSION,XZ"]="xz" ) ARCH="${opts[ARCH,${{ inputs.arch }}]}" @@ -208,6 +213,8 @@ jobs: REMOVE_AMAZON="${opts[REMOVE_AMAZON,${{ inputs.remove_amazon }}]}" + NOFIX_PROPS="${opts[NOFIX_PROPS,${{ inputs.nofix_props }}]}" + COMPRESSION="--compress --compress-format ${opts[COMPRESSION,${{ inputs.compression }}]}" if [[ "${{ inputs.gapps_var }}" == "Custom"* ]]; then @@ -225,7 +232,7 @@ jobs: OFFLINE="--offline" fi - COMMAND_LINE=(--arch "$ARCH" --release-type "$RELEASE_TYPE" --root-sol "$ROOT_SOL" --magisk-ver "$MAGISK_VER" "$CUSTOM_MAGISK" --gapps-brand "$GAPPS_BRAND" --gapps-variant "$GAPPS_VAR" "$COMPRESSION" "$REMOVE_AMAZON" "$OFFLINE") + COMMAND_LINE=(--arch "$ARCH" --release-type "$RELEASE_TYPE" --root-sol "$ROOT_SOL" --magisk-ver "$MAGISK_VER" "$CUSTOM_MAGISK" --gapps-brand "$GAPPS_BRAND" --gapps-variant "$GAPPS_VAR" "$COMPRESSION" "$REMOVE_AMAZON" "$NOFIX_PROPS" "$OFFLINE") echo "COMMAND_LINE=${COMMAND_LINE[*]}" chmod +x ./build.sh diff --git a/README.md b/README.md index 198cf8a..c9977df 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ ## Uninstallation -> Note: If you want to preseve your data, make a backup of the `%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\userdata.vhdx` file. After uninstalling, copy the VHDX file back to the `%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache` folder. To then restore your app icons to the start menu, install [WSAHelper](https://github.com/LSPosed/WSAHelper/releases/latest) and follow their instructions +> Note: If you want to preseve your data, make a backup of the `%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\userdata.vhdx` file. After uninstalling, copy the VHDX file back to the `%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache` folder. 1. Go to the Start Menu 2. Type `Windows Subsystem for Android` diff --git a/arm64/gapps/priv-app/SetupWizard/SetupWizard.apk b/arm64/gapps/priv-app/SetupWizard/SetupWizard.apk deleted file mode 100644 index 6fae55f..0000000 Binary files a/arm64/gapps/priv-app/SetupWizard/SetupWizard.apk and /dev/null differ diff --git a/arm64/system/system/priv-app/WSAHelper/WSAHelper.apk b/arm64/system/system/priv-app/WSAHelper/WSAHelper.apk deleted file mode 100755 index 9817e05..0000000 Binary files a/arm64/system/system/priv-app/WSAHelper/WSAHelper.apk and /dev/null differ diff --git a/scripts/build.sh b/scripts/build.sh index b85e80e..0abdf56 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -162,9 +162,13 @@ ARR_TO_STR() { printf -v joined "%s, " "${arr[@]}" echo "${joined%, }" } +GAPPS_PROPS_MSG1="\033[0;31mWARNING: Services such as the Play Store may stop working properly." +GAPPS_PROPS_MSG2="We are not responsible for any problems caused by this!\033[0m" +GAPPS_PROPS_MSG3="Info: https://support.google.com/android/answer/10248227" usage() { default - echo "Usage: + echo -e " +Usage: --arch Architecture of WSA. Possible values: $(ARR_TO_STR "${ARCH_MAP[@]}") @@ -211,10 +215,14 @@ Additional Options: --magisk-custom Install custom Magisk --debug Debug build mode --help Show this help message and exit + --nofix-props No fix \"build.prop\" + $GAPPS_PROPS_MSG1 + $GAPPS_PROPS_MSG2 + $GAPPS_PROPS_MSG3 Example: ./build.sh --release-type RP --magisk-ver beta --gapps-variant pico --remove-amazon - ./build.sh --arch arm64 --release-type WIF --gapps-brand MindTheGapps + ./build.sh --arch arm64 --release-type WIF --gapps-brand OpenGApps --nofix-props ./build.sh --release-type WIS --gapps-brand none ./build.sh --offline --gapps-variant pico --magisk-custom " @@ -226,6 +234,7 @@ ARGUMENT_LIST=( "magisk-ver:" "gapps-brand:" "gapps-variant:" + "nofix-props" "root-sol:" "compress-format:" "remove-amazon" @@ -253,12 +262,13 @@ while [[ $# -gt 0 ]]; do --release-type ) RELEASE_TYPE="$2"; shift 2 ;; --gapps-brand ) GAPPS_BRAND="$2"; shift 2 ;; --gapps-variant ) GAPPS_VARIANT="$2"; shift 2 ;; + --nofix-props ) NOFIX_PROPS="yes"; shift ;; --root-sol ) ROOT_SOL="$2"; shift 2 ;; --compress-format ) COMPRESS_FORMAT="$2"; shift 2 ;; - --remove-amazon ) REMOVE_AMAZON="remove"; shift ;; + --remove-amazon ) REMOVE_AMAZON="yes"; shift ;; --compress ) COMPRESS_OUTPUT="yes"; shift ;; --offline ) OFFLINE="on"; shift ;; - --magisk-custom ) CUSTOM_MAGISK="debug"; MAGISK_VER=$CUSTOM_MAGISK; shift ;; + --magisk-custom ) CUSTOM_MAGISK="debug"; shift ;; --magisk-ver ) MAGISK_VER="$2"; shift 2 ;; --debug ) DEBUG="on"; shift ;; --help ) usage; exit 0 ;; @@ -266,6 +276,12 @@ while [[ $# -gt 0 ]]; do esac done +if [ "$CUSTOM_MAGISK" ]; then + if [ -z "$MAGISK_VER" ]; then + MAGISK_VER=$CUSTOM_MAGISK + fi +fi + check_list() { local input=$1 if [ -n "$input" ]; then @@ -312,7 +328,7 @@ RELEASE_NAME=${RELEASE_NAME_MAP[$RELEASE_TYPE]} || abort echo -e "Build: RELEASE_TYPE=$RELEASE_NAME" -WSA_ZIP_PATH=$DOWNLOAD_DIR/wsa-$ARCH-$RELEASE_TYPE.zip +WSA_ZIP_PATH=$DOWNLOAD_DIR/wsa-$RELEASE_TYPE.zip vclibs_PATH=$DOWNLOAD_DIR/Microsoft.VCLibs."$ARCH".14.00.Desktop.appx xaml_PATH=$DOWNLOAD_DIR/Microsoft.UI.Xaml_"$ARCH".appx MAGISK_ZIP=magisk-$MAGISK_VER.zip @@ -433,10 +449,6 @@ if [ "$GAPPS_BRAND" != 'none' ]; then rm -rf "${WORK_DIR:?}"/gapps/system || abort fi cp -r ../"$ARCH"/gapps/* "$WORK_DIR"/gapps || abort - if [ "$GAPPS_BRAND" = "MindTheGapps" ]; then - mv "$WORK_DIR"/gapps/priv-app/* "$WORK_DIR"/gapps/system_ext/priv-app || abort - rm -rf "${WORK_DIR:?}"/gapps/priv-app || abort - fi else echo "The $GAPPS_BRAND zip package does not exist." abort @@ -674,9 +686,13 @@ if [ "$GAPPS_BRAND" != 'none' ]; then fi if [ "$GAPPS_BRAND" != 'none' ]; then - echo "Fix $GAPPS_BRAND prop" - $SUDO python3 fixGappsProp.py "$MOUNT_DIR" || abort - echo -e "done\n" + if [ "$NOFIX_PROPS" ]; then + echo -e "Skip fix $GAPPS_BRAND prop!\n$GAPPS_PROPS_MSG1\n$GAPPS_PROPS_MSG2\n$GAPPS_PROPS_MSG3\n" + else + echo "Fix $GAPPS_BRAND prop" + $SUDO python3 fixGappsProp.py "$MOUNT_DIR" || abort + echo -e "done\n" + fi fi echo "Umount images" diff --git a/scripts/generateWSALinks.py b/scripts/generateWSALinks.py index 8314a29..7f1799e 100644 --- a/scripts/generateWSALinks.py +++ b/scripts/generateWSALinks.py @@ -91,7 +91,7 @@ for i, v, f in identities: # out_file_name = f"Microsoft.VCLibs.140.00.UWPDesktop_{arch}.appx" # out_file = download_dir / out_file_name elif re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", f): - out_file_name = f"wsa-{arch}-{release_type}.zip" + out_file_name = f"wsa-{release_type}.zip" out_file = download_dir / out_file_name else: continue diff --git a/x64/gapps/priv-app/SetupWizard/SetupWizard.apk b/x64/gapps/priv-app/SetupWizard/SetupWizard.apk deleted file mode 100644 index a73639e..0000000 Binary files a/x64/gapps/priv-app/SetupWizard/SetupWizard.apk and /dev/null differ diff --git a/x64/system/system/priv-app/WSAHelper/WSAHelper.apk b/x64/system/system/priv-app/WSAHelper/WSAHelper.apk deleted file mode 100755 index 9817e05..0000000 Binary files a/x64/system/system/priv-app/WSAHelper/WSAHelper.apk and /dev/null differ