Add option to skip fix system props (#254)

Co-authored-by: Howard Wu <40033067+Howard20181@users.noreply.github.com>
This commit is contained in:
Syuugo 2022-11-15 10:07:29 +09:00 committed by GitHub
parent 7d2cca6f15
commit 73eb7dc19e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 7 deletions

View File

@ -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,11 +215,15 @@ 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 --release-type WIS --gapps-brand none
./build.sh --release-type WIS --gapps-brand none --nofix-props
./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,9 +262,10 @@ 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"; shift ;;
@ -680,9 +690,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"

View File

@ -110,7 +110,7 @@ if [ -n "${NEED_INSTALL[*]}" ]; then
NEED_INSTALL_FIX=${NEED_INSTALL_FIX//whiptail/dialog} 2>&1
NEED_INSTALL_FIX=${NEED_INSTALL_FIX//xz-utils/xz} 2>&1
} >> /dev/null
readarray -td ' ' NEED_INSTALL <<<"$NEED_INSTALL_FIX "; unset 'NEED_INSTALL[-1]';
elif [ "$PM" = "apk" ]; then
NEED_INSTALL_FIX=${NEED_INSTALL[*]}