From 88db0952508cec596581d9f405fbd34f1ef7e428 Mon Sep 17 00:00:00 2001 From: Didgeridoohan Date: Tue, 29 May 2018 22:44:54 +0200 Subject: [PATCH] v2.2.1 --- README.md | 4 ++++ module.prop | 2 +- system/binpath/props | 53 +++++++++++++++++++++++++++++++++++++++----- 3 files changed, 53 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4329401..a2a5dee 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,10 @@ If you have the latest beta release of Magisk installed, the "magisk_debug.log" ## Changelog +### v2.2.1 +- Added a check for entering empty values for fingerprint and custom props. +- Added a command option to go directly to the settings menu. Run `props` with the -h option for details. + ### v2.2.0 - Added an option to set prop values earlier in the boot process. - Moved module setup from post-fs-data.sh to post-fs-data.d. diff --git a/module.prop b/module.prop index 9366371..4b6c4d0 100644 --- a/module.prop +++ b/module.prop @@ -1,7 +1,7 @@ id=MagiskHidePropsConf name=MagiskHide Props Config version=v2.2.0-v17 -versionCode=13 +versionCode=14 author=Didgeridoohan description=Change your device's fingerprint, to pass SafetyNet's CTS Profile check. Edit prop files for better root hiding. Set/reset prop values set by MagiskHide. Change any prop values easily. minMagisk=1500 diff --git a/system/binpath/props b/system/binpath/props index c903d36..8e974b6 100644 --- a/system/binpath/props +++ b/system/binpath/props @@ -48,6 +48,27 @@ esac # Load functions . $MODPATH/util_functions.sh +blank_input() { + # Find menu level + case $1 in + 1) INPUT="" + ;; + 2) INPUT2="" + ;; + 3) INPUT3="" + ;; + 4) INPUT4="" + ;; + 5) INPUT5="" + ;; + esac + + echo "" + echo "${R}Don't enter an empty value${N}." + echo "Try again." + sleep 2 +} + invalid_input() { INPMSG="" @@ -229,6 +250,10 @@ menu_change_fingerprint() { ;; e) exit_fn ;; + "") blank_input 2 + ;; + *[[:blank:]]*) blank_input 2 + ;; *) menu_new_print "$1" "$INPUT2" 2 ;; esac @@ -934,6 +959,10 @@ menu_new_custprop() { ;; e) exit_fn ;; + "") blank_input 3 + ;; + *[[:blank:]]*) blank_input 3 + ;; *) if [ "$(echo $PROPSLIST | grep -o $INPUT3)" ]; then menu_magiskhide_custprop "$INPUT3" @@ -1041,6 +1070,10 @@ menu_set_new_custprop() { ;; e) exit_fn ;; + "") blank_input 4 + ;; + *[[:blank:]]*) blank_input 4 + ;; *) menu_set_custprop "$1" "$INPUT4" INPUT2="" @@ -1156,7 +1189,9 @@ menu_options() { echo "${G}2${N} - Script colours ${CC}(${COLOURTXT})${N}" echo "${G}3${N} - Fingerprints list check ${CP}(${PRINTSCHKTXT})${N}" echo "${G}r${N} - Reset all settings" - echo "${G}b${N} - Go back to main menu" + if [ "$2" != "s" ]; then + echo "${G}b${N} - Go back to main menu" + fi echo "" echo "See the module readme or the" echo "support thread @ XDA for details." @@ -1174,8 +1209,12 @@ menu_options() { r) menu_options_reset "Reset all settings" ;; b) - INPUT="" - break + if [ "$2" == "s" ]; then + invalid_input 1 2 + else + INPUT="" + break + fi ;; e) exit_fn ;; @@ -1471,6 +1510,7 @@ case "$1" in echo " -nw Turn off fingerprint startup check." echo " -p Improved hiding (edit prop files)." echo " -r Reset all options/settings." + echo " -s Open script settings menu." echo "" echo "See the module readme or the" echo "support thread @ XDA for details." @@ -1492,6 +1532,9 @@ case "$1" in *r*) # Reset all settings reset_everything "Reset all settings" "r" ;; + *s*) # Open settings menu + menu_options "Script settings" "s" + ;; esac if [ "$(get_file_value $LATEFILE "OPTIONWEB=")" == 0 ]; then @@ -1508,7 +1551,7 @@ esac if [ "$1" ]; then case "$1" in - *d*|*f*|*h*|*nc*|*nw*|*p*|*r*) # Do nothing + *d*|*f*|*h*|*nc*|*nw*|*p*|*r*|*s*) # Do nothing ;; *) menu_header "${C}Help${N}" @@ -1516,7 +1559,7 @@ if [ "$1" ]; then echo "${R}Invalid option.${N}" echo "" echo "Try again without options," - echo "or use -h for details." + echo "or use -h for help and details." echo "" exit 0 ;;