mirror of
https://github.com/LSPosed/MagiskOnWSALocal.git
synced 2025-05-06 14:56:36 +08:00
parent
960760f07c
commit
81d59ad9dd
@ -48,7 +48,6 @@ function YesNoBox {
|
||||
ARCH=$(
|
||||
Radiolist '([title]="Build arch"
|
||||
[default]="x64")' \
|
||||
\
|
||||
'x64' "X86_64" 'on' \
|
||||
'arm64' "AArch64" 'off'
|
||||
)
|
||||
@ -56,34 +55,42 @@ ARCH=$(
|
||||
RELEASE_TYPE=$(
|
||||
Radiolist '([title]="WSA release type"
|
||||
[default]="retail")' \
|
||||
\
|
||||
'retail' "Stable Channel" 'on' \
|
||||
'release preview' "Release Preview Channel" 'off' \
|
||||
'insider slow' "Beta Channel" 'off' \
|
||||
'insider fast' "Dev Channel" 'off'
|
||||
)
|
||||
|
||||
if [ -z "${CUSTOM_MAGISK+x}" ]; then
|
||||
if (YesNoBox '([title]="Root" [text]="Do you want to Root WSA?")'); then
|
||||
ROOT_SOL=$(
|
||||
Radiolist '([title]="Root solution"
|
||||
[default]="magisk")' \
|
||||
'magisk' "Magisk" 'on' \
|
||||
'kernelsu' "KernelSU" 'off'
|
||||
)
|
||||
else
|
||||
ROOT_SOL="none"
|
||||
fi
|
||||
|
||||
if [ "$ROOT_SOL" = "magisk" ]; then
|
||||
MAGISK_VER=$(
|
||||
Radiolist '([title]="Magisk version"
|
||||
[default]="stable")' \
|
||||
\
|
||||
[default]="stable")' \
|
||||
'stable' "Stable Channel" 'on' \
|
||||
'beta' "Beta Channel" 'off' \
|
||||
'canary' "Canary Channel" 'off' \
|
||||
'debug' "Canary Channel Debug Build" 'off'
|
||||
)
|
||||
else
|
||||
MAGISK_VER=debug
|
||||
MAGISK_VER=stable
|
||||
fi
|
||||
|
||||
if (YesNoBox '([title]="Install GApps" [text]="Do you want to install GApps?")'); then
|
||||
GAPPS_BRAND=$(
|
||||
Radiolist '([title]="Which GApps do you want to install?"
|
||||
[default]="MindTheGapps")' \
|
||||
\
|
||||
'OpenGApps' "This flavor may cause startup failure" 'off' \
|
||||
'MindTheGapps' "Recommend" 'on'
|
||||
[default]="MindTheGapps")' \
|
||||
'MindTheGapps' "Recommend" 'on' \
|
||||
'OpenGApps' "This flavor may cause startup failure" 'off'
|
||||
)
|
||||
else
|
||||
GAPPS_BRAND="none"
|
||||
@ -91,20 +98,19 @@ fi
|
||||
if [ "$GAPPS_BRAND" = "OpenGApps" ]; then
|
||||
# TODO: Keep it pico since other variants of opengapps are unable to boot successfully
|
||||
if [ "$DEBUG" = "1" ]; then
|
||||
GAPPS_VARIANT=$(
|
||||
Radiolist '([title]="Variants of GApps"
|
||||
[default]="pico")' \
|
||||
\
|
||||
'super' "" 'off' \
|
||||
'stock' "" 'off' \
|
||||
'full' "" 'off' \
|
||||
'mini' "" 'off' \
|
||||
'micro' "" 'off' \
|
||||
'nano' "" 'off' \
|
||||
'pico' "" 'on' \
|
||||
'tvstock' "" 'off' \
|
||||
'tvmini' "" 'off'
|
||||
)
|
||||
GAPPS_VARIANT=$(
|
||||
Radiolist '([title]="Variants of GApps"
|
||||
[default]="pico")' \
|
||||
'super' "" 'off' \
|
||||
'stock' "" 'off' \
|
||||
'full' "" 'off' \
|
||||
'mini' "" 'off' \
|
||||
'micro' "" 'off' \
|
||||
'nano' "" 'off' \
|
||||
'pico' "" 'on' \
|
||||
'tvstock' "" 'off' \
|
||||
'tvmini' "" 'off'
|
||||
)
|
||||
else
|
||||
GAPPS_VARIANT=pico
|
||||
fi
|
||||
@ -118,15 +124,6 @@ else
|
||||
REMOVE_AMAZON="--remove-amazon"
|
||||
fi
|
||||
|
||||
ROOT_SOL=$(
|
||||
Radiolist '([title]="Root solution"
|
||||
[default]="magisk")' \
|
||||
\
|
||||
'magisk' "Magisk" 'on' \
|
||||
'kernelsu' "KernelSU" 'off' \
|
||||
'none' "Without root" 'off'
|
||||
)
|
||||
|
||||
if (YesNoBox '([title]="Compress output" [text]="Do you want to compress the output?")'); then
|
||||
COMPRESS_OUTPUT="--compress"
|
||||
else
|
||||
@ -135,19 +132,13 @@ fi
|
||||
if [ "$COMPRESS_OUTPUT" = "--compress" ]; then
|
||||
COMPRESS_FORMAT=$(
|
||||
Radiolist '([title]="Compress format"
|
||||
[default]="7z")' \
|
||||
\
|
||||
[default]="7z")' \
|
||||
'zip' "Zip" 'off' \
|
||||
'7z' "7-Zip" 'on' \
|
||||
'xz' "tar.xz" 'off'
|
||||
)
|
||||
)
|
||||
fi
|
||||
# if (YesNoBox '([title]="Off line mode" [text]="Do you want to enable off line mode?")'); then
|
||||
# OFFLINE="--offline"
|
||||
# else
|
||||
# OFFLINE=""
|
||||
# fi
|
||||
# OFFLINE="--offline"
|
||||
|
||||
clear
|
||||
declare -A RELEASE_TYPE_MAP=(["retail"]="retail" ["release preview"]="RP" ["insider slow"]="WIS" ["insider fast"]="WIF")
|
||||
COMMAND_LINE=(--arch "$ARCH" --release-type "${RELEASE_TYPE_MAP[$RELEASE_TYPE]}" --magisk-ver "$MAGISK_VER" --gapps-brand "$GAPPS_BRAND" --gapps-variant "$GAPPS_VARIANT" "$REMOVE_AMAZON" --root-sol "$ROOT_SOL" "$COMPRESS_OUTPUT" "$OFFLINE" "$DEBUG" "$CUSTOM_MAGISK" --compress-format "$COMPRESS_FORMAT")
|
||||
|
Loading…
x
Reference in New Issue
Block a user