Skip to content

Commit f12cd6e

Browse files
Update to v6.0.1-v132
1 parent 9b93323 commit f12cd6e

File tree

7 files changed

+567
-66
lines changed

7 files changed

+567
-66
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,9 @@ There are a couple of persistent options that you can set for the `props` script
400400
### Boot stage
401401
It's possible to move the execution of the boot script from the default system.prop file to either post-fs-data or late_start service. If there are any kind of issues during boot or that props don't set properly, try changing the boot stage to either post-fs-data or late_start service instead. Just keep in mind that this might cause other issues like the fingerprint not setting properly (if set during late_start service) or that post-fs-data will be interupted by having too many props causing the script to run too slow.
402402

403-
It is also possible to set individual props, like fingerprint, security patch date and custom props individualy. There'll be an option under the corresponding menu.
403+
It is also possible to set individual props, like fingerprint, security patch date and custom props individualy. There'll be an option under the corresponding menu
404+
405+
If boot stage is set to late_start service, general execution or for specific prop types, it is also possible to enable a soft reboot after these props are changed. This can sometimes be needed for a prop to properly be set to memory at such a late stage in the boot process, so if a prop doesn't appear to be set properly during the late_start service boot stage, try enabling this option. This feature is disabled by default since it has the possibility to cause issues on some devices.
404406

405407
Note: post-fs-data runs earlier than system.prop and late_start service runs after, right at the end of the boot process. Having to many props set in post-fs-data may have an adverse effect on the boot process and may result in props not being set properly. Using the default system.prop file or late_start service is prefered if possible.
406408

@@ -432,7 +434,7 @@ If you have a lot of different props set it can be handy to have a [configuratio
432434
## Configuration file
433435
You can use a configuration file to set your desired options, rather than running the `props` command. This is particularly useful if you have a large amount of custom props you want to set. Download the [settings file](https://raw.githubusercontent.com/Magisk-Modules-Repo/MagiskHide-Props-Config/master/common/propsconf_conf), extract it from the module zip (in the /common folder) or copy it from the module directory under /data/adb (in the /common folder), fill in the desired options (follow the instructions in the file), place it in the root of your internal storage (/sdcard), in /data or in /cache (or /data/cache if you're using an A/B device) and reboot. You can also use the configuration file when first installing the module. Just place the file in the root of your internal storage (or one of the other previously mentioned locations) before flashing the module and the installation script will set everything up.
434436

435-
**NOTE!** If a configuration file is used during boot there will be a reboot during the late_start service boot mode, to load the newly set up values. This can cause issues for devices that have to boot through recovery for Magisk to be active (A-only SAR devices), so a manual reboot after the automatic one will be necessary (or just use the configuration file at install instead).
437+
**NOTE!** If a configuration file is used during boot there will be a reboot during the late_start service boot stage, to load the newly set up values. This can cause issues for devices that have to boot through recovery for Magisk to be active (A-only SAR devices), so a manual reboot after the automatic one will be necessary (or just use the configuration file at install instead).
436438

437439
If you edit the configuration file in Windows, make sure that you use a text editor that can handle [Unix file endings](https://en.m.wikipedia.org/wiki/Newline), such as Notepad++ and similar editors (not regular Windows Notepad).
438440

@@ -522,6 +524,8 @@ This module can usually only really help with the ctsProfile check, by spoofing
522524
### Props don't seem to set properly
523525
If it seems like props you're trying to set with the module don't get set properly (ctsProfile still doesn't pass, custom props don't work, etc), go into the script options and change the boot stage at which the props are being set, or change the boot stage for that particular prop, to late_start service. See ["Boot stage"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config#boot-stage) or ["Custom prop values"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#changeset-custom-prop-values) above. This might happen because the particular prop you're trying to set get assigned it's value late in the boot process and by setting the boot stage for the prop to the last one available (late_start service) you optimise the chances of the module setting the prop after the system.
524526

527+
If the boot stage already is set to the late_start service stage you might need to activate the soft reboot option for that particular setting. Sometimes a soft reboot is required after setting a prop for the value to be properly loaded into memory.
528+
525529
This may also be caused by the post-fs-data.sh script being set to run in the background because of the execution taking to long. Try disabling this option in the [script settings](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#prop-script-settings) and see if that changes anything.
526530

527531
There is also a possibility that the prop value you are trying to set is too long. This is only an issue on Magisk releases up until build 22006, where the prop value is limited to 91 characters. Builds after that should not have this issue.
@@ -556,11 +560,11 @@ If boot takes longer than usual after setting a new fingerprint or a custom prop
556560

557561

558562
### There's a reboot during boot
559-
This happens when any prop is set during the late_start service boot stage. A soft reboot is necessary to properly load the new prop values.
563+
This happens when any prop is set during the late_start service boot stage and the soft reboot option is enabled. A soft reboot can sometime be necessary to properly load the new prop values, but also has the potential for causing issues on some devices.
560564

561565

562566
### The screen goes black momentarily at boot
563-
See the section directly above.
567+
See the section directly above about an additional reboot. Same thing.
564568

565569

566570
### The Play Store is "uncertified"
@@ -610,6 +614,10 @@ Releases from v5.4.0 will only install on Magisk v20.4+.
610614

611615

612616
## Changelog
617+
### v6.0.1
618+
- Quickfix update to make the soft reboot when setting props in the late_start service boot stage an option. It has the potential for causing issues it seems (mainly on Samsung devices apparently). See the documentation for details.
619+
- Minor UI fixes and optimisations.
620+
613621
### v6.0.0
614622
- Updated the "Edit MagiskHide props" feature to include all the sensitive prop values that MagiskHide changed, up to and including Magisk v23. All props will now be set by default. See the documentation for details.
615623
- Alter the permissions for SELinux files if SELinux is permissive (was included in MagiskHide up to Magisk v23).

common/propsconf_conf

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# =================================================================
1010

1111
# Required module version (or newer). Do not edit this value!
12-
CONFTRANSF=600
12+
CONFTRANSF=601
1313

1414
# Device fingerprint
1515
CONFFINGERPRINT=""
@@ -69,6 +69,14 @@ PROPOPTION=replace
6969
CONFDELPROPS=""
7070
DELPROPOPTION=replace
7171

72+
# Soft reboot options
73+
CONFOPTIONSOFTBOOT=false
74+
CONFPRINTSOFTBOOT=false
75+
CONFPATCHSOFTBOOT=false
76+
CONFSIMSOFTBOOT=false
77+
CONFCUSTOMSOFTBOOT=false
78+
CONFPROPSOFTBOOT=false
79+
7280
# Module settings
7381
CONFBOOT=default
7482
CONFCOLOUR=true
@@ -220,6 +228,11 @@ CONFBACK=false
220228
# This option supersedes the preserve option described above, but only
221229
# for the CONFDELPROPS variable.
222230

231+
# The soft rebooot options can be set to true if you need a soft reboot at the
232+
# end of the boot process when props are set during the late_start service boot stage.
233+
# CONFOPTIONSOFTBOOT, CONFPRINTSOFTBOOT, CONFPATCHSOFTBOOT, CONFSIMSOFTBOOT,
234+
# CONFCUSTOMSOFTBOOT and CONFPROPSOFTBOOT can be set to "true" or "false".
235+
223236
# CONFBOOT is by default set to using the module system.prop file for most props.
224237
# If the setting is changed to "post" or "late", the props will be set during either
225238
# post-fs-data or late_start service mode. This is useful if props don't seem to set

common/propsconf_late

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# In that case, feel free to delete it.
99

1010
# Script version
11-
SCRIPTV=38
11+
SCRIPTV=39
1212
SETTRANSF=4
1313
NOTTRANSF="PROPCOUNT;PROPEDIT;REDEBUGGABLE;RESECURE;RETYPE;RETAGS;REBOOTMODE;REMODE"
1414

@@ -52,6 +52,12 @@ DELEDIT=0
5252
PRINTSTAGE=0
5353
PATCHSTAGE=2
5454
SIMSTAGE=0
55+
OPTIONSOFTBOOT=0
56+
PRINTSOFTBOOT=0
57+
PATCHSOFTBOOT=0
58+
SIMSOFTBOOT=0
59+
CUSTOMSOFTBOOT=0
60+
PROPSOFTBOOT=0
5561

5662
# Script settings
5763
OPTIONBOOT=0

common/util_functions.sh

Lines changed: 111 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ if [ "$INSTFN" ]; then
7878
PRINTSTAGE
7979
PATCHSTAGE
8080
SIMSTAGE
81+
OPTIONSOFTBOOT
82+
PRINTSOFTBOOT
83+
PATCHSOFTBOOT
84+
SIMSOFTBOOT
85+
CUSTOMSOFTBOOT
86+
PROPSOFTBOOT
8187
OPTIONBOOT
8288
OPTIONCOLOUR
8389
OPTIONWEBP
@@ -898,6 +904,62 @@ config_file() {
898904
fi
899905
fi
900906

907+
# Updates soft boot options
908+
if [ "$CONFOPTIONSOFTBOOT" == true ]; then
909+
OPTLCHNG=1
910+
TMPTXT="enabled"
911+
else
912+
OPTLCHNG=0
913+
TMPTXT="disabled"
914+
fi
915+
replace_fn OPTIONSOFTBOOT $OPTIONSOFTBOOT $OPTLCHNG $LATEFILE
916+
log_handler "Soft reboot option for late_start service boot stage $TMPTXT."
917+
if [ "$CONFPRINTSOFTBOOT" == true ]; then
918+
OPTLCHNG=1
919+
TMPTXT="enabled"
920+
else
921+
OPTLCHNG=0
922+
TMPTXT="disabled"
923+
fi
924+
replace_fn PRINTSOFTBOOT $PRINTSOFTBOOT $OPTLCHNG $LATEFILE
925+
log_handler "Soft reboot option for device fingerprint $TMPTXT."
926+
if [ "$CONFPATCHSOFTBOOT" == true ]; then
927+
OPTLCHNG=1
928+
TMPTXT="enabled"
929+
else
930+
OPTLCHNG=0
931+
TMPTXT="disabled"
932+
fi
933+
replace_fn PATCHSOFTBOOT $PATCHSOFTBOOT $OPTLCHNG $LATEFILE
934+
log_handler "Soft reboot option for security patch date $TMPTXT."
935+
if [ "$CONFSIMSOFTBOOT" == true ]; then
936+
OPTLCHNG=1
937+
TMPTXT="enabled"
938+
else
939+
OPTLCHNG=0
940+
TMPTXT="disabled"
941+
fi
942+
replace_fn SIMSOFTBOOT $SIMSOFTBOOT $OPTLCHNG $LATEFILE
943+
log_handler "Soft reboot option for device simulation $TMPTXT."
944+
if [ "$CONFCUSTOMSOFTBOOT" == true ]; then
945+
OPTLCHNG=1
946+
TMPTXT="enabled"
947+
else
948+
OPTLCHNG=0
949+
TMPTXT="disabled"
950+
fi
951+
replace_fn CUSTOMSOFTBOOT $CUSTOMSOFTBOOT $OPTLCHNG $LATEFILE
952+
log_handler "Soft reboot option for custom props $TMPTXT."
953+
if [ "$CONFPROPSOFTBOOT" == true ]; then
954+
OPTLCHNG=1
955+
TMPTXT="enabled"
956+
else
957+
OPTLCHNG=0
958+
TMPTXT="disabled"
959+
fi
960+
replace_fn PROPSOFTBOOT $PROPSOFTBOOT $OPTLCHNG $LATEFILE
961+
log_handler "Soft reboot option for sensitive props $TMPTXT."
962+
901963
# Updates options
902964
# Boot stage
903965
if [ "$CONFBOOT" == "default" ]; then
@@ -1346,7 +1408,7 @@ print_edit() {
13461408
echo "ro.build.fingerprint=${PRINTCHNG}" >> $1
13471409
else
13481410
resetprop -nv ro.build.fingerprint "$PRINTCHNG" >> $LOGFILE 2>&1
1349-
if [ "$BOOTSTAGE" == "late" ]; then
1411+
if [ "$BOOTSTAGE" == "late" ] && [ "$PRINTSOFTBOOT" = 1 ]; then
13501412
PROPLATE=true
13511413
fi
13521414
fi
@@ -1362,7 +1424,7 @@ print_edit() {
13621424
echo "ro.build.description=${SIMDESCRIPTION}" >> $1
13631425
else
13641426
resetprop -nv ro.build.description "$SIMDESCRIPTION" >> $LOGFILE 2>&1
1365-
if [ "$BOOTSTAGE" == "late" ]; then
1427+
if [ "$BOOTSTAGE" == "late" ] && [ "$PRINTSOFTBOOT" = 1 ]; then
13661428
PROPLATE=true
13671429
fi
13681430
fi
@@ -1388,7 +1450,7 @@ patch_edit() {
13881450
echo "ro.build.version.security_patch=${SECPATCH}" >> $1
13891451
else
13901452
resetprop -nv ro.build.version.security_patch "$SECPATCH" >> $LOGFILE 2>&1
1391-
if [ "$BOOTSTAGE" == "late" ]; then
1453+
if [ "$BOOTSTAGE" == "late" ] && [ "$PATCHSOFTBOOT" = 1 ]; then
13921454
PROPLATE=true
13931455
fi
13941456
fi
@@ -1785,7 +1847,7 @@ forced_basic() {
17851847
fi
17861848
resetprop -nv ro.product.model "$TMPVAL" >> $LOGFILE 2>&1
17871849
set_partition_props "none" "ro.product.model" "$TMPVAL"
1788-
if [ "$BOOTSTAGE" == "late" ]; then
1850+
if [ "$BOOTSTAGE" == "late" ] && [ "$OPTIONSOFTBOOT" = 1 ]; then
17891851
PROPLATE=true
17901852
fi
17911853
fi
@@ -1850,7 +1912,7 @@ dev_sim_edit() {
18501912
echo "${ITEM}=${TMPVALUE}" >> $1
18511913
else
18521914
resetprop -nv $ITEM "$TMPVALUE" >> $LOGFILE 2>&1
1853-
if [ "$BOOTSTAGE" == "late" ]; then
1915+
if [ "$BOOTSTAGE" == "late" ] && [ "$SIMSOFTBOOT" = 1 ]; then
18541916
PROPLATE=true
18551917
fi
18561918
fi
@@ -1957,39 +2019,45 @@ change_sim_partprops() {
19572019
# ======================== MagiskHide Props functions ========================
19582020
# Populate menu, $1=List of props to go through (with safe values), $2=type of list, $3=check if menu items should be printed or only counted
19592021
magiskhide_props_menu() {
1960-
ACTIVE="${G} (active)${N}"
1961-
for ITEM in $1; do
1962-
PROP=$(get_prop_type $(get_eq_left "$ITEM"))
1963-
ORIGVALUE=$(eval "echo \$$(echo "ORIG${PROP}" | tr '[:lower:]' '[:upper:]')")
1964-
if [ "$ORIGVALUE" ] && [ "$(get_eq_right "$ITEM")" != "$ORIGVALUE" ]; then
1965-
CTRLTRIGG=false;
1966-
if [ "$2" == "trigger" ]; then
1967-
magiskhide_trigger "$ITEM"
1968-
fi
1969-
if [ "$CTRLTRIGG" == "false" ]; then
1970-
if [ "$ITEMCOUNT" == 0 ]; then
1971-
ITEMCOUNT=1
2022+
CHKCOUNT=true
2023+
if [ "$3" == "count" ] && [ "$PROPEDIT" == 0 ]; then
2024+
CHKCOUNT=false
2025+
fi
2026+
if [ "$CHKCOUNT" == "true" ]; then
2027+
ACTIVE="${G} (active)${N}"
2028+
for ITEM in $1; do
2029+
PROP=$(get_prop_type $(get_eq_left "$ITEM"))
2030+
ORIGVALUE=$(eval "echo \$$(echo "ORIG${PROP}" | tr '[:lower:]' '[:upper:]')")
2031+
if [ "$ORIGVALUE" ] && [ "$(get_eq_right "$ITEM")" != "$ORIGVALUE" ]; then
2032+
CTRLTRIGG=false;
2033+
if [ "$2" == "trigger" ]; then
2034+
magiskhide_trigger "$ITEM"
19722035
fi
1973-
TMPTXT=""
1974-
if [ "$2" == "late" ]; then
1975-
TMPTXT=" ${C}(Late prop)${N}"
1976-
elif [ "$2" == "trigger" ]; then
1977-
TMPTXT=" ${C}(Trigger prop)${N}"
1978-
fi
1979-
if [ "$(eval "echo \$$(echo "RE${PROP}" | tr '[:lower:]' '[:upper:]')")" == "true" ]; then
1980-
if [ "$TMPTXT" ]; then
1981-
TMPTXT=$TMPTXT$ACTIVE
1982-
else
1983-
TMPTXT=$ACTIVE
2036+
if [ "$CTRLTRIGG" == "false" ]; then
2037+
if [ "$ITEMCOUNT" == 0 ]; then
2038+
ITEMCOUNT=1
19842039
fi
2040+
TMPTXT=""
2041+
if [ "$2" == "late" ]; then
2042+
TMPTXT=" ${C}(Late prop)${N}"
2043+
elif [ "$2" == "trigger" ]; then
2044+
TMPTXT=" ${C}(Trigger prop)${N}"
2045+
fi
2046+
if [ "$(eval "echo \$$(echo "RE${PROP}" | tr '[:lower:]' '[:upper:]')")" == "true" ]; then
2047+
if [ "$TMPTXT" ]; then
2048+
TMPTXT=$TMPTXT$ACTIVE
2049+
else
2050+
TMPTXT=$ACTIVE
2051+
fi
2052+
fi
2053+
if [ "$3" != "count" ]; then
2054+
echo -e "${G}$ITEMCOUNT${N} - $(get_eq_left "$ITEM")$TMPTXT"
2055+
fi
2056+
ITEMCOUNT=$(($ITEMCOUNT+1))
19852057
fi
1986-
if [ "$3" != "count" ]; then
1987-
echo -e "${G}$ITEMCOUNT${N} - $(get_eq_left "$ITEM")$TMPTXT"
1988-
fi
1989-
ITEMCOUNT=$(($ITEMCOUNT+1))
19902058
fi
1991-
fi
1992-
done
2059+
done
2060+
fi
19932061
}
19942062

19952063
# Set sensitive props, $1=List to get props from, $2=List of safe values, $3=Set to "late" if set in late stage, or file name if saving values to a prop file
@@ -2021,7 +2089,7 @@ sensitive_props() {
20212089
echo "${ITEM}=$MODULEVALUE" >> $3
20222090
else
20232091
resetprop -nv $ITEM "$MODULEVALUE" >> $LOGFILE 2>&1
2024-
if [ "$BOOTSTAGE" == "late" ]; then
2092+
if [ "$BOOTSTAGE" == "late" ] && [ "$PROPSOFTBOOT" = 1 ]; then
20252093
PROPLATE=true
20262094
fi
20272095
fi
@@ -2206,7 +2274,7 @@ custom_edit() {
22062274
echo "$(get_eq_left "$ITEM")=${TMPITEM}" >> $2
22072275
else
22082276
resetprop -nv $(get_eq_left "$ITEM") "${TMPITEM}" >> $LOGFILE 2>&1
2209-
if [ "$BOOTSTAGE" == "late" ]; then
2277+
if [ "$BOOTSTAGE" == "late" ] && [ "$1" = "CUSTOMPROPSLATE" ]; then
22102278
PROPLATE=true
22112279
fi
22122280
fi
@@ -2471,6 +2539,13 @@ export_settings() {
24712539
replace_fn CONFPROPSDELAY "\"\"" "\"$CUSTOMPROPSDELAY\"" $EXPORTFILE
24722540
# Delete props
24732541
replace_fn CONFDELPROPS "\"\"" "\"$DELETEPROPS\"" $EXPORTFILE
2542+
# Soft reboot
2543+
replace_fn CONFOPTIONSOFTBOOT false $([ $OPTIONSOFTBOOT == 0 ] && echo "false" || echo "true") $EXPORTFILE
2544+
replace_fn CONFPRINTSOFTBOOT false $([ $PRINTSOFTBOOT == 0 ] && echo "false" || echo "true") $EXPORTFILE
2545+
replace_fn CONFPATCHSOFTBOOT false $([ $PATCHSOFTBOOT == 0 ] && echo "false" || echo "true") $EXPORTFILE
2546+
replace_fn CONFSIMSOFTBOOT false $([ $SIMSOFTBOOT == 0 ] && echo "false" || echo "true") $EXPORTFILE
2547+
replace_fn CONFCUSTOMSOFTBOOT false $([ $CUSTOMSOFTBOOT == 0 ] && echo "false" || echo "true") $EXPORTFILE
2548+
replace_fn CONFPROPSOFTBOOT false $([ $PROPSOFTBOOT == 0 ] && echo "false" || echo "true") $EXPORTFILE
24742549
# Module settings
24752550
replace_fn CONFBOOT default $([ $OPTIONBOOT == 0 ] && echo "default" || $([ $PRINTSTAGE == 1 ] && echo "post" || echo "late")) $EXPORTFILE
24762551
replace_fn CONFCOLOUR true $([ $OPTIONCOLOUR == 0 ] && echo "false" || echo "true") $EXPORTFILE

module.prop

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id=MagiskHidePropsConf
22
name=MagiskHide Props Config
3-
version=v6.0.0-v132
4-
versionCode=70
3+
version=v6.0.1-v132
4+
versionCode=71
55
author=Didgeridoohan
66
description=Change your device's fingerprint, to pass SafetyNet's CTS Profile check. Set/reset MagiskHide sensitive prop values. Change any prop values easily, and set your own custom props.

service.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,9 @@ if [ "$PROPEDIT" == 1 ]; then
116116
sensitive_props "$LATEPROPS" "$LATESAFELIST" "late"
117117
fi
118118

119-
# Do a soft restart if a prop has been set in service.sh
120-
if [ "$PROPLATE" == "true" ]; then
121-
stop
122-
start
123-
fi
119+
# Edit custom props set for late_start service
120+
custom_edit "CUSTOMPROPSLATE"
121+
custom_edit "CUSTOMPROPSDELAY"
124122

125123
# SELinux
126124
if [ "$(getenforce)" == "Permissive" ] || [ "$(getenforce)" == "0" ]; then
@@ -129,9 +127,12 @@ if [ "$(getenforce)" == "Permissive" ] || [ "$(getenforce)" == "0" ]; then
129127
chmod 440 /sys/fs/selinux/policy >> $LOGFILE 2>&1
130128
fi
131129

132-
# Edit custom props set for late_start service
133-
custom_edit "CUSTOMPROPSLATE"
134-
custom_edit "CUSTOMPROPSDELAY"
130+
# Do a soft restart if a prop has been set in service.sh
131+
if [ "$PROPLATE" == "true" ]; then
132+
log_handler "Soft rebooting."
133+
stop
134+
start
135+
fi
135136

136137
echo -e "\n----------------------------------------" >> $LOGFILE 2>&1
137138

0 commit comments

Comments
 (0)