Skip to content

Commit 1388fc3

Browse files
v2.1.0-v8
1 parent 74ec746 commit 1388fc3

File tree

8 files changed

+157
-93
lines changed

8 files changed

+157
-93
lines changed

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ props
2020
You can also run the command with options. Use -h for details.
2121

2222

23-
## Spoofing device's fingerprint
23+
## Spoofing device's fingerprint to pass the ctsProfile check
2424
If your device can't pass SafetyNet fully, the CTS profile check fails while basic integrity passes, that means MagiskHide is working on your device but Google doesn't recognise your device as being certified.
2525

2626
This might be because your device simply hasn't been certified or that the ROM you are using on your device isn't recognised by Google (because it's a custom ROM).
@@ -47,9 +47,9 @@ Google Nexus 6=google/shamu/shamu:7.1.1/N8I11B/4171878:user/release-keys
4747
## Current fingerprints list version
4848
The fingerprints list will update without the need to update the entire module. Keep an eye on the [module support thread](https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-simple-t3765199) for info.
4949

50-
Just run the `props` command and the list will be updated automatically. Use the -nw option to disable or disable it completely in the script settings (see below).
50+
Just run the `props` command and the list will be updated automatically. Use the -nw option to disable or disable it completely in the script settings (see below). If you've disabled the this setting you can update the list manually in the `Edit device fingerprint` menu.
5151

52-
**_Current fingerprints list version - v7_**
52+
**_Current fingerprints list version - v8_**
5353

5454

5555
## Improved root hiding - Editing build.prop and default.prop
@@ -72,7 +72,7 @@ It's quite easy to change prop values with Magisk. With this module it's even ea
7272

7373

7474
## Prop script settings
75-
There are a couple of persistent options that you can set for the `props` script. These are currently "Colour" and "Fingerprints list check". The colour option disables or enables colours for the script, and the fingerprints list check option disables or enables automatic updating of the fingerprints list when the script starts. If the fingerprints list check is disabled, the list can be manually updated from within the script, under the "Device fingerprint" menu.
75+
There are a couple of persistent options that you can set for the `props` script. These are currently "Colour" and "Fingerprints list check". The colour option disables or enables colours for the script, and the fingerprints list check option disables or enables automatic updating of the fingerprints list when the script starts. If the fingerprints list check is disabled, the list can be manually updated from within the script, under the `Edit device fingerprint` menu.
7676

7777

7878
## Configuration file
@@ -87,7 +87,7 @@ Place a file named `reset_mhpc` in /cache (or /data/cache on A/B devices) and re
8787
It is possible to use this in combination with the configuration file described above to keep device fingerprint or any other settings intact past the reset. Just make sure to remove any custom props that might have been causing issues from the configuration file.
8888

8989

90-
## Certifying your device
90+
## Keeping your device "certified"
9191
If you're using a custom ROM, the chances of it being [perceived as uncertified by Google](https://www.xda-developers.com/google-blocks-gapps-uncertified-devices-custom-rom-whitelist/) are pretty high. If your ROM has a build date later than March 16 2018, this might mean that you can't even log into your Google account or use Gapps without [whitelisting your device with Google](https://www.google.com/android/uncertified/) first.
9292

9393
Magisk, and this module, can help with that.
@@ -107,7 +107,7 @@ But first: have you tried turning it off and on again? Toggling MagiskHide off a
107107
If you have questions, suggestions or are experiencing some kind of issue, visit the [module support thread](https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-simple-t3765199) @ XDA.
108108

109109
### Logs, etc
110-
In case of issues, please provide the logs, saved in /cache, "propsconf.log" and "propsconf_last.log", together with a detailed description of your problem. Providing the output from terminal might also be useful.
110+
In case of issues, please provide the logs, saved in /cache, "magisk.log", "propsconf.log" and "propsconf_last.log", together with a detailed description of your problem. Providing the output from terminal might also be useful.
111111

112112

113113
## Source
@@ -116,10 +116,17 @@ In case of issues, please provide the logs, saved in /cache, "propsconf.log" and
116116

117117
## Credits
118118
@topjohnwu @ XDA Developers, for Magisk
119-
@Zackptg5, @veez21 and @jenslody @ XDA Developers, for inspiration
119+
@Zackptg5, @veez21 and @jenslody @ XDA Developers, for help and inspiration
120120

121121

122122
## Changelog
123+
### v2.1.0
124+
- "Improved hiding" will now also mask the device fingerprint in build.prop. Please disable and reapply to set.
125+
- Fixed colour code issues if running the script with ADB Shell. Huge shout-out to @veez21 over at XDA Developers.
126+
- Fixed typo in A/B device detection. Thank you to @JayminSuthar over at XDA Developers.
127+
- New fingerprints (Samsung Galaxy S4 and Sony Xperia Z3 Tablet Compact), list v8.
128+
- Minor fixes and improvements.
129+
123130
### v2.0.0
124131
- Added a function for setting your own custom prop values.
125132
- Added a function for setting values by configuration file. Useful if you want to make a ROM pass the ctsProfile check out of the box.
@@ -150,7 +157,7 @@ In case of issues, please provide the logs, saved in /cache, "propsconf.log" and
150157

151158

152159
## Current fingerprints list
153-
### List v7  
160+
### List v8  
154161
- Google Nexus 6 (7.1.1)
155162
- Google Pixel (8.1.0)
156163
- Google Pixel 2 (P DP1)
@@ -168,6 +175,7 @@ In case of issues, please provide the logs, saved in /cache, "propsconf.log" and
168175
- Samsung Galaxy Note 3 (7.1.1)
169176
- Samsung Galaxy Note 4 (6.0.1)
170177
- Samsung Galaxy Note 5 (7.0)
178+
- Samsung Galaxy S4 (5.0.1)
171179
- Samsung Galaxy S6 (5.0.2)
172180
- Samsung Galaxy S7 (7.0)
173181
- Samsung Galaxy S7 Edge (7.0)
@@ -177,6 +185,7 @@ In case of issues, please provide the logs, saved in /cache, "propsconf.log" and
177185
- Sony Xperia XZ (8.0.0)
178186
- Sony Xperia XZ1 Compact (8.0.0)
179187
- Sony Xperia Z3 (6.0.1)
188+
- Sony Xperia Z3 Tablet Compact (6.0.1)
180189
- Sony Xperia Z5 (7.1.1)
181190
- Sony Xperia Z5 Compact (7.1.1)
182191
- Sony Xperia Z5 Dual (7.1.1)

common/post-fs-data.sh

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ IMGPATH=$(dirname "$MODPATH")
1515
# Load functions
1616
. $MODPATH/util_functions.sh
1717

18+
# Clears out the script check file
19+
rm -f $RUNFILE
20+
touch $RUNFILE
21+
1822
# Saves the previous log (if available) and creates a new one
1923
if [ -f "$LOGFILE" ]; then
2024
mv -f $LOGFILE $LASTLOGFILE
@@ -24,7 +28,7 @@ echo "***************************************************" >> $LOGFILE
2428
echo "******** MagiskHide Props Config $MODVERSION ********" >> $LOGFILE
2529
echo "**************** By Didgeridoohan ***************" >> $LOGFILE
2630
echo "***************************************************" >> $LOGFILE
27-
log_handler "Log start."
31+
log_script_chk "Log start."
2832

2933
# Check for boot scripts and restore backup if deleted, or if the resetfile is present
3034
if [ ! -f "$LATEFILE" ] || [ -f "$RESETFILE" ]; then
@@ -124,33 +128,37 @@ if [ "$(get_file_value $LATEFILE "FILESAFE=")" == 0 ]; then
124128
log_handler "Stock build.prop copied from /system."
125129

126130
# Edits the module copy of build.prop
127-
MODULETYPE=$(get_file_value $LATEFILE "MODULETYPE=")
128-
MODULETAGS=$(get_file_value $LATEFILE "MODULETAGS=")
129-
MODULESELINUX=$(get_file_value $LATEFILE "MODULESELINUX=")
131+
module_values
130132
log_handler "Editing build.prop."
131133
if [ "$MODULETYPE" ]; then
132-
SEDTYPE=$MODULETYPE
134+
SEDTYPE="$MODULETYPE"
133135
else
134-
SEDTYPE=user
136+
SEDTYPE="user"
135137
fi
136138
if [ "$(get_file_value $LATEFILE "SETTYPE=")" == "true" ]; then
137-
sed -i "s/ro.build.type=$FILETYPE/ro.build.type=$SEDTYPE/" $MODPATH/system/build.prop && log_handler "ro.build.type"
139+
sed -i "s/ro.build.type=$FILETYPE/ro.build.type=$SEDTYPE/" $MODPATH/system/build.prop && log_handler "ro.build.type=$SEDTYPE"
138140
fi
139141
if [ "$MODULETAGS" ]; then
140-
SEDTAGS=$MODULETAGS
142+
SEDTAGS="$MODULETAGS"
141143
else
142-
SEDTAGS=release-keys
144+
SEDTAGS="release-keys"
143145
fi
144146
if [ "$(get_file_value $LATEFILE "SETTAGS=")" == "true" ]; then
145-
sed -i "s/ro.build.tags=$FILETAGS/ro.build.tags=$SEDTAGS/" $MODPATH/system/build.prop && log_handler "ro.build.tags"
147+
sed -i "s/ro.build.tags=$FILETAGS/ro.build.tags=$SEDTAGS/" $MODPATH/system/build.prop && log_handler "ro.build.tags=$SEDTAGS"
146148
fi
147149
if [ "$MODULESELINUX" ]; then
148-
SEDSELINUX=$MODULESELINUX
150+
SEDSELINUX="$MODULESELINUX"
149151
else
150-
SEDSELINUX=0
152+
SEDSELINUX="0"
151153
fi
152154
if [ "$(get_file_value $LATEFILE "SETSELINUX=")" == "true" ]; then
153-
sed -i "s/ro.build.selinux=$FILESELINUX/ro.build.selinux=$SEDSELINUX/" $MODPATH/system/build.prop && log_handler "ro.build.selinux"
155+
sed -i "s/ro.build.selinux=$FILESELINUX/ro.build.selinux=$SEDSELINUX/" $MODPATH/system/build.prop && log_handler "ro.build.selinux=$SEDSELINUX"
156+
fi
157+
if [ "$(get_file_value $LATEFILE "SETFINGERPRINT=")" == "true" ] && [ "$MODULEFINGERPRINT" ]; then
158+
PRINTSTMP="$(cat /system/build.prop | grep "$CURRFINGERPRINT")"
159+
for ITEM in $PRINTSTMP; do
160+
sed -i "s@${ITEM}@$(get_eq_left $ITEM)=${MODULEFINGERPRINT}@" $MODPATH/system/build.prop && log_handler "$(get_eq_left $ITEM)=$MODULEFINGERPRINT"
161+
done
154162
fi
155163
else
156164
rm -f $MODPATH/system/build.prop
@@ -161,4 +169,4 @@ else
161169
log_handler "Prop file editing disabled. All values ok."
162170
fi
163171

164-
log_handler "post-fs-data.sh finished.\n\n===================="
172+
log_script_chk "post-fs-data.sh finished.\n\n===================="

common/prints.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Samsung Galaxy Grand Prime (5.0.2)=samsung/fortuna3gdtvvj/fortuna3gdtv:5.0.2/LRX
2727
Samsung Galaxy Note 3 (7.1.1)=samsung/greatltexx/greatlte:7.1.1/NMF26X/N950FXXU1AQHA:user/release-keys
2828
Samsung Galaxy Note 4 (6.0.1)=samsung/trltexx/trlte:6.0.1/MMB29M/N910FXXS1DQH9:user/release-keys
2929
Samsung Galaxy Note 5 (7.0)=samsung/nobleltejv/noblelte:7.0/NRD90M/N920CXXU3CQH6:user/release-keys
30+
Samsung Galaxy S4 (5.0.1)=samsung/jfltexx/jflte:5.0.1/LRX22C/I9505XXUHPF4:user/release-keys
3031
Samsung Galaxy S6 (5.0.2)=samsung/zerofltexx/zeroflte:5.0.2/LRX22G/G920FXXU1AOD4:user/release-keys
3132
Samsung Galaxy S7 (7.0)=samsung/heroltexx/herolte:7.0/NRD90M/G930FXXU2DRB6:user/release-keys
3233
Samsung Galaxy S7 Edge (7.0)=samsung/hero2ltexx/hero2lte:7.0/NRD90M/G935FXXU2DRB6:user/release-keys
@@ -36,6 +37,7 @@ Sony Xperia X Performance (8.0.0)=Sony/F8131/F8131:8.0.0/41.3.A.2.99/1455830589:
3637
Sony Xperia XZ (8.0.0)=Sony/F8331/F8331:8.0.0/41.3.A.2.99/1455830589:user/release-keys
3738
Sony Xperia XZ1 Compact (8.0.0)=Sony/G8441/G8441:8.0.0/47.1.A.12.119/1601781803:user/release-keys
3839
Sony Xperia Z3 (6.0.1)=Sony/D6633/D6633:6.0.1/23.5.A.1.291/2769308465:user/release-keys
40+
Sony Xperia Z3 Tablet Compact (6.0.1)=Sony/SGP621/SGP621:6.0.1/23.5.A.1.291/3706784398:user/release-keys
3941
Sony Xperia Z5 (7.1.1)=Sony/E6603/E6603:7.1.1/32.4.A.1.54/3761073091:user/release-keys
4042
Sony Xperia Z5 Compact (7.1.1)=Sony/E5823/E5823:7.1.1/32.4.A.1.54/3761073091:user/release-keys
4143
Sony Xperia Z5 Dual (7.1.1)=Sony/E6633/E6633:7.1.1/32.4.A.1.54/3761073091:user/release-keys

common/propsconf_late

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# In that case, feel free to delete it.
1010

1111
# Script version
12-
SCRIPTV=2
12+
SCRIPTV=3
1313
SETTRANSF=1
1414

1515
# Variables
@@ -50,7 +50,7 @@ if [ -d "$MODPATH" ]; then
5050
# Load functions
5151
. $MODPATH/util_functions.sh
5252

53-
log_handler "Running boot script."
53+
log_script_chk "Running boot script."
5454

5555
if [ -f "$MODPATH/disable" ]; then
5656
log_handler "Module disabled."
@@ -97,6 +97,7 @@ if [ -d "$MODPATH" ]; then
9797
SETTYPE=false
9898
SETTAGS=false
9999
SETSELINUX=false
100+
SETFINGERPRINT=false
100101

101102
# ---Setting/Changing props---
102103
# Set/change MagiskHide sensitive props
@@ -145,22 +146,22 @@ if [ -d "$MODPATH" ]; then
145146
SEDDEBUGGABLE="0"
146147
fi
147148
if [ "$SETDEBUGGABLE" == "true" ]; then
148-
sed -i "s/ro.debuggable=$FILEDEBUGGABLE/ro.debuggable=$SEDDEBUGGABLE/" /default.prop && log_handler "ro.debuggable"
149+
sed -i "s/ro.debuggable=$FILEDEBUGGABLE/ro.debuggable=$SEDDEBUGGABLE/" /default.prop && log_handler "ro.debuggable=$SEDDEBUGGABLE"
149150
fi
150151
if [ "$MODULESECURE" ]; then
151152
SEDSECURE="$MODULESECURE"
152153
else
153154
SEDSECURE="1"
154155
fi
155156
if [ "$SETSECURE" == "true" ]; then
156-
sed -i "s/ro.secure=$FILESECURE/ro.secure=$SEDSECURE/" /default.prop && log_handler "ro.secure"
157+
sed -i "s/ro.secure=$FILESECURE/ro.secure=$SEDSECURE/" /default.prop && log_handler "ro.secure=$SEDSECURE"
157158
fi
158159
mount -ro remount rootfs /
159160
else
160161
log_handler "Default.prop editing disabled."
161162
fi
162163
fi
163-
log_handler "Boot script finished.\n\n=================="
164+
log_script_chk "Boot script finished.\n\n=================="
164165
fi
165166
else
166167
# Cleanup

common/util_functions.sh

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ MODVERSION=VER_PLACEHOLDER
88
POSTFILE=$IMGPATH/.core/post-fs-data.d/propsconf_post
99
LATEFILE=$IMGPATH/.core/service.d/propsconf_late
1010
CACHELOC=CACHE_PLACEHOLDER
11+
RUNFILE=$MODPATH/script_check
1112
LOGFILE=$CACHELOC/propsconf.log
1213
LASTLOGFILE=$CACHELOC/propsconf_last.log
1314
CONFFILE=$CACHELOC/propsconf_conf
@@ -55,12 +56,19 @@ log_print() {
5556
echo "$1"
5657
log_handler "$1"
5758
}
59+
log_script_chk() {
60+
log_handler "$1"
61+
echo -e "$(date +"%m-%d-%Y %H:%M:%S") - $1" >> $RUNFILE
62+
}
5863

5964
#Divider
6065
DIVIDER="${Y}=====================================${N}"
6166

6267
# Header
6368
menu_header() {
69+
if [ -z "$LOGNAME" ]; then
70+
clear
71+
fi
6472
if [ "$MODVERSION" == "VER_PLACEHOLDER" ]; then
6573
VERSIONTXT=""
6674
else
@@ -126,6 +134,17 @@ orig_check() {
126134
done
127135
}
128136

137+
script_ran_check() {
138+
POSTCHECK=0
139+
if [ "$(cat $RUNFILE | grep "post-fs-data.sh finished")" ]; then
140+
POSTCHECK=1
141+
fi
142+
LATECHECK=0
143+
if [ "$(cat $RUNFILE | grep "Boot script finished")" ]; then
144+
LATECHECK=1
145+
fi
146+
}
147+
129148
# Currently set values
130149
curr_values() {
131150
CURRDEBUGGABLE=$(resetprop ro.debuggable)
@@ -339,7 +358,9 @@ config_file() {
339358
# ======================== Fingerprint functions ========================
340359
# Checks and updates the prints list
341360
download_prints() {
342-
clear
361+
if [ -z "$LOGNAME" ]; then
362+
clear
363+
fi
343364
menu_header "Updating fingerprints list"
344365
echo ""
345366
log_print "Checking list version."
@@ -366,6 +387,8 @@ download_prints() {
366387
fi
367388
if [ "$1" == "manual" ]; then
368389
sleep 2
390+
else
391+
sleep 0.5
369392
fi
370393
}
371394

@@ -408,17 +431,19 @@ change_print() {
408431
reset_prop_files() {
409432
log_handler "Resetting prop files$3."
410433

411-
# Changes file
434+
# Changes files
412435
for PROPTYPE in $PROPSLIST; do
413436
log_handler "Disabling prop file editing for '$PROPTYPTE'."
414437
PROP=$(get_prop_type $PROPTYPE)
415438
FILEPROP=$(echo "FILE$PROP" | tr '[:lower:]' '[:upper:]')
416439
SETPROP=$(echo "SET$PROP" | tr '[:lower:]' '[:upper:]')
417-
418440
sed -i "s/$SETPROP=true/$SETPROP=false/" $LATEFILE
419-
sed -i 's/BUILDEDIT=1/BUILDEDIT=0/' $LATEFILE
420-
sed -i 's/DEFAULTEDIT=1/DEFAULTEDIT=0/' $LATEFILE
421441
done
442+
# Change fingerprint
443+
sed -i "s/SETFINGERPRINT=true/SETFINGERPRINT=false/" $LATEFILE
444+
# Edit settings variables
445+
sed -i 's/BUILDEDIT=1/BUILDEDIT=0/' $LATEFILE
446+
sed -i 's/DEFAULTEDIT=1/DEFAULTEDIT=0/' $LATEFILE
422447

423448
if [ "$1" != "file" ]; then
424449
after_change_file "$1" "$2"
@@ -436,6 +461,13 @@ edit_prop_files() {
436461
ro.debuggable
437462
ro.secure
438463
"
464+
else
465+
# Checking if the device fingerprint is set by the module
466+
if [ "$(get_file_value $LATEFILE "FINGERPRINTENB=")" == 1 ] && [ "$(get_file_value $LATEFILE "PRINTEDIT=")" == 1 ]; then
467+
if [ "$(cat /system/build.prop | grep "$ORIGFINGERPRINT")" ]; then
468+
sed -i "s/SETFINGERPRINT=false/SETFINGERPRINT=true/" $LATEFILE
469+
fi
470+
fi
439471
fi
440472

441473
for PROPTYPE in $PROPSLIST; do
@@ -467,9 +499,9 @@ edit_prop_files() {
467499
else
468500
log_handler "Couldn't check safe value for '$PROPTYPE'."
469501
fi
470-
sed -i 's/DEFAULTEDIT=0/DEFAULTEDIT=1/' $LATEFILE
471-
sed -i 's/BUILDEDIT=0/BUILDEDIT=1/' $LATEFILE
472502
done
503+
sed -i 's/DEFAULTEDIT=0/DEFAULTEDIT=1/' $LATEFILE
504+
sed -i 's/BUILDEDIT=0/BUILDEDIT=1/' $LATEFILE
473505

474506
if [ "$1" != "file" ]; then
475507
after_change_file "$1" "$2"

config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ ab_check() {
275275
if [ -z $SLOT ]; then
276276
CACHELOC=/cache
277277
else
278-
CACHELOC/data/cache
278+
CACHELOC=/data/cache
279279
fi
280280
}
281281

module.prop

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
id=MagiskHidePropsConf
22
name=MagiskHide Props Config
3-
version=v2.0.0-v7
4-
versionCode=5
3+
version=v2.1.0-v8
4+
versionCode=6
55
author=Didgeridoohan
66
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.
77
minMagisk=1500

0 commit comments

Comments
 (0)